受影响系统:   PHP PHP 5.0.2   PHP PHP 5.0.1   PHP PHP 5.0.0   PHP PHP 4.3.9   PHP PHP 4.3.8   PHP PHP 4.3.7   PHP PHP 4.3.6   不受影响系统:   PHP PHP 5.0.3   PHP PHP 4.3.10   描述:   --------------------------------------------------------------------------------   PHP是一种流行的WEB服务器端编程语言。   PHP存在输入验证漏洞,远程攻击者可以利用这个漏洞读取系统文件内容及进行目录遍历攻击。   问题一是addslashes()存在问题,addslashes()用于过滤用户输入,在magic_quotes_gpc设置"on"时,将对每个输入执行addslashes()进行过滤,但是由于NULL字节不正确被addslashes()编码,如果用户输入被include()或require()使用,可能导致攻击者读取文件系统的任意文件。   问题二是上传路径遍历问题,PHP自动过滤上传的文件名数据,删除在斜杠或反斜杠之前的数据,但是如果攻击者上传的文件包含单引号,而WEB服务又设置magic_quotes为ON,或者对上传文件名执行addslashes()操作,那么在单引号前会前缀一个反斜杠,因此在Windows系统可造成目录遍历问题,导致文件上传到系统任意目录中。 测试方法:   --------------------------------------------------------------------------------   警 告   以下程序(方法)可能带有攻击性,仅供安全研究与教学之用。使用者风险自负!   Daniel Fabian (d.fabian@sec-consult.com)提供了如下测试方法:   如有如下PHP脚本:   $whatever = addslashes($_REQUEST[whatever]);   include("/path/to/program/" . $whatever . "/header.htm");   恶意攻击者可以提交如下URL获得文件内容:   http://www.0834jlyy.com?whatever=../../../../boot.ini   建议:   --------------------------------------------------------------------------------   厂商补丁:   PHP   ---   目前厂商已经发布了升级补丁以修复这个安全问题,请到厂商的主页下载升级到PHP 4.3.10或者5.0.3版本

http://www.chll365.com/meishi/285.html
http://www.chll365.com/meishi/286.html
http://www.chll365.com/meishi/287.html
http://www.chll365.com/meishi/288.html
http://www.chll365.com/meishi/289.html
http://www.chll365.com/meishi/291.html
http://www.chll365.com/meishi/292.html
http://www.chll365.com/meishi/293.html
http://www.chll365.com/meishi/294.html
http://www.chll365.com/meishi/295.html
http://www.chll365.com/meishi/296.html
http://www.chll365.com/meishi/297.html
http://www.chll365.com/meishi/298.html
http://www.chll365.com/meishi/299.html
http://www.chll365.com/meishi/300.html
http://www.chll365.com/meishi/301.html
http://www.chll365.com/meishi/303.html
http://www.chll365.com/meishi/306.html
http://www.chll365.com/meishi/307.html
http://www.chll365.com/meishi/309.html
http://www.chll365.com/meishi/311.html
http://www.chll365.com/meishi/312.html
http://www.chll365.com/meishi/313.html
http://www.chll365.com/meishi/314.html
http://www.chll365.com/meishi/315.html
http://www.chll365.com/meishi/316.html
http://www.chll365.com/meishi/317.html
http://www.chll365.com/meishi/321.html
http://www.chll365.com/meishi/324.html
http://www.chll365.com/meishi/349.html

m.shhsf.cn

SRE实战 互联网时代守护先锋,助力企业售后服务体系运筹帷幄!一键直达领取阿里云限量特价优惠。

 

扫码关注我们
微信号:SRE实战
拒绝背锅 运筹帷幄