I am having some serious security breaches in my website. After securing the webserver, i will now secure my php files.
Thus, i want to know all the methods might be used to upload or edit php files due to an exploit in my php scripts.
I am having some serious security breaches in my website. After securing the webserver, i will now secure my php files.
Thus, i want to know all the methods might be used to upload or edit php files due to an exploit in my php scripts.
sigh, hundreds and hundreds. Apply proper safety checks in code, and for heaven's sake, don't make anything writable/executable for the web-user which shouldn't be (no lazy blanket 0777
as people seem to indulge in).
If your webserver was compromised, there is no way around reinstalling the whole webserver! As mentioned above there might be rootkits already installed. I guess by "securing the webserver" you also reinstalled it?
It all depends what your webserver is hosting. If you use a CMS of any type (joomla, ...), or a forum, then check for updates for these.
I agree with the things mentioned above:
One of the most common issues is code like include($_REQUEST['site'].'.php')
which allows the attacker to include code from remote servers if allow_url_include
is not disabled in php.ini
Look for a web shell script, basically a PHP file which allows anyone to do anything when accessed.
Hackers generally try and make it look non malicious, for example, disguising it as a Google Webmaster Tools authentication file google-34facsdb7fdfd33c.php
.