<?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; My Software</title>
	<atom:link href="http://blog.didierstevens.com/category/my-software/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.didierstevens.com</link>
	<description>(blog 'DidierStevens)</description>
	<lastBuildDate>Tue, 20 Jul 2010 07:13:09 +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://www.gravatar.com/blavatar/60bb50c97cd147341ffb43b0e2ef0d15?s=96&#038;d=http://s2.wp.com/i/buttonw-com.png</url>
		<title>Didier Stevens &#187; My Software</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>Mitigating .LNK Exploitation With Ariad</title>
		<link>http://blog.didierstevens.com/2010/07/18/mitigating-lnk-exploitation-with-ariad/</link>
		<comments>http://blog.didierstevens.com/2010/07/18/mitigating-lnk-exploitation-with-ariad/#comments</comments>
		<pubDate>Sun, 18 Jul 2010 13:42:15 +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=2210</guid>
		<description><![CDATA[Today I tested @Ivanlef0u &#8216;s .LNK PoC with my latest Ariad tool. I adapted the PoC to work on a CD-ROM for drive D. When you load the CD-ROM with the PoC (I use an ISO file inside a VM) and take a look at DbgView&#8217;s output, you&#8217;ll notice that payload gets executed: With Ariad [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.didierstevens.com&blog=264765&post=2210&subd=didierstevens&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<p>Today I tested <a href="http://twitter.com/Ivanlef0u/status/18798593581">@Ivanlef0u &#8216;s .LNK PoC</a> with my latest <a href="http://blog.didierstevens.com/programs/ariad">Ariad</a> tool.</p>
<p>I adapted the PoC to work on a CD-ROM for drive D. When you load the CD-ROM with the PoC (I use an ISO file inside a VM) and take a look at DbgView&#8217;s output, you&#8217;ll notice that payload gets executed:</p>
<p><img class="alignnone size-full wp-image-2211" title="20100718-150334" src="http://didierstevens.files.wordpress.com/2010/07/20100718-150334.png?w=656&#038;h=496" alt="" width="656" height="496" /></p>
<p>With Ariad installed on the machine in its default configuration (just block \autorun.inf), the PoC still works:</p>
<p><img class="alignnone size-full wp-image-2214" title="20100718-152236" src="http://didierstevens.files.wordpress.com/2010/07/20100718-152236.png?w=562&#038;h=292" alt="" width="562" height="292" /></p>
<p><img class="alignnone size-full wp-image-2216" title="20100718-152440" src="http://didierstevens.files.wordpress.com/2010/07/20100718-152440.png?w=656&#038;h=496" alt="" width="656" height="496" /></p>
<p>But configuring Ariad to block access to executables (this includes .LNK) prevents the PoC from executing:</p>
<p><img class="alignnone size-full wp-image-2217" title="20100718-152616" src="http://didierstevens.files.wordpress.com/2010/07/20100718-152616.png?w=562&#038;h=292" alt="" width="562" height="292" /><br />
<img class="alignnone size-full wp-image-2218" title="20100718-152745" src="http://didierstevens.files.wordpress.com/2010/07/20100718-152745.png?w=656&#038;h=496" alt="" width="656" height="496" /></p>
<p>Access to the .LNK file is denied, and Windows Explorer can&#8217;t start the payload.</p>
<p>And configuring Ariad to prevent files to be mapped in memory (this is <a href="http://en.wikipedia.org/wiki/Memory-mapped_file">something done by Windows with executables</a>) also prevents the PoC from executing:</p>
<p><img class="alignnone size-full wp-image-2220" title="20100718-152930" src="http://didierstevens.files.wordpress.com/2010/07/20100718-152930.png?w=562&#038;h=292" alt="" width="562" height="292" /><br />
<img class="alignnone size-full wp-image-2221" title="20100718-153042" src="http://didierstevens.files.wordpress.com/2010/07/20100718-153042.png?w=656&#038;h=496" alt="" width="656" height="496" /></p>
<p>This time, access to the .LNK file is not denied, but dll.dll is prevented from loading into memory, thus again preventing the payload from executing.</p>
<p>You can use Ariad if you want to mitigate <a href="http://www.microsoft.com/technet/security/advisory/2286198.mspx">attacks with these shortcut links</a> until Microsoft releases a patch. As it is expected that Microsoft will not release a patch for Windows XP SP2, Ariad can offer permanent mitigation.</p>
<p>Be sure to read <a href="http://blog.didierstevens.com/programs/ariad">Ariad</a>&#8216;s documentation before using it.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/didierstevens.wordpress.com/2210/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/didierstevens.wordpress.com/2210/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/didierstevens.wordpress.com/2210/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/didierstevens.wordpress.com/2210/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/didierstevens.wordpress.com/2210/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/didierstevens.wordpress.com/2210/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/didierstevens.wordpress.com/2210/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/didierstevens.wordpress.com/2210/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/didierstevens.wordpress.com/2210/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/didierstevens.wordpress.com/2210/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.didierstevens.com&blog=264765&post=2210&subd=didierstevens&ref=&feed=1" />]]></content:encoded>
			<wfw:commentRss>http://blog.didierstevens.com/2010/07/18/mitigating-lnk-exploitation-with-ariad/feed/</wfw:commentRss>
		<slash:comments>67</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/07/20100718-150334.png" medium="image">
			<media:title type="html">20100718-150334</media:title>
		</media:content>

		<media:content url="http://didierstevens.files.wordpress.com/2010/07/20100718-152236.png" medium="image">
			<media:title type="html">20100718-152236</media:title>
		</media:content>

		<media:content url="http://didierstevens.files.wordpress.com/2010/07/20100718-152440.png" medium="image">
			<media:title type="html">20100718-152440</media:title>
		</media:content>

		<media:content url="http://didierstevens.files.wordpress.com/2010/07/20100718-152616.png" medium="image">
			<media:title type="html">20100718-152616</media:title>
		</media:content>

		<media:content url="http://didierstevens.files.wordpress.com/2010/07/20100718-152745.png" medium="image">
			<media:title type="html">20100718-152745</media:title>
		</media:content>

		<media:content url="http://didierstevens.files.wordpress.com/2010/07/20100718-152930.png" medium="image">
			<media:title type="html">20100718-152930</media:title>
		</media:content>

		<media:content url="http://didierstevens.files.wordpress.com/2010/07/20100718-153042.png" medium="image">
			<media:title type="html">20100718-153042</media:title>
		</media:content>
	</item>
		<item>
		<title>The Hex Factor RE Challenge</title>
		<link>http://blog.didierstevens.com/2010/07/15/the-hex-factor-re-challenge/</link>
		<comments>http://blog.didierstevens.com/2010/07/15/the-hex-factor-re-challenge/#comments</comments>
		<pubDate>Thu, 15 Jul 2010 18:11:12 +0000</pubDate>
		<dc:creator>Didier Stevens</dc:creator>
				<category><![CDATA[My Software]]></category>

		<guid isPermaLink="false">http://blog.didierstevens.com/?p=2202</guid>
		<description><![CDATA[Last year for Brucon, I produced some reverse engineering challenges (and I&#8217;m producing new ones for this year&#8217;s edition). The Hex Factor blog posted the solution for level 300. The source code for the challenge can be downloaded here. It&#8217;s completely written in assembler, even the I/O routines. Here&#8217;s a trick I used to create [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.didierstevens.com&blog=264765&post=2202&subd=didierstevens&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<p>Last year for <a href="http://brucon.org">Brucon</a>, I produced some reverse engineering challenges (and I&#8217;m producing new ones for this year&#8217;s edition).</p>
<p>The <a href="http://blog.thehexfactor.org/2010/05/solutions-hex-factor-v2009-level-c300.html">Hex Factor blog posted</a> the solution for level 300.</p>
<p>The source code for the challenge can be downloaded <a href="http://didierstevens.com/files/software/re300.zip">here</a>. It&#8217;s completely written in assembler, even the I/O routines.</p>
<p>Here&#8217;s a trick I used to create your own EXE from assembler code, without any library:</p>
<p>A simple assembly program:</p>
<pre>    BITS 32

    ret</pre>
<p>Assemble with <a href="http://www.nasm.us/">nasm</a>: nasm -f win32 ret.asm -o ret.o</p>
<p>And link with <a href="http://www.mingw.org/">mingw32</a>&#8216;s linker: ld -s ret.o -o ret.exe</p>
<p>Result:</p>
<p><img class="alignnone size-full wp-image-2203" title="20100715-153327" src="http://didierstevens.files.wordpress.com/2010/07/20100715-153327.png?w=529&#038;h=296" alt="" width="529" height="296" /></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/didierstevens.wordpress.com/2202/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/didierstevens.wordpress.com/2202/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/didierstevens.wordpress.com/2202/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/didierstevens.wordpress.com/2202/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/didierstevens.wordpress.com/2202/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/didierstevens.wordpress.com/2202/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/didierstevens.wordpress.com/2202/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/didierstevens.wordpress.com/2202/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/didierstevens.wordpress.com/2202/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/didierstevens.wordpress.com/2202/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.didierstevens.com&blog=264765&post=2202&subd=didierstevens&ref=&feed=1" />]]></content:encoded>
			<wfw:commentRss>http://blog.didierstevens.com/2010/07/15/the-hex-factor-re-challenge/feed/</wfw:commentRss>
		<slash:comments>0</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/07/20100715-153327.png" medium="image">
			<media:title type="html">20100715-153327</media:title>
		</media:content>
	</item>
		<item>
		<title>Writing WIN32 Shellcode With a C-compiler</title>
		<link>http://blog.didierstevens.com/2010/05/04/writing-win32-shellcode-with-a-c-compiler/</link>
		<comments>http://blog.didierstevens.com/2010/05/04/writing-win32-shellcode-with-a-c-compiler/#comments</comments>
		<pubDate>Tue, 04 May 2010 10:17:10 +0000</pubDate>
		<dc:creator>Didier Stevens</dc:creator>
				<category><![CDATA[My Software]]></category>
		<category><![CDATA[Shellcode]]></category>

		<guid isPermaLink="false">http://blog.didierstevens.com/?p=2154</guid>
		<description><![CDATA[I wrote an article in Hakin9 magazine how to write shellcode with a C-compiler. People before me have worked out methods to do this; the advantage of my method is that you can debug your shellcode inside the Visual Studio IDE. The template can be found here.<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.didierstevens.com&blog=264765&post=2154&subd=didierstevens&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<p>I wrote an <a href="http://hakin9.org/magazine/1057-flash-memory-mobile-forensic">article in Hakin9 magazine</a> how to write shellcode with a C-compiler.</p>
<p>People before me have worked out methods to do this; the advantage of my method is that you can debug your shellcode inside the Visual Studio IDE.</p>
<p>The template can be found <a href="http://blog.didierstevens.com/programs/shellcode#ShellCodeWithaCCompiler">here</a>.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/didierstevens.wordpress.com/2154/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/didierstevens.wordpress.com/2154/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/didierstevens.wordpress.com/2154/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/didierstevens.wordpress.com/2154/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/didierstevens.wordpress.com/2154/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/didierstevens.wordpress.com/2154/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/didierstevens.wordpress.com/2154/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/didierstevens.wordpress.com/2154/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/didierstevens.wordpress.com/2154/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/didierstevens.wordpress.com/2154/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.didierstevens.com&blog=264765&post=2154&subd=didierstevens&ref=&feed=1" />]]></content:encoded>
			<wfw:commentRss>http://blog.didierstevens.com/2010/05/04/writing-win32-shellcode-with-a-c-compiler/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>Update: PDFiD Version 0.0.11 to Detect /Launch</title>
		<link>http://blog.didierstevens.com/2010/04/29/update-pdfid-version-0-0-11-to-detect-launch/</link>
		<comments>http://blog.didierstevens.com/2010/04/29/update-pdfid-version-0-0-11-to-detect-launch/#comments</comments>
		<pubDate>Thu, 29 Apr 2010 10:11:03 +0000</pubDate>
		<dc:creator>Didier Stevens</dc:creator>
				<category><![CDATA[My Software]]></category>
		<category><![CDATA[PDF]]></category>
		<category><![CDATA[Update]]></category>

		<guid isPermaLink="false">http://blog.didierstevens.com/?p=2144</guid>
		<description><![CDATA[Now that malicious PDFs using the /Launch action become more prevalent, I release a new PDFiD version to detect (and disarm) the /Launch action.<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.didierstevens.com&blog=264765&post=2144&subd=didierstevens&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<p>Now that malicious PDFs using the /Launch action become more prevalent, I release a new <a href="http://blog.didierstevens.com/programs/pdf-tools/#pdfid">PDFiD</a> version to detect (and disarm) the /Launch action.</p>
<p><img class="alignnone size-full wp-image-2146" title="20100428-215941" src="http://didierstevens.files.wordpress.com/2010/04/20100428-215941.png?w=240&#038;h=87" alt="" width="240" height="87" /></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/didierstevens.wordpress.com/2144/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/didierstevens.wordpress.com/2144/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/didierstevens.wordpress.com/2144/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/didierstevens.wordpress.com/2144/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/didierstevens.wordpress.com/2144/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/didierstevens.wordpress.com/2144/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/didierstevens.wordpress.com/2144/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/didierstevens.wordpress.com/2144/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/didierstevens.wordpress.com/2144/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/didierstevens.wordpress.com/2144/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.didierstevens.com&blog=264765&post=2144&subd=didierstevens&ref=&feed=1" />]]></content:encoded>
			<wfw:commentRss>http://blog.didierstevens.com/2010/04/29/update-pdfid-version-0-0-11-to-detect-launch/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/04/20100428-215941.png" medium="image">
			<media:title type="html">20100428-215941</media:title>
		</media:content>
	</item>
		<item>
		<title>Tweet Shellcode</title>
		<link>http://blog.didierstevens.com/2010/03/17/tweet-shellcode/</link>
		<comments>http://blog.didierstevens.com/2010/03/17/tweet-shellcode/#comments</comments>
		<pubDate>Wed, 17 Mar 2010 21:33:38 +0000</pubDate>
		<dc:creator>Didier Stevens</dc:creator>
				<category><![CDATA[My Software]]></category>
		<category><![CDATA[Shellcode]]></category>

		<guid isPermaLink="false">http://blog.didierstevens.com/?p=2088</guid>
		<description><![CDATA[As its name implies: shellcode to send a Twitter update.<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.didierstevens.com&blog=264765&post=2088&subd=didierstevens&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<p>As its name implies: <a href="http://blog.didierstevens.com/programs/shellcode#Tweet-Shellcode">shellcode to send a Twitter update</a>.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/didierstevens.wordpress.com/2088/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/didierstevens.wordpress.com/2088/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/didierstevens.wordpress.com/2088/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/didierstevens.wordpress.com/2088/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/didierstevens.wordpress.com/2088/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/didierstevens.wordpress.com/2088/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/didierstevens.wordpress.com/2088/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/didierstevens.wordpress.com/2088/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/didierstevens.wordpress.com/2088/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/didierstevens.wordpress.com/2088/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.didierstevens.com&blog=264765&post=2088&subd=didierstevens&ref=&feed=1" />]]></content:encoded>
			<wfw:commentRss>http://blog.didierstevens.com/2010/03/17/tweet-shellcode/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">didierstevens</media:title>
		</media:content>
	</item>
		<item>
		<title>Quickpost: NetworkMashup.xls</title>
		<link>http://blog.didierstevens.com/2010/03/01/quickpost-networkmashup-xls/</link>
		<comments>http://blog.didierstevens.com/2010/03/01/quickpost-networkmashup-xls/#comments</comments>
		<pubDate>Mon, 01 Mar 2010 06:11:11 +0000</pubDate>
		<dc:creator>Didier Stevens</dc:creator>
				<category><![CDATA[My Software]]></category>
		<category><![CDATA[Quickpost]]></category>

		<guid isPermaLink="false">http://blog.didierstevens.com/?p=2029</guid>
		<description><![CDATA[NetworkMashup.xls is a spreadsheet with VBA macros I scraped from the Internet to execute pings and name/address resolution from within Excel with WIN32 API calls. Not only is it handy when you need to do some network mapping in a restricted environment, but also if you&#8217;ve just a list of machines to monitor. The spreadsheet [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.didierstevens.com&blog=264765&post=2029&subd=didierstevens&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<p>NetworkMashup.xls is a spreadsheet with VBA macros I scraped from the Internet to execute pings and name/address resolution from within Excel with WIN32 API calls.</p>
<p>Not only is it handy when you need to do some network mapping in a restricted environment, but also if you&#8217;ve just a list of machines to monitor.</p>
<p>The spreadsheet contains several sheets. One sheet to perform a single ping:</p>
<p><img class="alignnone size-full wp-image-2030" title="20100228-144238" src="http://didierstevens.files.wordpress.com/2010/02/20100228-144238.png?w=601&#038;h=338" alt="" width="601" height="338" /></p>
<p>One sheet to ping/resolve a list:</p>
<p><img class="alignnone size-full wp-image-2031" title="20100228-144254" src="http://didierstevens.files.wordpress.com/2010/02/20100228-144254.png?w=601&#038;h=338" alt="" width="601" height="338" /></p>
<p>One sheet to list the IP addresses of the current machine:</p>
<p><img class="alignnone size-full wp-image-2033" title="20100228-144315" src="http://didierstevens.files.wordpress.com/2010/02/20100228-144315.png?w=601&#038;h=338" alt="" width="601" height="338" /></p>
<p>And last, a sheet with settings:</p>
<p><img class="alignnone size-full wp-image-2032" title="20100228-144332" src="http://didierstevens.files.wordpress.com/2010/02/20100228-144332.png?w=601&#038;h=338" alt="" width="601" height="338" /></p>
<p>Download <a href="http://didierstevens.com/files/software/NetworkMashup_V0_0_2.zip">here</a>.</p>
<hr /><a href="http://blog.didierstevens.com/2007/11/01/announcing-quickposts/">Quickpost info</a></p>
<hr />
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/didierstevens.wordpress.com/2029/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/didierstevens.wordpress.com/2029/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/didierstevens.wordpress.com/2029/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/didierstevens.wordpress.com/2029/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/didierstevens.wordpress.com/2029/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/didierstevens.wordpress.com/2029/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/didierstevens.wordpress.com/2029/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/didierstevens.wordpress.com/2029/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/didierstevens.wordpress.com/2029/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/didierstevens.wordpress.com/2029/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.didierstevens.com&blog=264765&post=2029&subd=didierstevens&ref=&feed=1" />]]></content:encoded>
			<wfw:commentRss>http://blog.didierstevens.com/2010/03/01/quickpost-networkmashup-xls/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://didierstevens.files.wordpress.com/2010/02/20100228-144238.png" medium="image">
			<media:title type="html">20100228-144238</media:title>
		</media:content>

		<media:content url="http://didierstevens.files.wordpress.com/2010/02/20100228-144254.png" medium="image">
			<media:title type="html">20100228-144254</media:title>
		</media:content>

		<media:content url="http://didierstevens.files.wordpress.com/2010/02/20100228-144315.png" medium="image">
			<media:title type="html">20100228-144315</media:title>
		</media:content>

		<media:content url="http://didierstevens.files.wordpress.com/2010/02/20100228-144332.png" medium="image">
			<media:title type="html">20100228-144332</media:title>
		</media:content>
	</item>
		<item>
		<title>Ping Shellcode</title>
		<link>http://blog.didierstevens.com/2010/02/22/ping-shellcode/</link>
		<comments>http://blog.didierstevens.com/2010/02/22/ping-shellcode/#comments</comments>
		<pubDate>Mon, 22 Feb 2010 10:26:24 +0000</pubDate>
		<dc:creator>Didier Stevens</dc:creator>
				<category><![CDATA[My Software]]></category>
		<category><![CDATA[Shellcode]]></category>

		<guid isPermaLink="false">http://blog.didierstevens.com/?p=2026</guid>
		<description><![CDATA[I&#8217;ve added 2 new assembly source files for shellcode to execute a ping. First one does a simple ping, second one does a ping with the computername and username in the ICMP packet data.<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.didierstevens.com&blog=264765&post=2026&subd=didierstevens&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve added 2 new assembly source files for <a href="http://blog.didierstevens.com/programs/shellcode#Ping-Shellcode">shellcode to execute a ping</a>.</p>
<p>First one does a simple ping, second one does a ping with the computername and username in the ICMP packet data.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/didierstevens.wordpress.com/2026/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/didierstevens.wordpress.com/2026/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/didierstevens.wordpress.com/2026/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/didierstevens.wordpress.com/2026/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/didierstevens.wordpress.com/2026/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/didierstevens.wordpress.com/2026/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/didierstevens.wordpress.com/2026/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/didierstevens.wordpress.com/2026/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/didierstevens.wordpress.com/2026/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/didierstevens.wordpress.com/2026/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.didierstevens.com&blog=264765&post=2026&subd=didierstevens&ref=&feed=1" />]]></content:encoded>
			<wfw:commentRss>http://blog.didierstevens.com/2010/02/22/ping-shellcode/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">didierstevens</media:title>
		</media:content>
	</item>
		<item>
		<title>MemoryLoadLibrary: From C Program to Shellcode</title>
		<link>http://blog.didierstevens.com/2010/02/16/memoryloadlibrary-from-c-program-to-shellcode/</link>
		<comments>http://blog.didierstevens.com/2010/02/16/memoryloadlibrary-from-c-program-to-shellcode/#comments</comments>
		<pubDate>Tue, 16 Feb 2010 00:40:06 +0000</pubDate>
		<dc:creator>Didier Stevens</dc:creator>
				<category><![CDATA[Hacking]]></category>
		<category><![CDATA[My Software]]></category>
		<category><![CDATA[Shellcode]]></category>

		<guid isPermaLink="false">http://blog.didierstevens.com/?p=1996</guid>
		<description><![CDATA[The DLL-loading shellcode I used in my cmd.xls spreadsheet was generated with a method I worked out to generate WIN32 shellcode with a C-compiler. You can find it on my new Shellcode page. With this release, I provide you with all the tools you need to build your own version of cmd.xls: take cmd.dll replace [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.didierstevens.com&blog=264765&post=1996&subd=didierstevens&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<p>The <a href="http://blog.didierstevens.com/2010/01/28/quickpost-shellcode-to-load-a-dll-from-memory/">DLL-loading shellcode</a> I used in my <a href="http://blog.didierstevens.com/2010/02/08/excel-with-cmd-dll-regedit-dll/">cmd.xls spreadsheet</a> was generated with a method I worked out to generate WIN32 shellcode with a C-compiler. You can find it on my <a href="http://blog.didierstevens.com/programs/shellcode/">new Shellcode page</a>.</p>
<p>With this release, I provide you with all the tools you need to build your own version of cmd.xls:</p>
<ul>
<li>take <a href="http://blog.didierstevens.com/2010/02/08/excel-with-cmd-dll-regedit-dll/">cmd.dll</a></li>
<li>replace the dll in <a href="http://blog.didierstevens.com/programs/shellcode#ShellCodeMemoryModule">ShellCodeMemoryModule.exe.bin</a> with cmd.dll</li>
<li>generate VBA code for this shellcode + DLL <a href="http://blog.didierstevens.com/2009/05/06/shellcode-2-vbscript/">with shellcode2vbscript.py</a></li>
<li>Copy this VBA code in a spreadsheet</li>
</ul>
<p><img class="alignnone size-full wp-image-2020" title="20100214-143837" src="http://didierstevens.files.wordpress.com/2010/02/20100214-143837.png?w=942&#038;h=471" alt="" width="942" height="471" /></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/didierstevens.wordpress.com/1996/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/didierstevens.wordpress.com/1996/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/didierstevens.wordpress.com/1996/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/didierstevens.wordpress.com/1996/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/didierstevens.wordpress.com/1996/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/didierstevens.wordpress.com/1996/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/didierstevens.wordpress.com/1996/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/didierstevens.wordpress.com/1996/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/didierstevens.wordpress.com/1996/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/didierstevens.wordpress.com/1996/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.didierstevens.com&blog=264765&post=1996&subd=didierstevens&ref=&feed=1" />]]></content:encoded>
			<wfw:commentRss>http://blog.didierstevens.com/2010/02/16/memoryloadlibrary-from-c-program-to-shellcode/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://didierstevens.files.wordpress.com/2010/02/20100214-143837.png" medium="image">
			<media:title type="html">20100214-143837</media:title>
		</media:content>
	</item>
		<item>
		<title>Excel with cmd.dll &amp; regedit.dll</title>
		<link>http://blog.didierstevens.com/2010/02/08/excel-with-cmd-dll-regedit-dll/</link>
		<comments>http://blog.didierstevens.com/2010/02/08/excel-with-cmd-dll-regedit-dll/#comments</comments>
		<pubDate>Mon, 08 Feb 2010 21:17:57 +0000</pubDate>
		<dc:creator>Didier Stevens</dc:creator>
				<category><![CDATA[Hacking]]></category>
		<category><![CDATA[My Software]]></category>

		<guid isPermaLink="false">http://blog.didierstevens.com/?p=1989</guid>
		<description><![CDATA[I modified the source code of ReactOS&#8216; cmd and regedit for the following trick: Let me summarize how I did this, as this is the combined result of several techniques I blogged about before. The Excel spreadsheet contains macros that use VirtualAlloc, WriteProcessMemory and CreateThread to &#8220;inject&#8221; shellcode (stored inside macros) into the Excel process [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.didierstevens.com&blog=264765&post=1989&subd=didierstevens&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<p>I modified the source code of <a href="http://en.wikipedia.org/wiki/ReactOS">ReactOS</a>&#8216; cmd and regedit for the following trick:</p>
<p><span style="text-align:center; display: block;"><a href="http://blog.didierstevens.com/2010/02/08/excel-with-cmd-dll-regedit-dll/"><img src="http://img.youtube.com/vi/kex2yO-xQvI/2.jpg" alt="" /></a></span></p>
<p>Let me summarize how I did this, as this is the combined result of several techniques I blogged about before.</p>
<ul>
<li>The Excel spreadsheet contains macros that use VirtualAlloc, WriteProcessMemory and CreateThread to &#8220;inject&#8221; shellcode (stored inside macros) into the Excel process itself. Details <a href="http://blog.didierstevens.com/2008/10/23/excel-exercises-in-style/">here</a> and source code <a href="http://blog.didierstevens.com/2009/05/06/shellcode-2-vbscript/">here</a>.</li>
<li>The <a href="http://blog.didierstevens.com/2010/01/28/quickpost-shellcode-to-load-a-dll-from-memory/">shellcode loads a DLL from memory into memory</a>.</li>
<li>I modified source code from ReactOS to <a href="http://blog.didierstevens.com/2010/02/04/cmd-dll/">transform cmd.exe into cmd.dll</a> and regedit into a dll.</li>
</ul>
<p>You can download regedit.dll <a href="http://www.didierstevens.com/files/software/regedit-dll_v0_0_1.zip">here</a> and the new version of cmd.dll with the DLL command <a href="http://www.didierstevens.com/files/software/cmd-dll_v0_0_2.zip">here</a>. The DLL command I added allows you to load a DLL with LoadLibrary or directly into memory (/m option). When loaded with LoadLibrary, the library will be unloaded with FreeLibrary unless you use option /k to keep it loaded.</p>
<p>The DLL command assumes that your DLLs execute via the DllMain entry-point when they get loaded.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/didierstevens.wordpress.com/1989/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/didierstevens.wordpress.com/1989/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/didierstevens.wordpress.com/1989/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/didierstevens.wordpress.com/1989/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/didierstevens.wordpress.com/1989/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/didierstevens.wordpress.com/1989/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/didierstevens.wordpress.com/1989/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/didierstevens.wordpress.com/1989/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/didierstevens.wordpress.com/1989/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/didierstevens.wordpress.com/1989/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.didierstevens.com&blog=264765&post=1989&subd=didierstevens&ref=&feed=1" />]]></content:encoded>
			<wfw:commentRss>http://blog.didierstevens.com/2010/02/08/excel-with-cmd-dll-regedit-dll/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">didierstevens</media:title>
		</media:content>

		<media:content url="http://img.youtube.com/vi/kex2yO-xQvI/2.jpg" medium="image" />
	</item>
		<item>
		<title>cmd.dll</title>
		<link>http://blog.didierstevens.com/2010/02/04/cmd-dll/</link>
		<comments>http://blog.didierstevens.com/2010/02/04/cmd-dll/#comments</comments>
		<pubDate>Thu, 04 Feb 2010 01:16:32 +0000</pubDate>
		<dc:creator>Didier Stevens</dc:creator>
				<category><![CDATA[Hacking]]></category>
		<category><![CDATA[My Software]]></category>

		<guid isPermaLink="false">http://blog.didierstevens.com/?p=1975</guid>
		<description><![CDATA[This is something I&#8217;ve wanted to do for some time: take a command interpreter and transform it from an EXE into a DLL. Why you ask? Well, because it&#8217;s a fun challenge But also because a DLL is loaded into a process. In a restricted environment, it can be injected into a legitimate process and [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.didierstevens.com&blog=264765&post=1975&subd=didierstevens&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<p>This is something I&#8217;ve wanted to do for some time: take a command interpreter and transform it from an EXE into a DLL.</p>
<p>Why you ask? Well, because it&#8217;s a fun challenge <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
<p>But also because a DLL is loaded into a process. In a restricted environment, it can be injected into a legitimate process and thus bypass the restriction mechanisms.</p>
<p>Metasploit&#8217;s Meterpreter is another example of a command interpreter in DLL form.</p>
<p>cmd.exe from Microsoft is closed source, but there is an open-source variant available from the <a href="http://en.wikipedia.org/wiki/ReactOS">ReactOS project</a>.</p>
<p>Compiling cmd.exe from ReactOS is simple: download the <a href="http://www.reactos.org/en/download.html">source-code</a> and the <a href="http://www.reactos.org/wiki/Build_Environment">ReactOS build environment</a>. Install it, start the build environment  and issue command <em>make cmd</em>. That&#8217;s all you need to do to compile cmd.exe (I used version 0.3.11).</p>
<p>Transforming the source code to generate a DLL in stead of an EXE is simple. You need to change 3 files.</p>
<p>Edit file cmd.rbuild and make these changes to the module element:</p>
<pre class="brush: xml;">
&lt;module name=&quot;cmd&quot; type=&quot;win32dll&quot; installbase=&quot;system32&quot; installname=&quot;cmd.dll&quot; unicode=&quot;yes&quot; crt=&quot;msvcrt&quot;&gt;
</pre>
<p>Because I want to use this DLL in GUI-processes without console, I need to create a console. Edit file cmd.c and add AllocConsole(); to function cmd_main:</p>
<pre class="brush: cpp;">
SetFileApisToOEM();
InputCodePage= 0;
OutputCodePage = 0;

AllocConsole();

hConsole = CreateFile(_T(&quot;CONOUT$&quot;), GENERIC_READ|GENERIC_WRITE,
 FILE_SHARE_READ|FILE_SHARE_WRITE, NULL,
 OPEN_EXISTING, 0, NULL);
</pre>
<p>And because a DLL has another entry-function than an EXE, edit file main.c and replace function main with function DllMain:</p>
<pre class="brush: cpp;">
#include &lt;precomp.h&gt;

INT WINAPI
DllMain(
 IN PVOID hInstanceDll,
 IN ULONG dwReason,
 IN PVOID reserved)
{
 switch (dwReason)
 {
 case DLL_PROCESS_ATTACH:
 cmd_main(0, NULL);
 break;

 case DLL_THREAD_ATTACH:
 break;

 case DLL_THREAD_DETACH:
 break;

 case DLL_PROCESS_DETACH:
 break;
 }

 return TRUE;
}
</pre>
<p>That&#8217;s it. Recompile with <em>make cmd</em> to generate cmd.dll</p>
<p>There are still some improvements we can make, but that&#8217;s for a later version: error messages are not displayed, exiting the shell terminates the host process, &#8230;</p>
<p>You can download the modified source files and compiled cmd.dll <a href="http://www.didierstevens.com/files/software/cmd-dll_v0_0_1.zip" target="_self">here</a>.</p>
<p>This is a screenshot of cmd.dll injected inside Excel with my <a href="http://blog.didierstevens.com/2010/01/28/quickpost-shellcode-to-load-a-dll-from-memory/">memory module shellcode</a>:</p>
<p><img class="alignnone size-full wp-image-1980" title="cmd-dll-01" src="http://didierstevens.files.wordpress.com/2010/02/cmd-dll-01.png?w=1024&#038;h=577" alt="" width="1024" height="577" /></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/didierstevens.wordpress.com/1975/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/didierstevens.wordpress.com/1975/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/didierstevens.wordpress.com/1975/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/didierstevens.wordpress.com/1975/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/didierstevens.wordpress.com/1975/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/didierstevens.wordpress.com/1975/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/didierstevens.wordpress.com/1975/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/didierstevens.wordpress.com/1975/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/didierstevens.wordpress.com/1975/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/didierstevens.wordpress.com/1975/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.didierstevens.com&blog=264765&post=1975&subd=didierstevens&ref=&feed=1" />]]></content:encoded>
			<wfw:commentRss>http://blog.didierstevens.com/2010/02/04/cmd-dll/feed/</wfw:commentRss>
		<slash:comments>6</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/02/cmd-dll-01.png" medium="image">
			<media:title type="html">cmd-dll-01</media:title>
		</media:content>
	</item>
	</channel>
</rss>