PHP脚本木马的高级防范

08月 29th, 2007

打开safe_mode,在php.ini中设置 disable_functions= passthru,
exec,shell_exec,system 二者选一即可,也可都选 
在php.ini中的 disable_functions= passthru,exec,shell_exec,system 后面
加上php处理文件的函数,防止木马被运行
防止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



发表回复