<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Exploit-ID &#187; Adi Cohen</title>
	<atom:link href="http://www.exploit-id.com/authors/adi-cohen/feed" rel="self" type="application/rss+xml" />
	<link>http://www.exploit-id.com</link>
	<description>Exploit Information Disclosure</description>
	<lastBuildDate>Tue, 30 Apr 2013 03:02:28 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=429</generator>
		<item>
		<title>IE9, SharePoint, Lync toStaticHTML HTML Sanitizing Bypass</title>
		<link>http://www.exploit-id.com/dospoc/ie9-sharepoint-lync-tostatichtml-html-sanitizing-bypass</link>
		<comments>http://www.exploit-id.com/dospoc/ie9-sharepoint-lync-tostatichtml-html-sanitizing-bypass#comments</comments>
		<pubDate>Thu, 19 Jul 2012 15:19:07 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[DoS/PoC]]></category>
		<category><![CDATA[Adi Cohen]]></category>

		<guid isPermaLink="false">http://www.exploit-id.com/?p=9424</guid>
		<description><![CDATA[?View Code WINDOWStoStaticHTML: The Second Encounter (CVE-2012-1858) &#160; *HTML Sanitizing Bypass - *CVE-2012-1858&#60;http://www.cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2012-1858&#62; &#160; Original advisory - http://blog.watchfire.com/wfblog/2012/07/tostatichtml-the-second-encounter-cve-2012-1858-html-sanitizing-information-disclosure-introduction-t.html &#160; Introduction &#160; The *toStaticHTML* component, which is found in Internet Explorer &#62; 8, SharePoint and Lync is used to sanitize HTML fragments from dynamic and potentially malicious content. &#160; If an attacker is able to break [...]]]></description>
			<content:encoded><![CDATA[
<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p9424code2'); return false;">View Code</a> WINDOWS</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p94242"><td class="code" id="p9424code2"><pre class="windows" style="font-family:monospace;">toStaticHTML: The Second Encounter (CVE-2012-1858)
&nbsp;
*HTML Sanitizing Bypass -
*CVE-2012-1858&lt;http://www.cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2012-1858&gt;
&nbsp;
Original advisory -
http://blog.watchfire.com/wfblog/2012/07/tostatichtml-the-second-encounter-cve-2012-1858-html-sanitizing-information-disclosure-introduction-t.html
&nbsp;
Introduction
&nbsp;
The *toStaticHTML* component, which is found in Internet Explorer &gt; 8,
SharePoint and Lync is used to sanitize HTML fragments from dynamic and
potentially malicious content.
&nbsp;
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).
&nbsp;
It has been a year since the first
encounter&lt;http://blog.watchfire.com/wfblog/2011/07/tostatichtml-html-sanitizing-bypass.html&gt;
was
published, we've now returned with a new bypass method.
&nbsp;
Vulnerability
&nbsp;
An attacker is able to create a specially formed CSS that will overcome *
toStaticHTML*'s security logic; therefore, after passing the specially
crafted CSS string through the *toStaticHTML* function, it will contain an
expression that triggers a JavaScript call.
&nbsp;
The following JavaScript code demonstrates the vulnerability:
&nbsp;
*&lt;script&gt;document.write(toStaticHTML(&quot;&lt;style&gt;
div{font-family:rgb('0,0,0)'''}foo');color=expression(alert(1));{}
&lt;/style&gt;&lt;div&gt;POC&lt;/div&gt;&quot;))&lt;/script&gt;*
&nbsp;
In this case the function's return value would be JavaScript executable:
&nbsp;
*&lt;style&gt;
div{font-family:rgb('0,0,0)''';}foo');color=expression(alert(1));{;}&lt;/style&gt;
&lt;div&gt;POC&lt;/div&gt;*
&nbsp;
&nbsp;
&nbsp;
The reason this code bypasses the filter engine is due to two reasons:
&nbsp;
   1. The filtering engine allows the string &quot;expression(&quot; to exists in
   &quot;non-dangerous&quot; locations within the CSS.
   2. A bug in Internet Explorer's CSS parsing engine doesn't properly
   terminate strings that are opened inside brackets and closed outside of
   them.
&nbsp;
When combining these two factors the attacker is able to &quot;confuse&quot; the
filtering mechanism into &quot;thinking&quot; 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.
&nbsp;
&nbsp;
&nbsp;
Impact
&nbsp;
Every application that relies on the *toStaticHTML* component to sanitize
user supplied data had probably been vulnerable to XSS.
&nbsp;
&nbsp;
&nbsp;
Remediation
&nbsp;
Microsoft has issued several updates to address this vulnerability.
&nbsp;
MS12-037 - http://technet.microsoft.com/en-us/security/bulletin/ms12-037
&nbsp;
MS12-039 - http://technet.microsoft.com/en-us/security/bulletin/ms12-039
&nbsp;
MS12-050 - http://technet.microsoft.com/en-us/security/bulletin/MS12-050</pre></td></tr></table></div>

]]></content:encoded>
			<wfw:commentRss>http://www.exploit-id.com/dospoc/ie9-sharepoint-lync-tostatichtml-html-sanitizing-bypass/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
