IE toStaticHTML BYPASS
HTML Sanitizing Bypass - CVE-2012-1858
The toStaticHTML component, which is found in Internet Explorer > 8, SharePoint and Lync is used to sanitize HTML fragments from dynamic and potentially malicious content.
If an attacker is able to break the filtering mechanism and pass malicious code through this function, he/she may be able to perform HTML injection based attacks (i.e. XSS).
It has been a year since the first encounter was published, we've now returned with a new bypass method.
The reason this code bypasses the filter engine is due to two reasons:
- The filtering engine allows the string "expression(" to exists in "non-dangerous" locations within the CSS.
- A bug in Internet Explorer's CSS parsing engine doesn't properly terminate strings that are opened inside brackets and closed outside of them.
When combining these two factors the attacker is able to "confuse" the filtering mechanism into "thinking" that a string is open when in fact it is terminated and vice versa. With this ability the attacker can trick the filtering mechanism into entering a state of the selector context which is considered safer where in fact the code is just a new declaration of the same selector, thus breaking the state machine and bypassing the filter.
Every application that relies on the toStaticHTML component to sanitize user supplied data had probably been vulnerable to XSS.
Microsoft has issued several updates to address this vulnerability.
Discovered by - Adi Cohen, IBM Application Security Research
文章来源于lcx.cc:toStaticHTML: The Second Encounter (CVE-2012-1858)
文章作者:冰刀 blog:http://hi.baidu.com/hcbingdao 前提条件，旁下一个同F的shell，可以执行常用的命令。 第一， 如果支持aspx，可以利用aspxshell的IISspy功能查看，前提管理没有做限制。 另外，IISspy…