Attack | Trojan Horse
1. To prevent out web directory
First Change httpd. conf, if you are only allowed to your PHP scripts in web directory in the operation, you can also modify the httpd. CONF file PHP limits the operation of the path. For example, your web directory is/usr/local/Apache/htdoCS, then in httpd. conf in with so few lines:
PHP_admin_value open_basedir/usr/local/Apache/htdoCS
In this way, if the script to read/usr/local/Apache/htdoCS file will not be allowed, if the error show open. php:
Warning: open_basedir restriction in effect. The File is in the wrong directory in
/Usr/local/Apache/htdoCS/open. PHP on line 4
And so on.
2. To prevent PHP Trojan executive webshell
Open the safe_mode,
In PHP. ini setting
Disable_functions = passthru, exec, shell_exec, System
Two. A can, can also be all.
3. To prevent PHP Trojan read and write files directory
In PHP. ini in
Disable_functions = passthru, exec, shell_exec, System
Add PHP files Function
The main
Fopen, mkdir, rmdir, chmod, unlink, Dir
Fopen, fread, fclose, fwrite, file_exists