<?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</title>
	<atom:link href="http://blog.didierstevens.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.didierstevens.com</link>
	<description>(blog 'DidierStevens)</description>
	<lastBuildDate>Tue, 09 Mar 2010 00:00:15 +0000</lastBuildDate>
	<generator>http://wordpress.com/</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<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</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>Frisky Solitaire &#8211; Another Info Stealer</title>
		<link>http://blog.didierstevens.com/2010/03/09/frisky-solitaire-another-info-stealer/</link>
		<comments>http://blog.didierstevens.com/2010/03/09/frisky-solitaire-another-info-stealer/#comments</comments>
		<pubDate>Tue, 09 Mar 2010 00:00:15 +0000</pubDate>
		<dc:creator>Didier Stevens</dc:creator>
				<category><![CDATA[Forensics]]></category>
		<category><![CDATA[Malware]]></category>

		<guid isPermaLink="false">http://blog.didierstevens.com/?p=2072</guid>
		<description><![CDATA[Marcus Murray gave a great talk at TechEd Berlin 2009: &#8220;Hack-Proofing Your Clients Using Windows 7 Security&#8221;. In one of his demos, he showed a trojaned Excel spreadsheet. The spreadsheet was a simple text-based game, but it had a malicious component that executed surreptitiously while the game was played.
As I&#8217;ve done several hacks with Excel [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.didierstevens.com&blog=264765&post=2072&subd=didierstevens&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.truesec.com/en/consulting.htm#mm">Marcus Murray</a> gave a great talk at TechEd Berlin 2009: &#8220;Hack-Proofing Your Clients Using Windows 7 Security&#8221;. In one of his demos, he showed a trojaned Excel spreadsheet. The spreadsheet was a simple text-based game, but it had a malicious component that executed surreptitiously while the game was played.</p>
<p>As I&#8217;ve done several <a href="http://blog.didierstevens.com/2008/10/23/excel-exercises-in-style/">hacks with Excel macros</a> in the past, this made me realize that social engineering is a key element to get people to run macros from a spreadsheet of unknown origin.</p>
<p>Several people have asked me about de details of the vulnerability I exploited in my <a href="http://blog.didierstevens.com/2010/03/08/pdf-info-stealer-poc/">PDF Info Stealer PoC</a>. But that&#8217;s not important. It&#8217;s not about the exploit, it&#8217;s about the payload: the info stealer. As I&#8217;ve written in <a href="http://blog.didierstevens.com/2010/03/08/pdf-info-stealer-poc/">my previous post</a>, I don&#8217;t even need an exploit to get users to execute the info stealer. If I put the info stealer inside an Excel spreadsheet and social engineer the targeted users to execute the macros, I&#8217;ve achieved my goal without exploiting a software vulnerability.</p>
<p>I present you Frisky Solitaire:</p>
<p><img class="alignnone size-full wp-image-2073" title="XPPROSP3-2010-03-05-20-49-19" src="http://didierstevens.files.wordpress.com/2010/03/xpprosp3-2010-03-05-20-49-19.png?w=1024&#038;h=768" alt="" width="1024" height="768" /></p>
<p>Frisky solitaire is more compelling than text-based Excel games, because of the graphics. I took Solitaire from ReactOS, turned it into a DLL and embedded it with my <a href="http://blog.didierstevens.com/2010/02/16/memoryloadlibrary-from-c-program-to-shellcode/">memory loading shellcode</a> into Excel macros (the same technique as <a href="http://blog.didierstevens.com/2010/02/08/excel-with-cmd-dll-regedit-dll/">I developed for cmd.dll and regedit.dll</a>). I imagine that a simple game like Solitaire in Excel can go viral inside a company, when you know that many corporations disable standard Windows games on their desktops and Terminal Servers.</p>
<p>But in a crude attempt at social engineering the male population of a targeted company, I added an element of nudity to the game. The implied message of the game&#8217;s title is that winning games increases nudity. I know, I&#8217;m talking about basic instincts here, but it still does the trick&#8230;</p>
<p>So I imagine that this game can become popular with a large part of the male employees of a targeted company. And that they wouldn&#8217;t question the fact you have to execute Excel macros to play a game. Sounds plausible, no?</p>
<p>Of course, you guessed it: Frisky Solitaire is trojaned with an info stealer&#8230; No need to exploit a software vulnerability to steal info. Given that here too, everything is done in memory, detection is unlikely.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/didierstevens.wordpress.com/2072/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/didierstevens.wordpress.com/2072/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/didierstevens.wordpress.com/2072/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/didierstevens.wordpress.com/2072/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/didierstevens.wordpress.com/2072/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/didierstevens.wordpress.com/2072/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/didierstevens.wordpress.com/2072/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/didierstevens.wordpress.com/2072/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/didierstevens.wordpress.com/2072/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/didierstevens.wordpress.com/2072/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.didierstevens.com&blog=264765&post=2072&subd=didierstevens&ref=&feed=1" />]]></content:encoded>
			<wfw:commentRss>http://blog.didierstevens.com/2010/03/09/frisky-solitaire-another-info-stealer/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/03/xpprosp3-2010-03-05-20-49-19.png" medium="image">
			<media:title type="html">XPPROSP3-2010-03-05-20-49-19</media:title>
		</media:content>
	</item>
		<item>
		<title>PDF Info Stealer PoC</title>
		<link>http://blog.didierstevens.com/2010/03/08/pdf-info-stealer-poc/</link>
		<comments>http://blog.didierstevens.com/2010/03/08/pdf-info-stealer-poc/#comments</comments>
		<pubDate>Mon, 08 Mar 2010 00:00:00 +0000</pubDate>
		<dc:creator>Didier Stevens</dc:creator>
				<category><![CDATA[Forensics]]></category>
		<category><![CDATA[Malware]]></category>
		<category><![CDATA[PDF]]></category>

		<guid isPermaLink="false">http://blog.didierstevens.com/?p=2046</guid>
		<description><![CDATA[An info stealer is malware that steals credentials or files from its victims.
Info stealers don&#8217;t require admin rights to perform their task, and can be designed to evade or bypass AV, HIPS, DLP and other security software.
I helped out a friend testing his environment with a PoC PDF info stealer I designed (I will not [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.didierstevens.com&blog=264765&post=2046&subd=didierstevens&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<p>An info stealer is malware that steals credentials or files from its victims.</p>
<p>Info stealers don&#8217;t require admin rights to perform their task, and can be designed to evade or bypass AV, HIPS, DLP and other security software.</p>
<p>I helped out a friend testing his environment with a PoC PDF info stealer I designed (I will not publish it).</p>
<p><img class="alignnone size-full wp-image-2049" title="pdf-infostealer-1" src="http://didierstevens.files.wordpress.com/2010/03/pdf-infostealer-1.png?w=499&#038;h=231" alt="" width="499" height="231" /></p>
<p>This PDF document exploits a known vulnerability, and executes shellcode to load a DLL (embedded inside the PDF document) from memory into memory. This way, nothing gets written to disk (except the PDF file). The DLL searches the My Documents folder of the currect user for a file called budget.xls, and uploads it to <a href="http://pastebin.com/HXDu9Z8r">Pastebin.com</a>.</p>
<p><img class="alignnone size-full wp-image-2050" title="pdf-infostealer-2" src="http://didierstevens.files.wordpress.com/2010/03/pdf-infostealer-2.png?w=712&#038;h=349" alt="" width="712" height="349" /></p>
<p>My PDF info stealer was succesful: file budget.xls was posted to Pastebin.com</p>
<p>Preventing an info stealer from operating is not easy. The Windows operating system is designed to give user processes unrestricted access to the user&#8217;s data. It&#8217;s only starting with the Windows Vista kernel and <a href="http://en.wikipedia.org/wiki/Mandatory_Integrity_Control">Windows Integrity Control</a> that a process can be assigned a lower level than user data and be restricted from accessing it. Lowering the Integrity Level of Acrobat Reader will help us in this case, but if I exploit an Excel vulnerability (or just use macros, without exploiting a vulnerability), the integrity levels will not protect us.</p>
<p>Neither is preventing data egress easy. OK, you can decide to block Pastebin.com. But can you block all sites that can be posted to? Like <a href="http://blog.didierstevens.com/2008/03/31/hiding-inside-wikipedia/">Wikipedia</a>? And if you can, do you block <a href="http://blog.didierstevens.com/2010/02/22/ping-shellcode/">ICMP packets</a>?</p>
<p>To protect confidential data, don&#8217;t let it be accessed by systems with Internet access. That&#8217;s not very practical, but it&#8217;s reliable. Or use strong encryption with strong passwords (not the default RC4 Excel encryption). The info stealer will have the <a href="http://blog.didierstevens.com/2008/12/09/updates-bpmtk-and-hakin9-pdf-and-metasploit/">extra difficulty to steal the password too</a>.</p>
<p>I know this is obvious advice, but it&#8217;s not easy protecting data from carefully designed info stealers on Windows.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/didierstevens.wordpress.com/2046/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/didierstevens.wordpress.com/2046/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/didierstevens.wordpress.com/2046/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/didierstevens.wordpress.com/2046/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/didierstevens.wordpress.com/2046/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/didierstevens.wordpress.com/2046/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/didierstevens.wordpress.com/2046/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/didierstevens.wordpress.com/2046/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/didierstevens.wordpress.com/2046/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/didierstevens.wordpress.com/2046/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.didierstevens.com&blog=264765&post=2046&subd=didierstevens&ref=&feed=1" />]]></content:encoded>
			<wfw:commentRss>http://blog.didierstevens.com/2010/03/08/pdf-info-stealer-poc/feed/</wfw:commentRss>
		<slash:comments>9</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/03/pdf-infostealer-1.png" medium="image">
			<media:title type="html">pdf-infostealer-1</media:title>
		</media:content>

		<media:content url="http://didierstevens.files.wordpress.com/2010/03/pdf-infostealer-2.png" medium="image">
			<media:title type="html">pdf-infostealer-2</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 contains several [...]<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 the dll in [...]<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>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/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 itself. Details [...]<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>5</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>
		<item>
		<title>Quickpost: Quasi-Tautologies &amp; SQL-Injection</title>
		<link>http://blog.didierstevens.com/2010/02/02/quickpost-quasi-tautologies-sql-injection/</link>
		<comments>http://blog.didierstevens.com/2010/02/02/quickpost-quasi-tautologies-sql-injection/#comments</comments>
		<pubDate>Tue, 02 Feb 2010 09:54:27 +0000</pubDate>
		<dc:creator>Didier Stevens</dc:creator>
				<category><![CDATA[Hacking]]></category>
		<category><![CDATA[Quickpost]]></category>

		<guid isPermaLink="false">http://blog.didierstevens.com/?p=1966</guid>
		<description><![CDATA[Last OWASP/ISSA Belgian chapter meeting was the location of an interesting discussion. For a full report of the meeting, read Xavier&#8217;s excellent blogpost.
Many SQL-injection techniques rely on tautologies: adding an expression that is always true to the where-clause of a select statement. Like OR 1=1. 1=1 is a tautology, it&#8217;s an expression that always yields [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.didierstevens.com&blog=264765&post=1966&subd=didierstevens&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<p>Last <a href="http://www.owasp.org/index.php/Belgium#tab=Chapter_Meetings">OWASP/ISSA Belgian chapter meeting</a> was the location of an interesting discussion. For a full report of the meeting, read <a href="http://blog.rootshell.be/2010/02/01/owasp-issa-belgium-chapter-meeting/">Xavier&#8217;s excellent blogpost</a>.</p>
<p>Many <a href="http://en.wikipedia.org/wiki/SQL_injection">SQL-injection techniques</a> rely on <a href="http://en.wikipedia.org/wiki/Tautology_%28logic%29">tautologies</a>: adding an expression that is always true to the where-clause of a select statement. Like <strong>OR 1=1</strong>. <strong>1=1</strong> is a tautology, it&#8217;s an expression that always yields true.</p>
<p>So if <strong>SELECT * FROM USERS WHERE USERNAME = &#8216;ADMIN&#8217; and PASSWORD = &#8216;UNKNOWN&#8217;</strong> doesn&#8217;t select any rows because the password is not correct, injecting <strong>&#8216; OR 1=1 &#8211;</strong> gives SQL statement <strong>SELECT * FROM USERS WHERE USERNAME = &#8216;ADMIN&#8217; and PASSWORD = &#8221; OR 1=1 &#8211;&#8217;</strong> which will return all rows, because the where-clause is always true (<strong>OR 1=1</strong>).</p>
<p>There are several security applications (WAFs, SQL firewalls, &#8230;) designed to monitor the stream of SQL statements and reject statements with tautologies, i.e. the result of a SQL-injection. Some are very simple and just try to match pattern 1=1. Bypassing them is easy: 1&gt;0 is also a tautology. Others are more sophisticated and try to find constant expressions in the where-clause. Constant expressions are expressions with operators, functions and constants, but without variables. If a constant expression is detected that always evaluates to true, the firewall assumes it&#8217;s the result of a SQL-injection and blocks the query.</p>
<p>This is all classic SQL-injection, but now comes the interesting part.</p>
<p>What if I use an expression that is not a tautology in it&#8217;s mathematical sense, but is almost one&#8230; Say I use expression <strong>RAND() &gt; 0.01</strong> ? The <a href="http://dev.mysql.com/doc/refman/5.0/en/mathematical-functions.html#function_rand">RAND</a> function is a random number generator and returns a floating point value in the range [0.0, 1.0[. Expression <strong>RAND() &gt; 0.01</strong> is not a tautology, it&#8217;s not always true, but it is true about 99% percent of the time. I call this a quasi-tautology.</p>
<p>A firewall looking for tautologies will not detect this, because it is not a tautology. But when you use it in a SQL-injection, you stand a 99% chance of being succesful (provided the application is vulnerable to SQL-injection)!</p>
<p>There are other functions than RAND to create quasi-tautologies. An expression comparing the seconds of the current system time with 59 is also a quasi-tautology.</p>
<p>The <a href="http://www.greensql.net/">GreenSQL firewall</a> will detect SQL statements with quasi-tautologies, not because it looks for them, but because it builds a whitelist in training mode.</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/1966/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/didierstevens.wordpress.com/1966/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/didierstevens.wordpress.com/1966/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/didierstevens.wordpress.com/1966/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/didierstevens.wordpress.com/1966/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/didierstevens.wordpress.com/1966/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/didierstevens.wordpress.com/1966/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/didierstevens.wordpress.com/1966/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/didierstevens.wordpress.com/1966/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/didierstevens.wordpress.com/1966/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.didierstevens.com&blog=264765&post=1966&subd=didierstevens&ref=&feed=1" />]]></content:encoded>
			<wfw:commentRss>http://blog.didierstevens.com/2010/02/02/quickpost-quasi-tautologies-sql-injection/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">didierstevens</media:title>
		</media:content>
	</item>
		<item>
		<title>Quickpost: Shellcode to Load a DLL From Memory</title>
		<link>http://blog.didierstevens.com/2010/01/28/quickpost-shellcode-to-load-a-dll-from-memory/</link>
		<comments>http://blog.didierstevens.com/2010/01/28/quickpost-shellcode-to-load-a-dll-from-memory/#comments</comments>
		<pubDate>Thu, 28 Jan 2010 03:08:14 +0000</pubDate>
		<dc:creator>Didier Stevens</dc:creator>
				<category><![CDATA[Hacking]]></category>
		<category><![CDATA[My Software]]></category>
		<category><![CDATA[Quickpost]]></category>

		<guid isPermaLink="false">http://blog.didierstevens.com/?p=1959</guid>
		<description><![CDATA[I finally took time to develop shellcode to load a DLL, not with LoadLibrary, but directly from memory. Not storing the DLL on disk prevents it from being detected by AV software; not using LoadLibrary bypasses HIPS software that monitors this system call.
My shellcode is based on Joachim&#8217;s code.
In previous posts, I showed how to [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.didierstevens.com&blog=264765&post=1959&subd=didierstevens&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<p>I finally took time to develop shellcode to load a DLL, not with LoadLibrary, but directly from memory. Not storing the DLL on disk prevents it from being detected by AV software; not using LoadLibrary bypasses HIPS software that monitors this system call.</p>
<p>My shellcode is based on <a href="http://www.joachim-bauch.de/tutorials/load_dll_memory.html">Joachim&#8217;s code</a>.</p>
<p>In previous posts, I showed how to <a href="http://blog.didierstevens.com/2008/06/05/bpmtk-how-about-srp-whitelists/">load a DLL</a> <a href="http://blog.didierstevens.com/2008/10/23/excel-exercises-in-style/">or shellcode</a> with VBA in Excel. This is a combination of both techniques: a VBA macro loads and executes shellcode in Excel&#8217;s process space, and the shellcode loads a DLL from memory into Excel&#8217;s process memory.</p>
<p>With the <a href="http://blog.didierstevens.com/2008/06/25/bpmtk-bypassing-srp-with-dll-restrictions/">code of the previous post</a>, the DLL appears in the list of loaded DLLs:</p>
<p><img class="alignnone size-full wp-image-1960" title="20100127-193739" src="http://didierstevens.files.wordpress.com/2010/01/20100127-193739.png?w=616&#038;h=419" alt="" width="616" height="419" /></p>
<p>With this shellcode, it doesn&#8217;t:</p>
<p><img class="alignnone size-full wp-image-1961" title="20100127-192408" src="http://didierstevens.files.wordpress.com/2010/01/20100127-192408.png?w=616&#038;h=419" alt="" width="616" height="419" /></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/1959/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/didierstevens.wordpress.com/1959/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/didierstevens.wordpress.com/1959/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/didierstevens.wordpress.com/1959/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/didierstevens.wordpress.com/1959/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/didierstevens.wordpress.com/1959/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/didierstevens.wordpress.com/1959/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/didierstevens.wordpress.com/1959/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/didierstevens.wordpress.com/1959/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/didierstevens.wordpress.com/1959/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.didierstevens.com&blog=264765&post=1959&subd=didierstevens&ref=&feed=1" />]]></content:encoded>
			<wfw:commentRss>http://blog.didierstevens.com/2010/01/28/quickpost-shellcode-to-load-a-dll-from-memory/feed/</wfw:commentRss>
		<slash:comments>15</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/01/20100127-193739.png" medium="image">
			<media:title type="html">20100127-193739</media:title>
		</media:content>

		<media:content url="http://didierstevens.files.wordpress.com/2010/01/20100127-192408.png" medium="image">
			<media:title type="html">20100127-192408</media:title>
		</media:content>
	</item>
		<item>
		<title>Quickpost: PDF Header %!PS-Adobe-N.n PDF-M.m</title>
		<link>http://blog.didierstevens.com/2010/01/21/quickpost-pdf-header-ps-adobe-n-n-pdf-m-m/</link>
		<comments>http://blog.didierstevens.com/2010/01/21/quickpost-pdf-header-ps-adobe-n-n-pdf-m-m/#comments</comments>
		<pubDate>Thu, 21 Jan 2010 11:21:03 +0000</pubDate>
		<dc:creator>Didier Stevens</dc:creator>
				<category><![CDATA[My Software]]></category>
		<category><![CDATA[PDF]]></category>
		<category><![CDATA[Quickpost]]></category>

		<guid isPermaLink="false">http://blog.didierstevens.com/?p=1953</guid>
		<description><![CDATA[@Feliam has an interesting PDF library to create PDF files with an unconventional header (the generated document doesn&#8217;t start with %PDF-&#8230;, but %PDF appears somewhere in the first 1024 bytes of the document). As this trick is likely to be taken over by malware authors, I updated PDFiD to support this.
The PDF reference document also [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.didierstevens.com&blog=264765&post=1953&subd=didierstevens&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<p><a href="http://twitter.com/feliam" target="_self">@Feliam</a> has an interesting <a href="http://feliam.wordpress.com/">PDF library</a> to create PDF files with an unconventional header (the generated document doesn&#8217;t start with %PDF-&#8230;, but %PDF appears somewhere in the first 1024 bytes of the document). As this trick is likely to be taken over by malware authors, I updated <a href="http://blog.didierstevens.com/2010/01/13/quickpost-new-versions-of-pdfid-and-pdf-parser/" target="_self">PDFiD</a> to support this.</p>
<p>The PDF reference document also mentions %!PS-Adobe-N.n PDF-M.m as a valid header, however, the PDF documents I and @Feliam generated with this header are not rendered by Adobe Reader (neither Foxit or Sumatra PDF).</p>
<p>I was told Adobe did support this header in older versions. My tests show Adobe Reader version 3, 4, 5 and 6 will render PDF documents with header %!PS-Adobe-N.n PDF-M.m. Versions 7, 8 and 9 will not. Therefor I decided not to include support for this header to PDFiD.</p>
<p>pdf-parser doesn&#8217;t test the header, it analyzes PDF documents regardless of the header.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/didierstevens.wordpress.com/1953/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/didierstevens.wordpress.com/1953/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/didierstevens.wordpress.com/1953/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/didierstevens.wordpress.com/1953/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/didierstevens.wordpress.com/1953/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/didierstevens.wordpress.com/1953/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/didierstevens.wordpress.com/1953/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/didierstevens.wordpress.com/1953/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/didierstevens.wordpress.com/1953/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/didierstevens.wordpress.com/1953/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.didierstevens.com&blog=264765&post=1953&subd=didierstevens&ref=&feed=1" />]]></content:encoded>
			<wfw:commentRss>http://blog.didierstevens.com/2010/01/21/quickpost-pdf-header-ps-adobe-n-n-pdf-m-m/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">didierstevens</media:title>
		</media:content>
	</item>
	</channel>
</rss>