主题:  PHP木马攻击的防御

相逢辰

职务:普通成员
等级:2
金币:0.0
发贴:512
#12004/12/29 23:41:49

  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木马拿我们没辙了,^_^

  遗憾的是这样的话,利用文本数据库的那些东西就都不能用了。



zhangjia

职务:普通成员
等级:1
金币:0.0
发贴:2
#22005/4/10 0:56:41



zhangjia

职务:普通成员
等级:1
金币:0.0
发贴:2
#32005/4/10 0:57:52