防止PHP木马,应在PHP.INI里禁止的一些函数
作者:fengyn 日期:2010-05-21
disable_functions = system,passthru,exec,shell_exec,phpinfo,get_current_user,ini_restore,dl,scandir,popen,proc_open,opendir
其中opendir这个是文件浏览的重要函数,禁了这个,大部分PHP木马都没门了。
不过会对一些正常的PHP有时候会造成影响,但是不影响正常使用。比如DZ论坛的后台 文件校验、运行记录等。就有影响了。。。
更严格的一组限制函数
disable_functions = phpinfo,passthru,exec,system,chroot,scandir,chgrp,chown,shell_exec,proc_open,proc_get_status,
ini_alter,ini_alter,ini_restore,dl,pfsockopen,openlog,syslog,readlink,symlink,popepassthru,stream_socket_server,
get_current_user,leak,putenv,popen,opendir
其中opendir这个是文件浏览的重要函数,禁了这个,大部分PHP木马都没门了。
不过会对一些正常的PHP有时候会造成影响,但是不影响正常使用。比如DZ论坛的后台 文件校验、运行记录等。就有影响了。。。
更严格的一组限制函数
disable_functions = phpinfo,passthru,exec,system,chroot,scandir,chgrp,chown,shell_exec,proc_open,proc_get_status,
ini_alter,ini_alter,ini_restore,dl,pfsockopen,openlog,syslog,readlink,symlink,popepassthru,stream_socket_server,
get_current_user,leak,putenv,popen,opendir
评论: 1 | 引用: 0 | 查看次数: -
发表评论

上一篇
下一篇

文章来自:
Tags:
相关日志:

system
exec
shell_exec
proc_open
passthru
set_time_limit
error_log
ini_alter
dl
pfsockopen
openlog
syslog
readlink
symlink
link
leak
popen
escapeshellcmd
apache_child_terminate
apache_get_modules
apache_get_version
apache_getenv
apache_note
apache_setenv
virtual
mb_send_mail
pcntl_exec
socket_connect
socket_create