PHP配置安全补充
作者:fengyn 日期:2009-08-17
配置PHP时候一定要考虑到PHPshell文件,所以,在配置里边请加下安全。。
特别是限制PHP函数,很重要。
如果你的PHP主机被入侵,请按照以下思路,修补:
查下webshell
DZ论坛,采用不同用户名、SQL密码
改下PHPmyadmin
禁下PHP函数 特别是WEBSHELL
查下是如何传上去的
服务器改端口
针对DZ 的问题,要多留意。
PHPINI中禁止掉以下函数
disable_functions = system,passthru,exec,shell_exec,popen,phpinfo,get_current_user,opendir,proc_open
如果更严格,可以加上file_get_contents
,pfsockopen,syslog,link,set_time_limit,passthru,Wscript.Shell,fileperms,fsockopen 不过这里边加上会让UC无法正常通信
自己多测试吧。
看到火山互联的vps的禁用的函数
system
exec
shell_exec
passthru
set_time_limit
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
http://volit.whoyis.cn/php.php
特别是限制PHP函数,很重要。
如果你的PHP主机被入侵,请按照以下思路,修补:
查下webshell
DZ论坛,采用不同用户名、SQL密码
改下PHPmyadmin
禁下PHP函数 特别是WEBSHELL
查下是如何传上去的
服务器改端口
针对DZ 的问题,要多留意。
PHPINI中禁止掉以下函数
disable_functions = system,passthru,exec,shell_exec,popen,phpinfo,get_current_user,opendir,proc_open
如果更严格,可以加上file_get_contents
,pfsockopen,syslog,link,set_time_limit,passthru,Wscript.Shell,fileperms,fsockopen 不过这里边加上会让UC无法正常通信
自己多测试吧。
看到火山互联的vps的禁用的函数
system
exec
shell_exec
passthru
set_time_limit
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
http://volit.whoyis.cn/php.php
评论: 0 | 引用: 0 | 查看次数: -
发表评论

上一篇
下一篇

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