<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Didier Stevens &#187; Vulnerabilities</title>
	<atom:link href="http://blog.didierstevens.com/category/vulnerabilities/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.didierstevens.com</link>
	<description>(blog 'DidierStevens)</description>
	<lastBuildDate>Sat, 04 Feb 2012 06:57:26 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='blog.didierstevens.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>Didier Stevens &#187; Vulnerabilities</title>
		<link>http://blog.didierstevens.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://blog.didierstevens.com/osd.xml" title="Didier Stevens" />
	<atom:link rel='hub' href='http://blog.didierstevens.com/?pushpress=hub'/>
		<item>
		<title>HeapLocker 64-bit</title>
		<link>http://blog.didierstevens.com/2011/10/23/heaplocker-64-bit/</link>
		<comments>http://blog.didierstevens.com/2011/10/23/heaplocker-64-bit/#comments</comments>
		<pubDate>Sun, 23 Oct 2011 19:40:45 +0000</pubDate>
		<dc:creator>Didier Stevens</dc:creator>
				<category><![CDATA[My Software]]></category>
		<category><![CDATA[Vulnerabilities]]></category>

		<guid isPermaLink="false">http://blog.didierstevens.com/?p=2878</guid>
		<description><![CDATA[I&#8217;m releasing my first 64-bit version of my HeapLocker tool. I had to change many pointer calculations, and had to replace 32-bit shellcode with 64-bit shellcode. This 64-bit version gets configured via the registry, exactly like the 32-bit version of HeapLocker. The only difference is when you want to protect specific addresses, you need to [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.didierstevens.com&amp;blog=264765&amp;post=2878&amp;subd=didierstevens&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m releasing my first 64-bit version of my <a href="http://blog.didierstevens.com/programs/heaplocker/">HeapLocker tool</a>.</p>
<p>I had to change many pointer calculations, and had to replace 32-bit shellcode with 64-bit shellcode.</p>
<p><img class="alignnone size-full wp-image-2879" title="20111023-212131" src="http://didierstevens.files.wordpress.com/2011/10/20111023-212131.png" alt="" width="899" height="402" /></p>
<p>This 64-bit version gets configured via the registry, exactly like the 32-bit version of HeapLocker. The only difference is when you want to protect specific addresses, you need to use a QWORD registry value in stead of a DWORD (QWORD is 64-bit wide, DWORD is 32-bit wide).</p>
<p>And there is a new feature: <a href="http://blog.didierstevens.com/2011/09/29/add-bottom-up-randomization-to-your-own-source-code/">Bottom Up Randomization</a>. To enable it, create a DWORD registry value with name BottomUpRandomization and value 1.</p>
<p>I will be adding this feature to HeapLocker 32-bit too, but I want to do this from the same code base. The next release of HeapLocker 32-bit will be compiled from Visual Studio 2010 and not from Borland C++ anymore.</p>
<p><a href="http://didierstevens.com/files/software/HeapLocker64_V0_0_1_0.zip" target="_self">HeapLocker64_V0_0_1_0.zip</a> (<a href="https://didierstevens.com/files/software/HeapLocker64_V0_0_1_0.zip" target="_self">https</a>)<br />
MD5: F3D43A29CE64F9418AA154C66B0B06A4<br />
SHA256: 7EFF1D9EA20B522D76034DC4CB66E2FD7AC43E585987FC9ABF7EF8EB801FBC6C</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/didierstevens.wordpress.com/2878/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/didierstevens.wordpress.com/2878/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/didierstevens.wordpress.com/2878/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/didierstevens.wordpress.com/2878/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/didierstevens.wordpress.com/2878/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/didierstevens.wordpress.com/2878/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/didierstevens.wordpress.com/2878/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/didierstevens.wordpress.com/2878/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/didierstevens.wordpress.com/2878/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/didierstevens.wordpress.com/2878/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/didierstevens.wordpress.com/2878/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/didierstevens.wordpress.com/2878/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/didierstevens.wordpress.com/2878/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/didierstevens.wordpress.com/2878/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.didierstevens.com&amp;blog=264765&amp;post=2878&amp;subd=didierstevens&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.didierstevens.com/2011/10/23/heaplocker-64-bit/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">didierstevens</media:title>
		</media:content>

		<media:content url="http://didierstevens.files.wordpress.com/2011/10/20111023-212131.png" medium="image">
			<media:title type="html">20111023-212131</media:title>
		</media:content>
	</item>
		<item>
		<title>HeapLocker: Preventing Heapsprays</title>
		<link>http://blog.didierstevens.com/2011/10/18/heaplocker-preventing-heapsprays/</link>
		<comments>http://blog.didierstevens.com/2011/10/18/heaplocker-preventing-heapsprays/#comments</comments>
		<pubDate>Tue, 18 Oct 2011 08:34:10 +0000</pubDate>
		<dc:creator>Didier Stevens</dc:creator>
				<category><![CDATA[My Software]]></category>
		<category><![CDATA[Vulnerabilities]]></category>

		<guid isPermaLink="false">http://blog.didierstevens.com/?p=2855</guid>
		<description><![CDATA[I&#8217;ve been using my HeapLocker tool for almost a year now, and I&#8217;ve encountered no issues, except for the NOP sled detection. When used with Adobe Reader, HeapLocker will generate too many false positives when looking for NOP sleds. So I&#8217;ve disabled NOP sled detection for Adobe Reader. The last feature I want to talk [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.didierstevens.com&amp;blog=264765&amp;post=2855&amp;subd=didierstevens&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been using my <a href="http://blog.didierstevens.com/programs/heaplocker/">HeapLocker tool</a> for almost a year now, and I&#8217;ve encountered no issues, except for the <a href="http://blog.didierstevens.com/2011/01/12/heaplocker-nop-sled-detection/">NOP sled detection</a>. When used with Adobe Reader, HeapLocker will generate too many false positives when looking for NOP sleds. So I&#8217;ve disabled NOP sled detection for Adobe Reader.</p>
<p>The last feature I want to talk about is heap spray mitigation.</p>
<span style="text-align:center; display: block;"><a href="http://blog.didierstevens.com/2011/10/18/heaplocker-preventing-heapsprays/"><img src="http://img.youtube.com/vi/Ywa02YPDUFY/2.jpg" alt="" /></a></span>
<p>Like EMET, HeapLocker can pre-allocate memory pages so that they can&#8217;t be used by the heap. And this renders a heap spray useless, as it will not be able to inject shellcode at the addresses HeapLocker protects. But unlike EMET, HeapLocker has 2 modes of pre-allocating memory pages. The first mode is just like EMET, while the second mode will write special shellcode to the pre-allocated pages. When this shellcode is hit due to an exploit, it will callback to HeapLocker which will suspend all threads and display a warning dialog. This is what you see in the video. There are 2 advantages to this mode: the user is warned that she opened a malicious document, and you can also use this in a malware lab to find out which address the exploit is hitting.</p>
<p>To prevent the HeapLocker shellcode from being used for <a href="http://en.wikipedia.org/wiki/Return-oriented_programming">ROP exploits</a>, I randomized the injected NOP sled and shellcode. But if you still find this too risky, just use the standard mode for pre-allocating pages.</p>
<p>For more details about the exact way to configure this, read the documentation found in the <a href="http://blog.didierstevens.com/programs/heaplocker/">HeapLocker download</a>.</p>
<p>FYI: I&#8217;m also working on a 64-bit version of HeapLocker.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/didierstevens.wordpress.com/2855/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/didierstevens.wordpress.com/2855/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/didierstevens.wordpress.com/2855/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/didierstevens.wordpress.com/2855/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/didierstevens.wordpress.com/2855/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/didierstevens.wordpress.com/2855/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/didierstevens.wordpress.com/2855/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/didierstevens.wordpress.com/2855/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/didierstevens.wordpress.com/2855/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/didierstevens.wordpress.com/2855/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/didierstevens.wordpress.com/2855/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/didierstevens.wordpress.com/2855/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/didierstevens.wordpress.com/2855/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/didierstevens.wordpress.com/2855/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.didierstevens.com&amp;blog=264765&amp;post=2855&amp;subd=didierstevens&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.didierstevens.com/2011/10/18/heaplocker-preventing-heapsprays/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">didierstevens</media:title>
		</media:content>
	</item>
		<item>
		<title>Add Bottom Up Randomization To (Your Own) Source Code</title>
		<link>http://blog.didierstevens.com/2011/09/29/add-bottom-up-randomization-to-your-own-source-code/</link>
		<comments>http://blog.didierstevens.com/2011/09/29/add-bottom-up-randomization-to-your-own-source-code/#comments</comments>
		<pubDate>Thu, 29 Sep 2011 19:14:27 +0000</pubDate>
		<dc:creator>Didier Stevens</dc:creator>
				<category><![CDATA[Vulnerabilities]]></category>
		<category><![CDATA[Windows 7]]></category>
		<category><![CDATA[Windows Vista]]></category>

		<guid isPermaLink="false">http://blog.didierstevens.com/?p=2801</guid>
		<description><![CDATA[EMET&#8217;s new Bottom Up Randomization spectacularly increased the entropy of DLL&#8217;s base addresses loaded into my test program. Instead of 15 different addresses, I had more than 200. Matt Miller told me how he implemented Bottom Up Randomization: &#8220;It works by reserving a random number (between [0,256]) of 64K regions via VirtualAlloc. This has the [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.didierstevens.com&amp;blog=264765&amp;post=2801&amp;subd=didierstevens&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>EMET&#8217;s new Bottom Up Randomization <a href="http://blog.didierstevens.com/2011/09/01/bottom-up-randomization-saves-mandatory-aslr/">spectacularly increased the entropy of DLL&#8217;s base addresses</a> loaded into my test program. Instead of 15 different addresses, I had more than 200.</p>
<p>Matt Miller told me how he implemented Bottom Up Randomization:</p>
<blockquote><p>&#8220;It works by reserving a random number (between [0,256]) of 64K regions via VirtualAlloc. This has the effect of consuming a small portion of the bottom part of the address space. Since the Windows kernel assigns base addresses for collided DLLs by searching for a free region starting at the bottom of the address space, bottom up randomization ensures that a random base address will be assigned. Without bottom up randomization the bottom part of the address space remains fairly static (with some exceptions, such as due to heap, stack, and EXE randomization).&#8221;</p></blockquote>
<p>So I decided to add this algorithm at the start of my test program:</p>
<p><pre class="brush: cpp;">
int iIter;
int iRand;

srand(time(NULL));
iRand = rand() % 256 + 1;
for (iIter = 0; iIter &lt; iRand; iIter++)
 VirtualAlloc(NULL, 64*1024, MEM_COMMIT | MEM_RESERVE, PAGE_NOACCESS);
</pre></p>
<p>Again, the result is spectacular. In stead of 15 base addresses, with the most frequent address being using 30% of the time, my Bottom Up Randomization implementation gives me more than 300 addresses after 150.000 runs. And there&#8217;s no single address being used more than 0,5% of the time.</p>
<p>From now on, I&#8217;m going to include this in my programs, and I advise you to do the same with your programs. Or to open source programs you use.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/didierstevens.wordpress.com/2801/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/didierstevens.wordpress.com/2801/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/didierstevens.wordpress.com/2801/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/didierstevens.wordpress.com/2801/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/didierstevens.wordpress.com/2801/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/didierstevens.wordpress.com/2801/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/didierstevens.wordpress.com/2801/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/didierstevens.wordpress.com/2801/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/didierstevens.wordpress.com/2801/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/didierstevens.wordpress.com/2801/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/didierstevens.wordpress.com/2801/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/didierstevens.wordpress.com/2801/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/didierstevens.wordpress.com/2801/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/didierstevens.wordpress.com/2801/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.didierstevens.com&amp;blog=264765&amp;post=2801&amp;subd=didierstevens&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.didierstevens.com/2011/09/29/add-bottom-up-randomization-to-your-own-source-code/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">didierstevens</media:title>
		</media:content>
	</item>
		<item>
		<title>Bottom Up Randomization Saves Mandatory ASLR</title>
		<link>http://blog.didierstevens.com/2011/09/01/bottom-up-randomization-saves-mandatory-aslr/</link>
		<comments>http://blog.didierstevens.com/2011/09/01/bottom-up-randomization-saves-mandatory-aslr/#comments</comments>
		<pubDate>Thu, 01 Sep 2011 17:32:20 +0000</pubDate>
		<dc:creator>Didier Stevens</dc:creator>
				<category><![CDATA[Vulnerabilities]]></category>
		<category><![CDATA[Windows 7]]></category>
		<category><![CDATA[Windows Vista]]></category>

		<guid isPermaLink="false">http://blog.didierstevens.com/?p=2766</guid>
		<description><![CDATA[I recently found out that pseudo-ASLR (or mandatory ASLR in EMET) has a lower entropy than real ASLR. While real ASLR has a 8-bit entropy for base addresses, mandatory ASLR turned out only to have about 4 bits of entropy, and the distribution was far from uniform. What I forgot to tell you in that [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.didierstevens.com&amp;blog=264765&amp;post=2766&amp;subd=didierstevens&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I recently found out that <a href="http://blog.didierstevens.com/2011/08/16/so-how-good-is-pseudo-aslr/">pseudo-ASLR (or mandatory ASLR in EMET) has a lower entropy than real ASLR</a>. While real ASLR has a 8-bit entropy for base addresses, mandatory ASLR turned out only to have about 4 bits of entropy, and the distribution was far from uniform. What I forgot to tell you in that post, is that I just enabled Mandatory ASLR as mitigation in EMET, and nothing else:</p>
<p><img class="alignnone size-full wp-image-2768" title="20110830-231038" src="http://didierstevens.files.wordpress.com/2011/09/20110830-231038.png" alt="" width="533" height="211" /></p>
<p>Matt Miller told me that a new feature of EMET version 2.1, Bottom Up Randomization, would greatly improve the entropy of mandatory ASLR.</p>
<p><img class="alignnone size-full wp-image-2769" title="20110830-231116" src="http://didierstevens.files.wordpress.com/2011/09/20110830-231116.png" alt="" width="533" height="211" /></p>
<p>The results are spectacular. When I let my test program run around 500,000 times, I get almost 200 different base addresses. And the distribution is more uniform too, no address appears more frequently than 3% of the time.</p>
<p><img class="alignnone size-full wp-image-2770" title="20110901-192411" src="http://didierstevens.files.wordpress.com/2011/09/20110901-192411.png" alt="" width="628" height="387" /></p>
<p>To get decent protection from mandatory ASLR, be sure to use the latest version of EMET (2.1) and enable Bottom Up Randomization. This gives you the same entropy than real ASLR, with the added bonus that the base address will change each time the application is started, compared to real ASLR which requires a reboot.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/didierstevens.wordpress.com/2766/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/didierstevens.wordpress.com/2766/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/didierstevens.wordpress.com/2766/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/didierstevens.wordpress.com/2766/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/didierstevens.wordpress.com/2766/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/didierstevens.wordpress.com/2766/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/didierstevens.wordpress.com/2766/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/didierstevens.wordpress.com/2766/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/didierstevens.wordpress.com/2766/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/didierstevens.wordpress.com/2766/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/didierstevens.wordpress.com/2766/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/didierstevens.wordpress.com/2766/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/didierstevens.wordpress.com/2766/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/didierstevens.wordpress.com/2766/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.didierstevens.com&amp;blog=264765&amp;post=2766&amp;subd=didierstevens&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.didierstevens.com/2011/09/01/bottom-up-randomization-saves-mandatory-aslr/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">didierstevens</media:title>
		</media:content>

		<media:content url="http://didierstevens.files.wordpress.com/2011/09/20110830-231038.png" medium="image">
			<media:title type="html">20110830-231038</media:title>
		</media:content>

		<media:content url="http://didierstevens.files.wordpress.com/2011/09/20110830-231116.png" medium="image">
			<media:title type="html">20110830-231116</media:title>
		</media:content>

		<media:content url="http://didierstevens.files.wordpress.com/2011/09/20110901-192411.png" medium="image">
			<media:title type="html">20110901-192411</media:title>
		</media:content>
	</item>
		<item>
		<title>So How Good is Pseudo-ASLR?</title>
		<link>http://blog.didierstevens.com/2011/08/16/so-how-good-is-pseudo-aslr/</link>
		<comments>http://blog.didierstevens.com/2011/08/16/so-how-good-is-pseudo-aslr/#comments</comments>
		<pubDate>Tue, 16 Aug 2011 00:29:56 +0000</pubDate>
		<dc:creator>Didier Stevens</dc:creator>
				<category><![CDATA[Vulnerabilities]]></category>
		<category><![CDATA[Windows 7]]></category>
		<category><![CDATA[Windows Vista]]></category>

		<guid isPermaLink="false">http://blog.didierstevens.com/?p=2749</guid>
		<description><![CDATA[Let me first define what I mean with pseudo-ASLR. Address Space Layout Randomization (introduced in Windows Vista) loads executable files at different memory addresses. Studies have shown that ASLR uses 256 different base addresses and that the distribution is pretty uniform. Pseudo-ASLR is what EMET and my tool SE_ASLR enforce. When a DLL does not [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.didierstevens.com&amp;blog=264765&amp;post=2749&amp;subd=didierstevens&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Let me first define what I mean with pseudo-ASLR. <a href="https://secure.wikimedia.org/wikipedia/en/wiki/Address_space_layout_randomization">Address Space Layout Randomization</a> (introduced in Windows Vista) loads executable files at different memory addresses. Studies have shown that ASLR uses 256 different base addresses and that the distribution is pretty uniform.</p>
<p>Pseudo-ASLR is what <a href="http://support.microsoft.com/kb/2458544">EMET</a> and my <a href="http://blog.didierstevens.com/2011/08/10/force-aslr-on-shell-extensions/">tool SE_ASLR</a> enforce. When a DLL does not support ASLR, memory at the base address of this DLL is allocated right before the DLL is loaded into the process. Since the address is not free, the image loader will load the DLL at a different address, thereby « randomizing » the base address. But how good is this randomization?</p>
<p>As I pointed out in my <a href="http://blog.didierstevens.com/2011/06/13/emet-article/">article on EMET</a>, this base address is different each time a new process is started (unlike ASLR which needs a reboot for the base address to change). So maybe this is better ?</p>
<p>I developed a test program that loads a DLL but pre-allocates memory at the address of the DLL before loading. Then I ran that program thousands of times on a Windows 7 32-bit machine.</p>
<p>Running this program about 50.000 times gives me 68 different addresses. That’s by far not as good as 256 with ASLR. But what’s more important, is that the distribution of these addresses is not uniform at all:</p>
<p><img class="alignnone size-full wp-image-2750" title="20110810-080701" src="http://didierstevens.files.wordpress.com/2011/08/20110810-080701.png" alt="" width="749" height="466" /></p>
<p>There’s one address (0x000E0000 in my test) that is used 30% of the time. 2 other addresses are used 10% of the time. Rebooting the machine does not change this distribution.</p>
<p>When I do the same test, but enforce ASLR with EMET, I get a similar result:</p>
<p><img class="alignnone size-full wp-image-2756" title="20110811-212541" src="http://didierstevens.files.wordpress.com/2011/08/20110811-212541.png" alt="" width="749" height="466" /></p>
<p>Again there&#8217;s an address that is selected 30% of the time, but it&#8217;s different from my previous test. Rebooting the Windows 7 machine doesn&#8217;t change the address.</p>
<p>In this test, EMET uses only 15 different addresses, compared to the 68 addresses in the first test. I&#8217;ll have to research this difference, I&#8217;ve no explanation for it.</p>
<p>Conclusion from this simple test: pseudo-ASLR is rather weak, because I can predict the base address and I will be right one time out of three, which is not bad at all when I can launch my attack several times.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/didierstevens.wordpress.com/2749/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/didierstevens.wordpress.com/2749/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/didierstevens.wordpress.com/2749/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/didierstevens.wordpress.com/2749/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/didierstevens.wordpress.com/2749/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/didierstevens.wordpress.com/2749/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/didierstevens.wordpress.com/2749/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/didierstevens.wordpress.com/2749/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/didierstevens.wordpress.com/2749/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/didierstevens.wordpress.com/2749/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/didierstevens.wordpress.com/2749/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/didierstevens.wordpress.com/2749/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/didierstevens.wordpress.com/2749/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/didierstevens.wordpress.com/2749/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.didierstevens.com&amp;blog=264765&amp;post=2749&amp;subd=didierstevens&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.didierstevens.com/2011/08/16/so-how-good-is-pseudo-aslr/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">didierstevens</media:title>
		</media:content>

		<media:content url="http://didierstevens.files.wordpress.com/2011/08/20110810-080701.png" medium="image">
			<media:title type="html">20110810-080701</media:title>
		</media:content>

		<media:content url="http://didierstevens.files.wordpress.com/2011/08/20110811-212541.png" medium="image">
			<media:title type="html">20110811-212541</media:title>
		</media:content>
	</item>
		<item>
		<title>Force &#8220;ASLR&#8221; on Shell Extensions</title>
		<link>http://blog.didierstevens.com/2011/08/10/force-aslr-on-shell-extensions/</link>
		<comments>http://blog.didierstevens.com/2011/08/10/force-aslr-on-shell-extensions/#comments</comments>
		<pubDate>Wed, 10 Aug 2011 00:49:41 +0000</pubDate>
		<dc:creator>Didier Stevens</dc:creator>
				<category><![CDATA[My Software]]></category>
		<category><![CDATA[Vulnerabilities]]></category>

		<guid isPermaLink="false">http://blog.didierstevens.com/?p=2736</guid>
		<description><![CDATA[I&#8217;ve written about Shell Extension without ASLR support before. Not only do they open up explorer.exe to ROP attacks, but other applications too, like Adobe Reader and Microsoft Office. You could use EMET to force ASLR on these DLLs, assuming you know which applications load shell extensions. Because shell extensions are not only loaded into [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.didierstevens.com&amp;blog=264765&amp;post=2736&amp;subd=didierstevens&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve written about <a href="http://blog.didierstevens.com/2011/01/17/quickpost-it-does-no-harm-or-does-it/">Shell Extension without ASLR support</a> before.</p>
<p>Not only do they open up explorer.exe to ROP attacks, but other applications too, like Adobe Reader and Microsoft Office.</p>
<p>You could use EMET to force ASLR on these DLLs, assuming you know which applications load shell extensions. Because shell extensions are not only loaded into explorer.exe, but other programs too, I wrote a tool to force Shell Extension DLLs to load at another address than their base address, effectively simulating ASLR.</p>
<p>When my tool, SE_ASLR.dll, is loaded into a process, it will check for the presence of comdlg32.dll inside the list of loaded modules. When <a href="http://msdn.microsoft.com/en-us/library/ms645524%28VS.85%29.aspx">comdlg32.dll</a> is used by an application, the likelihood of shell extensions being loaded into the process by user interaction with the file dialogs is significant.</p>
<p>Hence SE_ASLR will patch the IAT to intercept calls to LdrLoadDll. Each time the application loads a DLL (all DLLs, not only shell extension), SE_ASLR will check if the DLL supports ASLR. If it doesn&#8217;t, SE_ASLR will pre-allocate a memory page at the base address of the DLL, thereby forcing the loader to load the DLL at another address.</p>
<p>Although SE_ASLR&#8217;s primary goal is to relocate shell extensions, it will effectively relocate all DLLs without ASLR support once SE_ASLR is loaded into the process.</p>
<p>You need to load my tool into all applications that could use shell extension, for example via the <a href="http://support.microsoft.com/kb/197571">AppInit_DLLs registry key</a>. But before you do, be sure to test this out on a test machine. Not all shell extensions support relocation.</p>
<p><img class="alignnone size-full wp-image-2745" title="20110809-234345" src="http://didierstevens.files.wordpress.com/2011/08/20110809-234345.png" alt="" width="1024" height="162" /></p>
<p><img class="alignnone size-full wp-image-2746" title="20110809-234714" src="http://didierstevens.files.wordpress.com/2011/08/20110809-234714.png" alt="" width="1024" height="298" /></p>
<p><a href="http://didierstevens.com/files/software/SE_ASLR_V0_0_0_1.zip" target="_self">SE_ASLR_V0_0_0_1.zip</a> (<a href="https://didierstevens.com/files/software/SE_ASLR_V0_0_0_1.zip" target="_self">https</a>)<br />
MD5: 9D6AE1A96D554AEE527EB802FE59FB20<br />
SHA256: 8A6C1406A757CD9788A2630D76A497E2C058333EE4D44CA0B85B2A05A39F257E</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/didierstevens.wordpress.com/2736/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/didierstevens.wordpress.com/2736/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/didierstevens.wordpress.com/2736/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/didierstevens.wordpress.com/2736/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/didierstevens.wordpress.com/2736/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/didierstevens.wordpress.com/2736/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/didierstevens.wordpress.com/2736/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/didierstevens.wordpress.com/2736/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/didierstevens.wordpress.com/2736/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/didierstevens.wordpress.com/2736/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/didierstevens.wordpress.com/2736/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/didierstevens.wordpress.com/2736/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/didierstevens.wordpress.com/2736/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/didierstevens.wordpress.com/2736/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.didierstevens.com&amp;blog=264765&amp;post=2736&amp;subd=didierstevens&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.didierstevens.com/2011/08/10/force-aslr-on-shell-extensions/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">didierstevens</media:title>
		</media:content>

		<media:content url="http://didierstevens.files.wordpress.com/2011/08/20110809-234345.png" medium="image">
			<media:title type="html">20110809-234345</media:title>
		</media:content>

		<media:content url="http://didierstevens.files.wordpress.com/2011/08/20110809-234714.png" medium="image">
			<media:title type="html">20110809-234714</media:title>
		</media:content>
	</item>
		<item>
		<title>Quickpost: Need a PoC to Test Your Security Setup? Not Necessarily&#8230;</title>
		<link>http://blog.didierstevens.com/2011/06/22/quickpost-need-a-poc-to-test-your-security-setup-not-necessarily/</link>
		<comments>http://blog.didierstevens.com/2011/06/22/quickpost-need-a-poc-to-test-your-security-setup-not-necessarily/#comments</comments>
		<pubDate>Wed, 22 Jun 2011 13:30:42 +0000</pubDate>
		<dc:creator>Didier Stevens</dc:creator>
				<category><![CDATA[Quickpost]]></category>
		<category><![CDATA[Vulnerabilities]]></category>

		<guid isPermaLink="false">http://blog.didierstevens.com/?p=2698</guid>
		<description><![CDATA[People regularly ask me for a PoC (PDF or other type) to test their security setup. For example, they sandboxed Adobe Reader and now they want to test that Adobe Reader can&#8217;t write to sensitive Windows directories like system32. Well, you don&#8217;t need a PoC to test your setup in this way. Just develop and [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.didierstevens.com&amp;blog=264765&amp;post=2698&amp;subd=didierstevens&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>People regularly ask me for a PoC (PDF or other type) to test their security setup. For example, they sandboxed Adobe Reader and now they want to test that Adobe Reader can&#8217;t write to sensitive Windows directories like system32.</p>
<p>Well, you don&#8217;t need a PoC to test your setup in this way. Just develop and compile a DLL that writes to system32, and inject it in the target process.</p>
<p>The problem however, is that not everybody has the skills to develop and compile such a DLL. But almost everybody can write a VBScript that accomplishes the same. Here&#8217;s a one-liner that creates test.txt in system32:</p>
<p>
CreateObject(&quot;Scripting.FileSystemObject&quot;).CreateTextFile(&quot;c:\windows\system32\test.txt&quot;)
</p>
<p>But how do you get the target process to execute this script? That is something I worked out 2 years ago: <a href="http://blog.didierstevens.com/2009/06/25/bpmtk-injecting-vbscript/" rel="bookmark">bpmtk: Injecting VBScript</a>. In a nutshell: I developed a DLL that once injected into a process, instantiates a VBScript engine and executes the provided script.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/didierstevens.wordpress.com/2698/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/didierstevens.wordpress.com/2698/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/didierstevens.wordpress.com/2698/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/didierstevens.wordpress.com/2698/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/didierstevens.wordpress.com/2698/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/didierstevens.wordpress.com/2698/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/didierstevens.wordpress.com/2698/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/didierstevens.wordpress.com/2698/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/didierstevens.wordpress.com/2698/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/didierstevens.wordpress.com/2698/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/didierstevens.wordpress.com/2698/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/didierstevens.wordpress.com/2698/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/didierstevens.wordpress.com/2698/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/didierstevens.wordpress.com/2698/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.didierstevens.com&amp;blog=264765&amp;post=2698&amp;subd=didierstevens&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.didierstevens.com/2011/06/22/quickpost-need-a-poc-to-test-your-security-setup-not-necessarily/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">didierstevens</media:title>
		</media:content>
	</item>
		<item>
		<title>EMET Article</title>
		<link>http://blog.didierstevens.com/2011/06/13/emet-article/</link>
		<comments>http://blog.didierstevens.com/2011/06/13/emet-article/#comments</comments>
		<pubDate>Mon, 13 Jun 2011 00:00:08 +0000</pubDate>
		<dc:creator>Didier Stevens</dc:creator>
				<category><![CDATA[Vulnerabilities]]></category>

		<guid isPermaLink="false">http://blog.didierstevens.com/?p=2686</guid>
		<description><![CDATA[(IN)SECURE Magazine published my article on Microsoft&#8217;s Enhanced Mitigation Experience Toolkit. It contains many details I&#8217;ve yet to discuss on this blog. &#160;<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.didierstevens.com&amp;blog=264765&amp;post=2686&amp;subd=didierstevens&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.net-security.org/insecuremag.php">(IN)SECURE Magazine</a> published my article on Microsoft&#8217;s Enhanced Mitigation Experience Toolkit.</p>
<p><img class="alignnone" src="http://www.net-security.org/images/insecure/issues/issue30.jpg" alt="" width="200" height="283" /></p>
<p>It contains many details I&#8217;ve yet to discuss on this blog.</p>
<p>&nbsp;</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/didierstevens.wordpress.com/2686/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/didierstevens.wordpress.com/2686/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/didierstevens.wordpress.com/2686/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/didierstevens.wordpress.com/2686/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/didierstevens.wordpress.com/2686/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/didierstevens.wordpress.com/2686/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/didierstevens.wordpress.com/2686/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/didierstevens.wordpress.com/2686/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/didierstevens.wordpress.com/2686/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/didierstevens.wordpress.com/2686/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/didierstevens.wordpress.com/2686/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/didierstevens.wordpress.com/2686/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/didierstevens.wordpress.com/2686/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/didierstevens.wordpress.com/2686/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.didierstevens.com&amp;blog=264765&amp;post=2686&amp;subd=didierstevens&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.didierstevens.com/2011/06/13/emet-article/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">didierstevens</media:title>
		</media:content>

		<media:content url="http://www.net-security.org/images/insecure/issues/issue30.jpg" medium="image" />
	</item>
		<item>
		<title>HeapLocker: Null Page Allocation</title>
		<link>http://blog.didierstevens.com/2011/03/14/heaplocker-null-page-allocation/</link>
		<comments>http://blog.didierstevens.com/2011/03/14/heaplocker-null-page-allocation/#comments</comments>
		<pubDate>Mon, 14 Mar 2011 05:03:50 +0000</pubDate>
		<dc:creator>Didier Stevens</dc:creator>
				<category><![CDATA[My Software]]></category>
		<category><![CDATA[Vulnerabilities]]></category>

		<guid isPermaLink="false">http://blog.didierstevens.com/?p=2613</guid>
		<description><![CDATA[Just like EMET, HeapLocker can allocate a page at address 0 (null or 0&#215;00000000) to mitigate null pointer dereferencing. I actually implemented this code in HeapLocker because I wanted to find out how one can allocate a page at address 0. You see, when you call VirtualAlloc with address 0, VirtualAlloc will allocate a page [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.didierstevens.com&amp;blog=264765&amp;post=2613&amp;subd=didierstevens&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Just like EMET, <a href="http://blog.didierstevens.com/programs/heaplocker/">HeapLocker</a> can allocate a page at address 0 (null or 0&#215;00000000) to mitigate null pointer dereferencing.</p>
<p>I actually implemented this code in HeapLocker because I wanted to find out how one can allocate a page at address 0. You see, when you call VirtualAlloc with address 0, VirtualAlloc will allocate a page at an address chosen by VirtualAlloc, and not at address 0. So I would think that the trick is to call VirtualAlloc with address 1, and that VirtualAlloc will allocate a page that contains address 1, and that this page must start at boundary 0.</p>
<p>But the problem is that you get an error when you try to allocate a page at address 1 with VirtualAlloc. Ivanlef0u explains this in his <a href="http://www.ivanlef0u.tuxfamily.org/?p=355">blogpost</a> (French). VirtualAlloc rejects addresses inferior to 0&#215;1000, one must use NtAllocateVirtualMemory to successfully allocate address 1.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/didierstevens.wordpress.com/2613/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/didierstevens.wordpress.com/2613/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/didierstevens.wordpress.com/2613/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/didierstevens.wordpress.com/2613/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/didierstevens.wordpress.com/2613/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/didierstevens.wordpress.com/2613/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/didierstevens.wordpress.com/2613/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/didierstevens.wordpress.com/2613/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/didierstevens.wordpress.com/2613/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/didierstevens.wordpress.com/2613/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/didierstevens.wordpress.com/2613/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/didierstevens.wordpress.com/2613/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/didierstevens.wordpress.com/2613/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/didierstevens.wordpress.com/2613/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.didierstevens.com&amp;blog=264765&amp;post=2613&amp;subd=didierstevens&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.didierstevens.com/2011/03/14/heaplocker-null-page-allocation/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">didierstevens</media:title>
		</media:content>
	</item>
		<item>
		<title>HeapLocker: String Detection</title>
		<link>http://blog.didierstevens.com/2011/02/18/heaplocker-string-detection/</link>
		<comments>http://blog.didierstevens.com/2011/02/18/heaplocker-string-detection/#comments</comments>
		<pubDate>Fri, 18 Feb 2011 12:43:55 +0000</pubDate>
		<dc:creator>Didier Stevens</dc:creator>
				<category><![CDATA[My Software]]></category>
		<category><![CDATA[Vulnerabilities]]></category>

		<guid isPermaLink="false">http://blog.didierstevens.com/?p=2594</guid>
		<description><![CDATA[A third protection technique I implemented in HeapLocker is string detection. When you enable string monitoring, HeapLocker will create a new thread to periodically check (every second) newly committed virtual pages that are readable and writable. When a specific string (configured in the registry) is detected inside these pages, HeapLocker will suspend all threads (except [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.didierstevens.com&amp;blog=264765&amp;post=2594&amp;subd=didierstevens&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>A third protection technique I implemented in <a href="http://blog.didierstevens.com/programs/heaplocker/">HeapLocker</a> is string detection.</p>
<p>When you enable string monitoring, HeapLocker will create a new thread to periodically check (every second) newly committed virtual pages that are readable and writable. When a specific string (configured in the registry) is detected inside these pages, HeapLocker will suspend all threads (except this monitoring thread used by HeapLocker) and warn the user that the string was detected.</p>
<p><img class="alignnone size-full wp-image-2474" title="20101205-152906" src="http://didierstevens.files.wordpress.com/2010/12/20101205-152906.png" alt="" width="459" height="188" /></p>
<p>I&#8217;ve had very good result with this technique searching for string &#8220;unescape&#8221; in Adobe Reader (the string &#8220;unescape&#8221; must be preceded by an equal sign or followed by a left parentheses). Almost all malicious PDF documents in my collection were detected by this. But like <a href="http://blog.didierstevens.com/2011/01/12/heaplocker-nop-sled-detection/">NOP-sled detection</a>, it&#8217;s not 100% reliable. Sometimes HeapLocker will scan a page before the string &#8220;unescape&#8221; has been written to that page.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/didierstevens.wordpress.com/2594/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/didierstevens.wordpress.com/2594/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/didierstevens.wordpress.com/2594/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/didierstevens.wordpress.com/2594/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/didierstevens.wordpress.com/2594/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/didierstevens.wordpress.com/2594/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/didierstevens.wordpress.com/2594/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/didierstevens.wordpress.com/2594/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/didierstevens.wordpress.com/2594/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/didierstevens.wordpress.com/2594/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/didierstevens.wordpress.com/2594/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/didierstevens.wordpress.com/2594/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/didierstevens.wordpress.com/2594/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/didierstevens.wordpress.com/2594/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.didierstevens.com&amp;blog=264765&amp;post=2594&amp;subd=didierstevens&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.didierstevens.com/2011/02/18/heaplocker-string-detection/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">didierstevens</media:title>
		</media:content>

		<media:content url="http://didierstevens.files.wordpress.com/2010/12/20101205-152906.png" medium="image">
			<media:title type="html">20101205-152906</media:title>
		</media:content>
	</item>
	</channel>
</rss>
