网络安全 频道

PHP木马攻击的防御

1.防止php木马执行webshell

  打开safe_mode,

  在,php.ini中设置

  disable_functions= passthru,exec,shell_exec,system  

  二者选一即可,也可都选  

2.防止php木马读写文件目录  

  在php.ini中的

  disable_functions= passthru,exec,shell_exec,system  

  后面加上php处理文件的函数

  主要有

  fopen,mkdir,rmdir,chmod,unlink,dir

  fopen,fread,fclose,fwrite,file_exists

  closedir,is_dir,readdir.opendir

  fileperms.copy,unlink,delfile

  即成为

  disable_functions= passthru,exec,shell_exec,system,fopen,mkdir,rmdir,chmod,unlink,dir

  ,fopen,fread,fclose,fwrite,file_exists

  ,closedir,is_dir,readdir.opendir

  ,fileperms.copy,unlink,delfile

  ok,大功告成,php木马拿我们没辙了,^_^

  遗憾的是这样的话,利用文本数据库的那些东西就都不能用了。  http://www.hack58.net/Article/60/61/2006/8662.htm
0
相关文章