首 页 ASP ASP.NET PHP JSP Ajax DIV+CSS JavaScript XML C#
MySQL MSSQL Access Oracle Linux Server 电脑技巧 网络安全 建站经验 其它

有效防御PHP木马攻击的技巧

整理日期:2007年06月14日 【字体:

  1、防止跳出web目录

  首先修改httpd.conf,如果你只允许你的php脚本程序在web目录里操作,还可以修改httpd.conf文件限制php的操作路径。比如你的web目录是/usr/local/apache/htdocs,那么在httpd.conf里加上这么几行:

  php_admin_value open_basedir /usr/local/apache
/htdocs

  这样,如果脚本要读取/usr/local/apache/htdocs以外的文件将不会被允许,如果错误显示打开的话会提示这样的错误:

  Warning: open_basedir restriction in effect. File is in wrong directory in

  /usr/local/apache/htdocs/open.php on line 4

  等等。

  2、防止php木马执行webshell

  打开safe_mode,

  在,php.ini中设置

  disable_functions= passthru,exec,shell_exec,system

  二者选一即可,也可都选

  3、防止php木马读写文件目录

  在php.ini中的

  disable_functions= passthru,exec,shell_exec,system

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


伊图教程网[www.etoow.com]
http://www.etoow.com/html/2007-06/1181853183.html
  主要有
Tags:
有效防御PHP木马攻击的技巧
'http://www.etoow.com/html/2007-06/1181853183.html
1
 
信息搜索
  
联系我们关于本站广告服务设为首页 收藏本站友情链接网站地图
Copyright © Etoow.com Inc. All Rights Reserved