<?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>dpunk!</title>
	<atom:link href="http://dp.grhack.net/feed/" rel="self" type="application/rss+xml" />
	<link>http://dp.grhack.net</link>
	<description></description>
	<lastBuildDate>Sat, 17 Jul 2010 14:42:32 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='dp.grhack.net' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://www.gravatar.com/blavatar/1c59a0d38dae79f929989b0c190148d2?s=96&#038;d=http://s2.wp.com/i/buttonw-com.png</url>
		<title>dpunk!</title>
		<link>http://dp.grhack.net</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://dp.grhack.net/osd.xml" title="dpunk!" />
	<atom:link rel='hub' href='http://dp.grhack.net/?pushpress=hub'/>
		<item>
		<title>Fuzzing Windows message queues &#8212; WTF?</title>
		<link>http://dp.grhack.net/2010/07/17/fuzzing-windows-message-queues-wtf/</link>
		<comments>http://dp.grhack.net/2010/07/17/fuzzing-windows-message-queues-wtf/#comments</comments>
		<pubDate>Sat, 17 Jul 2010 00:11:55 +0000</pubDate>
		<dc:creator>decepticonpunk</dc:creator>
				<category><![CDATA[Vulnerabilities and exploits]]></category>

		<guid isPermaLink="false">http://dp.grhack.net/?p=125</guid>
		<description><![CDATA[Yeap, you can&#8217;t earn a living by coding fuzzers, analysis-framewoks-to-be-in-100-years, weird YACC stuff etc. Since my monthly income is quite low, I decided to undertake a free lancing job for a Greek organization which I wouldn&#8217;t like to name. Among other things, the job involved reversing an application and creating a keygen as well as [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=dp.grhack.net&blog=9185430&post=125&subd=decepticonpunk&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<p>Yeap, you can&#8217;t earn a living by coding fuzzers, analysis-framewoks-to-be-in-100-years, weird YACC stuff etc. Since my monthly income is quite low, I decided to undertake a free lancing job for a Greek organization which I wouldn&#8217;t like to name. Among other things, the job involved reversing an application and creating a keygen as well as investigating the several points of I/O. Everything went pretty smoothly until I noticed that the application in question defined several WM_APP messages for internal use.</p>
<p>My first step was to launch Visual Studio&#8217;s Spy++ and start looking at the events exchanged by the application components. It turned out that most of the entries in Spy++&#8217;s list were not that interesting. Nevertheless, the following events cought my attention.</p>
<pre style="font-size:12px;font-family:courier new;white-space:pre-wrap;background-color:#303030;color:#ffffff;border:1px #ffffff dashed;padding:5px;">
&lt;00001&gt; 000100D0 P message:0x8020 [User-defined:WM_APP+32] wParam:00000004 lParam:02574FD0
...
&lt;00004&gt; 000100D0 P message:0x8002 [User-defined:WM_APP+2] wParam:00000004 lParam:02574FD0
&lt;00005&gt; 000100D0 P message:0x8023 [User-defined:WM_APP+35] wParam:00000008 lParam:025C8C40
&lt;00006&gt; 000100D0 P message:0x8002 [User-defined:WM_APP+2] wParam:00000008 lParam:025C8C40
&lt;00007&gt; 000100D0 P message:0x8020 [User-defined:WM_APP+32] wParam:00000004 lParam:02539FD0
...
&lt;00010&gt; 000100D0 P message:0x8002 [User-defined:WM_APP+2] wParam:00000004 lParam:02539FD0
</pre>
<p>Due to the nature of the target application, detecting the handlers for those custom events was quite difficult, so, I decided to have some fun before firing up IDA pro. I devoted 10 minutes of my life to write a tiny C code that would send those custom events to all of the application&#8217;s threads. For wParam and lParam I used random values. It turned out that it wasn&#8217;t such a dumb idea after all. The target crashed, and then it crashed again, and again, and again&#8230;</p>
<p>The root cause of all those access violations was the fact the target application assumed that the wParam and lParam values were valid memory addresses! For example, a call to SendMessage() like the one below:</p>
<pre style="font-size:12px;font-family:courier new;white-space:pre-wrap;background-color:#303030;color:#ffffff;border:1px #ffffff dashed;padding:5px;">
lResult = SendMessage(pProcessHwnd-&gt;hWnd, 0x8002, 0x00400000, 0x00400000);
fprintf(stderr, "\tLRESULT = 0x%.8p\n", lResult);
</pre>
<p>Resulted in the following output in WinDBG&#8217;s command window.</p>
<pre style="font-size:12px;font-family:courier new;white-space:pre-wrap;background-color:#303030;color:#ffffff;border:1px #ffffff dashed;padding:5px;">
00497744 8b7e28          mov     edi,dword ptr [esi+28h] ds:0023:00400028=00000000
0:003&gt; r? esi
esi=00400000
</pre>
<p>Since the target application received network input my next step was to hook all the calls to recv() in order to find any static buffers for placing my data. For this purpose, I created the following one-liner socket sniffer for WinDBG :-P </p>
<pre style="font-size:12px;font-family:courier new;white-space:pre-wrap;background-color:#303030;color:#ffffff;border:1px #ffffff dashed;padding:5px;">
bp WS2_32!recv "r $t1 = poi(@esp + 8); pt \"dd @$t1; g\""
</pre>
<p>I fired up the target, I monitored the network traffic and used netcat to send some alphas at one of the network ports the application was receiving data. This little test revealed 2-3 candidate buffers that were allocated at a fixed point. Notice that, so far, no reversing took place. All of our assumptions are based on pure observation (which is a bad thing if you&#8217;re trying to code a serious exploit).</p>
<p>Continueing with the vulnerable code, after a bunch of irrelevant stuff, I ended up in the following instruction where &#8220;eax&#8221; contains the return value of CreateWindow()!</p>
<pre style="font-size:12px;font-family:courier new;white-space:pre-wrap;background-color:#303030;color:#ffffff;border:1px #ffffff dashed;padding:5px;">
mov     [esi+4], eax
</pre>
<p>It turns out that we can write &#8220;eax&#8221; wherever we want! I haven&#8217;t figured out if it can be used to execute arbitrary code but I&#8217;m pretty sure the bytes pointed by the window handle will contain something useful ;-)</p>
<p>So that&#8217;s it for today. Before I end this post, I would like to share with you a few links that got my attention this month&#8230;</p>
<ul>
<li>
<a href="http://www.windbg.info">windbg.info</a> &#8211; A community for WinDBG users (check out the &#8220;WinDbg. From A to Z!&#8221; PDF, it rocks!).
</li>
<li>
<a href="http://recon.cx/2010/speakers.html">REcon 2010</a> is over. Waiting for the material to go public! Sean&#8217;s slides are already available at his <a href="http://seanhn.wordpress.com">blog</a>.
</li>
<li>
Everything you need to know about <a href="http://www.cs.man.ac.uk/~jsinger/ssa.html">SSA</a>.
</li>
<li>
Indeed, it looks <a href="http://kernelbof.blogspot.com/2010/05/security-is-burning-everything-old-is.html">familiar</a>.
</li>
</ul>
<p>Cya</p>
<p>&#8211; dp</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/decepticonpunk.wordpress.com/125/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/decepticonpunk.wordpress.com/125/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/decepticonpunk.wordpress.com/125/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/decepticonpunk.wordpress.com/125/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/decepticonpunk.wordpress.com/125/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/decepticonpunk.wordpress.com/125/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/decepticonpunk.wordpress.com/125/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/decepticonpunk.wordpress.com/125/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/decepticonpunk.wordpress.com/125/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/decepticonpunk.wordpress.com/125/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=dp.grhack.net&blog=9185430&post=125&subd=decepticonpunk&ref=&feed=1" />]]></content:encoded>
			<wfw:commentRss>http://dp.grhack.net/2010/07/17/fuzzing-windows-message-queues-wtf/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/58749f444c40ea81aa9d5b3cd664a6ea?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">decepticonpunk</media:title>
		</media:content>
	</item>
		<item>
		<title>AthCon 2010</title>
		<link>http://dp.grhack.net/2010/06/05/athcon-2010/</link>
		<comments>http://dp.grhack.net/2010/06/05/athcon-2010/#comments</comments>
		<pubDate>Sat, 05 Jun 2010 13:21:08 +0000</pubDate>
		<dc:creator>decepticonpunk</dc:creator>
				<category><![CDATA[Vulnerabilities and exploits]]></category>

		<guid isPermaLink="false">http://dp.grhack.net/?p=116</guid>
		<description><![CDATA[Yop, I just got back home from Athens! I was a speaker at AthCon 2010 where I gave a presentation on BNF based fuzzing and met several cool people from all over the world. Hopefully, according to the organizers, the slides, whitepapers and videos will soon be available for download at athcon.org. Until then, you [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=dp.grhack.net&blog=9185430&post=116&subd=decepticonpunk&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<p>Yop, </p>
<p>I just got back home from Athens! I was a speaker at AthCon 2010 where I gave a presentation on BNF based fuzzing and met several cool people from all over the world. Hopefully, according to the organizers, the slides, whitepapers and videos will soon be available for download at <a href="http://www.athcon.org">athcon.org</a>. Until then, you can have a look at bnffuzz (the PoC BNF based fuzzer that I presented) at <a href="https://www.grhack.net/files/bnffuzz/">grhack.net</a>.</p>
<p>AthCon was definitely a great success and an unprecedented event for Greece. Unfortunately I live in a country where the vast majority of people have no vision, no taste, no brains, not anything. Good news is that there are a few who have a strong will to change this rotten situation. I&#8217;m talking about the AthCon 2010 staff and especially <a href="http://gr.linkedin.com/pub/kyprianos-vasilopoulos/1/881/299">Kyprianos Vasilopoulos</a>, <a href="http://uk.linkedin.com/in/papathanasiou">Christian Papathanasiou</a> and <a href="http://gr.linkedin.com/pub/anna-manousaki/7/929/539">Anna Manousaki</a> who managed to organize the best conference that has ever taken place in Greece. I would like to express my gratitude and respect to these people and to everyone that helped in making AthCon such a great success. </p>
<p>See you next year!</p>
<p>&#8211; dp</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/decepticonpunk.wordpress.com/116/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/decepticonpunk.wordpress.com/116/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/decepticonpunk.wordpress.com/116/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/decepticonpunk.wordpress.com/116/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/decepticonpunk.wordpress.com/116/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/decepticonpunk.wordpress.com/116/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/decepticonpunk.wordpress.com/116/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/decepticonpunk.wordpress.com/116/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/decepticonpunk.wordpress.com/116/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/decepticonpunk.wordpress.com/116/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=dp.grhack.net&blog=9185430&post=116&subd=decepticonpunk&ref=&feed=1" />]]></content:encoded>
			<wfw:commentRss>http://dp.grhack.net/2010/06/05/athcon-2010/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/58749f444c40ea81aa9d5b3cd664a6ea?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">decepticonpunk</media:title>
		</media:content>
	</item>
		<item>
		<title>The C typedef problem</title>
		<link>http://dp.grhack.net/2010/03/05/the-c-typedef-problem/</link>
		<comments>http://dp.grhack.net/2010/03/05/the-c-typedef-problem/#comments</comments>
		<pubDate>Fri, 05 Mar 2010 13:17:37 +0000</pubDate>
		<dc:creator>decepticonpunk</dc:creator>
				<category><![CDATA[Compilers]]></category>

		<guid isPermaLink="false">http://dp.grhack.net/?p=99</guid>
		<description><![CDATA[EDIT: The ideas described in this post can only be used for a limited set of typedef declarations. Stay tuned for a better technique :-) Introduction If you have ever written any program doing analyses on C code, then this isn&#8217;t news to you. The famous typedef problem has been the subject of many discussions [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=dp.grhack.net&blog=9185430&post=99&subd=decepticonpunk&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<p><em>EDIT: The ideas described in this post can only be used for a limited set of typedef declarations. Stay tuned for a better technique :-)</em></p>
<p><strong>Introduction</strong><br />
If you have ever written any program doing analyses on C code, then this isn&#8217;t news to you. The famous typedef problem has been the subject of many discussions among compiler developers and many solutions have been proposed. Personally speaking, I wasn&#8217;t aware of how serious it was until I had to cope with it. So, you guessed it, I&#8217;m currently trying to solve the famous typedef problem that the parser generator of OpenSAT faces. Before moving on to describing any possible solutions, let&#8217;s try to define the actual source of evil.</p>
<p><strong>Definition</strong><br />
I am sure you already have the K&amp;R book (I mean, come on, everyone has it), so, jump to page 234 (A13) and have a look at the C grammar. One of the most notable rules is the following: </p>
<pre style="font-size:12px;font-family:courier new;white-space:pre-wrap;">
&lt;type-specifier&gt; ::= "void" | "char" | "short" | "int" | "long" | "float" | "double" | "signed" | "unsigned" | &lt;struct-or-union-specifier&gt; | &lt;enum-specifier&gt; | &lt;typedef-name&gt;
&lt;typedef-name&gt; ::= &lt;identifier&gt;
</pre>
<p>Looking at the rules above, one can see that a &lt;type-specifier&gt; can be equal to a &lt;typedef-name&gt; and a &lt;typedef-name&gt; equal to an &lt;identifier&gt;. Even if you are not familiar with BNF grammars, it&#8217;s pretty easy to understand that this set of rules refer to identifiers declared as types via typedef.</p>
<pre style="font-size:12px;font-family:courier new;white-space:pre-wrap;">
typedef unsigned long our_int_t;
</pre>
<p>When a C compiler comes across such a declaration, it knows that <b>our_int_t</b> should be treated as an alias for <b>unsigned long</b> and that <b>our_int_t</b> can be used as a type specifier (i.e as a standard C keyword used to define a basic C type). Notice that type names defined via typedef should always obey the rules for variable names, so, without some extra context information, the C lexer is unable to understand if a given string is an identifier or a type name! You might think that this is not a problem at all, but let&#8217;s have a look at a completely valid C snippet that any descent compiler will happily accept as correct.</p>
<pre style="font-size:12px;font-family:courier new;white-space:pre-wrap;">
typedef unsigned long our_int_t;

int main(void) {
  our_int_t v; /* [1] */
  int our_int_t = 2; /* [2] */
  return 0;
}
</pre>
<p>Funny right? At [1], a new variable named <b>v</b> of type <b>our_int_t</b> is declared. The C compiler has already parsed the typedef declaration, so, it knows that <b>our_int_t</b> is actually an alias for <b>unsigned long</b> and thus accepts the declaration.  So far so good. The real problem starts at [2] where our fictional programmer, interestingly enough, declares a new integer variable named <b>our_int_t</b> which is given a default value of 2. Although <b>our_int_t</b> was previously declared as a type name, it is used at [2] as an identifier. On the contrary to what you might think, this line is syntactically and semantically correct. If you need further convincing, just compile the previous snippet with your favorite compiler.</p>
<p>The previous paragraph describes only one side of the coin. Unfortunately, one more problem arises from this little inelegance in C&#8217;s grammar, but it&#8217;s not possible to explain it here in detail. The problem lies in the way LALR states are generated. By replacing &lt;typedef-name&gt; with &lt;identifier&gt; (since &lt;typedef-name&gt; ::= &lt;identifier&gt; is also true), a lot of conflicts pop up in the resulting parsing tables. If you want to have a look, grab the yacc C grammar from <a href="http://www.lysator.liu.se/c/ANSI-C-grammar-y.html">here</a>, replace TYPE_NAME with IDENTIFIER and run yacc on it.  </p>
<p><strong>Solutions</strong><br />
The past few days I&#8217;ve been trying to solve this problem in an ellegant and effective way. During all that time I googled a lot and I came across some very interesting sources which are worth studying. Here are some links:</p>
<p>1. The typedef problem discussed in comp.compilers <a href="http://compilers.iecc.com/comparch/article/92-01-042">here</a>, <a href="http://compilers.iecc.com/comparch/article/92-01-048">here</a>, <a href="http://compilers.iecc.com/comparch/article/92-01-037">here</a> and <a href="http://compilers.iecc.com/comparch/article/92-01-056">here</a>.<br />
2. Same at a very cool blog called <a href="http://calculist.blogspot.com/2009/02/c-typedef-parsing-problem.html">The little calculist</a>.</p>
<p>There&#8217;s more than one way to solve the typedef problem. It can either be done in the parser or in the lexer. In the former case, the C grammar is modified, while in the latter, lookahead is introduced in the lexer. It&#8217;s up to the developer to decide what&#8217;s best for him. Personally, I consider messing with the grammar a dangerous practice, so I decided to implement the second solution.</p>
<p>Solving the problem in the lexer was not a big trouble. First &lt;typedef-name&gt; and &lt;identifier&gt; are declared as terminals e.g TYPE_NAME and IDENTIFIER as in the yacc grammar shown above. The next step is to modify the lexer in order to make it able to distinguish if a given string is an identifier or a type name and return the appropriate token type. The following pseudocode is what I actually implemented in C for OpenSAT.</p>
<pre style="font-size:12px;font-family:courier new;white-space:pre-wrap;">
/* Upon reading a "typedef" token, set a flag that
 * indicates we are currently lexing a typedef
 * declaration.
 */
if token.name == "typedef" then
  in_typedef = 1;
fi
...
...
if token.name == ";" then
  ...
  in_typedef = 0;  /* Typedef ends at ";". */
fi
...
...
if token.type == IDENTIFIER then
  /* If this token is already in the type_table hash table
   * and if lookahead is not one of the characters shown
   * below then this token is used as a type specifier.
   */
  if token in type_table then
    if lookahead not one of ['=' ',' '{' ';'] then
      token.type = TYPE_NAME
    fi
  /* If we are currently lexing a typedef declaration and
   * the token is not in type_table then this is a new type
   * name. Insert it in the type_table.
   */
  else if in_typedef == 1 then
    token.type = TYPE_NAME
    insert_in_type_table(token)
  fi
fi
</pre>
<p>So far this solution seems to work fine. You can have a look at my test program <a href="https://www.grhack.net/files/opensat/test.c">here</a> and the output produced by OpenSAT&#8217;s lexer <a href="https://www.grhack.net/files/opensat/test.log">here</a> (notice that the tokens are correctly identified). I still haven&#8217;t finished dealing with the typedef problem, so, maybe my solution is not 100% correct. If you think you got a better idea drop me a mail or add a comment! :-)</p>
<p>&#8211; dp</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/decepticonpunk.wordpress.com/99/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/decepticonpunk.wordpress.com/99/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/decepticonpunk.wordpress.com/99/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/decepticonpunk.wordpress.com/99/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/decepticonpunk.wordpress.com/99/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/decepticonpunk.wordpress.com/99/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/decepticonpunk.wordpress.com/99/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/decepticonpunk.wordpress.com/99/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/decepticonpunk.wordpress.com/99/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/decepticonpunk.wordpress.com/99/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=dp.grhack.net&blog=9185430&post=99&subd=decepticonpunk&ref=&feed=1" />]]></content:encoded>
			<wfw:commentRss>http://dp.grhack.net/2010/03/05/the-c-typedef-problem/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/58749f444c40ea81aa9d5b3cd664a6ea?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">decepticonpunk</media:title>
		</media:content>
	</item>
		<item>
		<title>In Berlin everything&#8217;s about *wurst\x00</title>
		<link>http://dp.grhack.net/2010/01/01/in-berlin-everythings-about-wurstx00/</link>
		<comments>http://dp.grhack.net/2010/01/01/in-berlin-everythings-about-wurstx00/#comments</comments>
		<pubDate>Fri, 01 Jan 2010 18:14:29 +0000</pubDate>
		<dc:creator>decepticonpunk</dc:creator>
				<category><![CDATA[Compilers]]></category>

		<guid isPermaLink="false">http://dp.grhack.net/?p=87</guid>
		<description><![CDATA[EDIT: Nope, the title is not related to Kaminsky&#8217;s 26C3 talk. If it was so, the title would have been something like *\x00wurst ;-) So, I just got back from Berlin where I attended the 26C3 which was a great success. All of us were there: argp, huku, solidsnk, brat, xorl, ithilgore, sin and gorlist. [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=dp.grhack.net&blog=9185430&post=87&subd=decepticonpunk&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<p><em>EDIT: Nope, the title is not related to Kaminsky&#8217;s 26C3 talk. If it was so, the title would have been something like *\x00wurst ;-)</em></p>
<p>So, I just got back from Berlin where I attended the 26C3 which was a great success. All of us were there: <a href="http://census-labs.com/">argp</a>, <a href="https://www.grhack.net/">huku</a>, <a href="https://www.grhack.net/">solidsnk</a>, brat, <a href="http://xorl.wordpress.com/">xorl</a>, <a href="http://sock-raw.org/">ithilgore</a>, sin and <a href="http://int0x80.gr/">gorlist</a>. We drank beers and we had some fun and interesting talks together. Personally speaking, I enjoyed FX&#8217;s talk and the <a href="http://www.phenoelit-us.org/">Phenoelit</a> party the most :-) </p>
<p>It&#8217;s now time to get back to business and studying. During my time off, I managed to finish the LR state generation code for libast (Abstract Syntax Tree library). Libast, which is still under development, is responsible for parsing the input stream according to a BNF grammar given in libbnf&#8217;s format. So far, about 80% of libast is complete and works like charm. For debugging purposes, libast comes with Graphviz visualization support. For example, <a href="https://www.grhack.net/files/opensat/states.png">here&#8217;s</a> how libast visualizes the traditional <a href="http://www.amazon.com/Compilers-Principles-Techniques-Tools-2nd/dp/0321486811/ref=dp_ob_title_bk/189-9981465-4221241">Dragon book</a> expression grammar. The output produced by OpenSAT is <a href="https://www.grhack.net/files/opensat/first.log">here</a> (executed via valgrind). The idea of visualizing the states belongs to <a href="http://bukowski-framework.blogspot.com/2009/09/more-graphing.html">guerrilla</a> (yeah this guy rocks, he uses formal parsing methods to parse ASM code!).</p>
<p>So, back to hardcore studying since I am taking exams in about one month. In the meantime, during my free time, I&#8217;ll be finishing my byacc source code analysis and I&#8217;ll be checking gcc&#8217;s libcpp (I am planning to modify it and insert it in the OpenSAT source tree). <strong>Another idea that I came up with, is the use of Python-based semantics in Syntax Directed Translation schemes e.g. consider a standard byacc input file with the difference that the grammar semantics within { and } are written in Python.</strong> So, upon reducing the input according to a grammar rule, the semantic action is passed to the Python interpreter for execution. If you have some experience in that please contact me, I&#8217;d really like to know if this works fine in real life applications!</p>
<p>&#8211; dp</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/decepticonpunk.wordpress.com/87/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/decepticonpunk.wordpress.com/87/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/decepticonpunk.wordpress.com/87/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/decepticonpunk.wordpress.com/87/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/decepticonpunk.wordpress.com/87/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/decepticonpunk.wordpress.com/87/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/decepticonpunk.wordpress.com/87/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/decepticonpunk.wordpress.com/87/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/decepticonpunk.wordpress.com/87/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/decepticonpunk.wordpress.com/87/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=dp.grhack.net&blog=9185430&post=87&subd=decepticonpunk&ref=&feed=1" />]]></content:encoded>
			<wfw:commentRss>http://dp.grhack.net/2010/01/01/in-berlin-everythings-about-wurstx00/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/58749f444c40ea81aa9d5b3cd664a6ea?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">decepticonpunk</media:title>
		</media:content>
	</item>
		<item>
		<title>10 things you should be careful about when auditing sources</title>
		<link>http://dp.grhack.net/2009/10/16/10-things-you-should-be-careful-about-when-auditing-sources/</link>
		<comments>http://dp.grhack.net/2009/10/16/10-things-you-should-be-careful-about-when-auditing-sources/#comments</comments>
		<pubDate>Fri, 16 Oct 2009 20:41:13 +0000</pubDate>
		<dc:creator>decepticonpunk</dc:creator>
				<category><![CDATA[Vulnerabilities and exploits]]></category>

		<guid isPermaLink="false">http://dp.grhack.net/?p=50</guid>
		<description><![CDATA[While being busy studying the byacc source code (expect more on this soon), I came across an old list that I once assembled. It was a list of 10 very common C programming pitfalls that, when exploited, may lead to arbitrary code execution. I decided to publish it here in order aid my blog readers [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=dp.grhack.net&blog=9185430&post=50&subd=decepticonpunk&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<p>While being busy studying the <a href="http://invisible-island.net/byacc/byacc.html">byacc</a> source code (expect more on this soon), I came across an old list that I once assembled. It was a list of 10 very common C programming pitfalls that, when exploited, may lead to arbitrary code execution. I decided to publish it here in order aid my blog readers identify bugs in C code more easily. So here&#8217;s my list. It&#8217;s by no means complete, feel free to contact me if you want to contribute. So, after checking for trivial signedness bugs, null pointer dereferences, simple stack &amp; heap overflows etc make sure that you also check the following list. Notice that most of the cases presented are real examples found in commonly used open source software.</p>
<p><strong>Case 1: Making use of snprintf()&#8217;s return value</strong><br />
Many programmers use the value returned by snprintf() in order to calculate the next free position in a buffer. Consider the following example. Our imaginary programmer tried to copy two user controlled buffers inside another. He also used snprintf() for security purposes since strcat()/strcpy() are considered dangerous.</p>
<pre style="font-size:12px;font-family:courier new;white-space:pre-wrap;">
int pos;
/* ... */
pos = snprintf(buffer, size, "%s", user_controlled_buffer1);
size -= pos;
pos = snprintf(buffer + pos, size, "%s", user_controlled_buffer2);
</pre>
<p>This is a very common mistake. According to snprintf()&#8217;s manual page, the returned value may exceed the size of the target buffer indicating that more space is needed for the user data to fit in the destination. If the first call to snprintf() returns a position greater than sizeof(buffer), then the second snprintf() will attemp to write data outside the target buffer&#8217;s boundaries. Additionally, size -= pos may result in a negative result which in turn may lead to other problems.</p>
<p><strong>Case 2: Buffer increase on demand</strong><br />
This is actually similar to case 1 but it doesn&#8217;t lead to directly exploitable conditions. Consider a program that describes I/O buffers using structures. For example, one such structure may contain the actual data as well as an integer indicating the data length.</p>
<pre style="font-size:12px;font-family:courier new;white-space:pre-wrap;">
typedef struct {
  char *data;
  int len;
} io_t;
</pre>
<p>I&#8217;ve encountered a bunch of applications doing stuff like this:</p>
<pre style="font-size:12px;font-family:courier new;white-space:pre-wrap;">
io_t *whatever;
/* ... */
whatever-&gt;len += snprintf(whatever-&gt;data, size, "%s", user_controlled_buffer);
</pre>
<p>The variable whatever-&gt;len may eventually receive a value greater than the real size of the data region. Although this is not directly exploitable, it usually leads to exploitable conditions.</p>
<p><strong>Case 3: Using strncpy() safely</strong><br />
Ok this is probably the most common mistake. Calling strncpy() like this&#8230;</p>
<pre style="font-size:12px;font-family:courier new;white-space:pre-wrap;">
strncpy(buffer, user_controlled_buffer, sizeof(buffer));
</pre>
<p>&#8230;is kinda nasty since it may result in off-by-one errors. On the contrary&#8230;</p>
<pre style="font-size:12px;font-family:courier new;white-space:pre-wrap;">
strncpy(buffer, user_controlled_buffer, sizeof(buffer) - 1);
</pre>
<p>&#8230;is much safer. No need to discuss this further since many public exploits target such a vulnerebility and there are plenty of resources on this matter. I still wonder why I included strncpy() in this list!</p>
<p><strong>Case 4: realloc() frees the original chunk on success but not on failure</strong><br />
Here&#8217;s another very common C snippet.</p>
<pre style="font-size:12px;font-family:courier new;white-space:pre-wrap;">
new = realloc(old, new_size);
if(!new)
  return;
</pre>
<p>This is definitively a memory leak, since the call to realloc() won&#8217;t free the old chunk in case it fails. This problem alone is not sufficient to cause an exploitable condition, yet, it is a bless for all those people who do code heap exploits. By properly forcing the target program to leak memory, an attacker may setup the heap the way they like.</p>
<p><strong>Case 5: open() race conditions</strong><br />
Most programs need to perform I/O on a file or device. For security purposes, they usually perform various checks first e.g if the file belongs to root, if it is world writable and so on.  If the sanity tests are successfuly passed, they continue by actually opening the target file using open() or some similar function. This way of opening files allows for the target file or device to be modified within a time window (i.e after the checks have taken place but before it is actually opened). The AUCERT security checklist, which used to be <a href="ftp://ftp.auscert.org.au/pub/auscert/papers/secure_programming_checklist">here</a>, was a neat source of information on how to avoid race conditions. Unfortunately, the link is now dead.</p>
<p>AUCERT proposed that one should check the inode of the target file before and after it is opened.  If the inodes do not match then this is probably an indication of a symlink attack or a race condition. I promise I&#8217;ll post secure_open.c here when I have some free time to actually implement it :-)</p>
<p><strong>Case 6: Pattern matching is more or less dangerous</strong><br />
Some months ago, a friend of mine was trying to bypass the registry checks performed by a very famous and widely used antivirus suite for Microsoft Windows. His code called RegOpenKey() on a registry location which was considered a security threat by the AV rules. The first thing we actually tested was to slightly obfuscate the registry path by adding extra slashes in the path.</p>
<pre style="font-size:12px;font-family:courier new;white-space:pre-wrap;">
\\\\\\\\\\path\\\\\\\\to\\\\\\\\registry\\\\\\\\key
</pre>
<p>And guess what? It actually worked! Never underestimate a stupid idea!</p>
<p><strong>Case 7: Using unions safely</strong><br />
I first noticed this one in <a href="http://www.dovecot.org/doc/securecoding.txt">Dovecot&#8217;s secure coding guide</a>. If you haven&#8217;t read it yet, then you should do it now. This little text file states that mixing integer and pointer members in unions may result in serious problems that can be easily exploited to achieve arbitrary code execution as well as other fancy stuff :-) </p>
<p><strong>Case 8: Authentication via environmental variables</strong><br />
I was quite surprised to see that the external authentication mechanism used by pureftpd makes use of environmental variables. More precisely, after receiving the credentials from the user, pureftpd exports the given username and password in a pair of environment variables. Then, pureftpd calls the authentication backend which, in turn, decides if authentication is successful. OpenBSD (and possibly others?) implements the kvm_getproc2() and kvm_getenvv2() functions, which allow a non-root user to read the environment of another (possibly privileged) process. There exists a time window (starting before the execve() of the authentication backend and ending after the backend calls unsetenv()) during which a non-root user can sniff the usernames and passwords sent to the ftp server. The following <a href="https://www.grhack.net/cgi-bin/cvsweb/utilities/system/purespy/">code</a> demonstrates this technique. There&#8217;s at least one more widely used open source server that uses this kind of authentication&#8230; be careful!</p>
<p><strong>Case 9: Be careful when using free() in for() loops</strong><br />
Invalid usage of free() in for() loops may result in double frees or in invalid memory being accessed. Here&#8217;s a very cool example which can be found in <a href="http://plan9.bell-labs.com/cm/cs/cbook/">K&amp;R</a> page 167. </p>
<pre style="font-size:12px;font-family:courier new;white-space:pre-wrap;">
for(p = head; p != NULL; p = p-&gt;next) /* This is wrong! */
  free(p);
</pre>
<p>Notice that since the pointer &#8216;p&#8217; is freed via a call to free(), it is not legal to use p = p-&gt;next in the for() loop because &#8216;p&#8217; is not guaranteed to point to a valid memory. The correct way of freeing a list of items is the following:</p>
<pre style="font-size:12px;font-family:courier new;white-space:pre-wrap;">
for (p = head; p != NULL; p = q) {
  q = p-&gt;next;
  free(p);
}
</pre>
<p><strong>Case 10: Null termination tricks</strong><br />
Last but not least, I&#8217;ve come across several applications doing the following in order to NULL terminate a buffer.</p>
<pre style="font-size:12px;font-family:courier new;white-space:pre-wrap;">
strncpy(buffer, user_controlled_buffer, sizeof(buffer) - 1);
buffer[strlen(buffer) - 1] = 0;
</pre>
<p>This is a very dangerous practice. Notice that an empty user_controlled_buffer[] can result in a null byte landing on buffer[-1]. This, in turn, may result in unexpected behavior and possibly exploitable conditions. Generally speaking, any code of the form&#8230;</p>
<pre style="font-size:12px;font-family:courier new;white-space:pre-wrap;">
buffer[len - 1] = 0;
</pre>
<p>&#8230;is very dangerous when &#8216;len&#8217; is tainted ;-)</p>
<p>&#8211; dp</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/decepticonpunk.wordpress.com/50/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/decepticonpunk.wordpress.com/50/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/decepticonpunk.wordpress.com/50/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/decepticonpunk.wordpress.com/50/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/decepticonpunk.wordpress.com/50/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/decepticonpunk.wordpress.com/50/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/decepticonpunk.wordpress.com/50/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/decepticonpunk.wordpress.com/50/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/decepticonpunk.wordpress.com/50/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/decepticonpunk.wordpress.com/50/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=dp.grhack.net&blog=9185430&post=50&subd=decepticonpunk&ref=&feed=1" />]]></content:encoded>
			<wfw:commentRss>http://dp.grhack.net/2009/10/16/10-things-you-should-be-careful-about-when-auditing-sources/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/58749f444c40ea81aa9d5b3cd664a6ea?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">decepticonpunk</media:title>
		</media:content>
	</item>
		<item>
		<title>Announcing libbnf v1.0!</title>
		<link>http://dp.grhack.net/2009/09/22/announcing-libbnf-v1-0/</link>
		<comments>http://dp.grhack.net/2009/09/22/announcing-libbnf-v1-0/#comments</comments>
		<pubDate>Tue, 22 Sep 2009 09:55:46 +0000</pubDate>
		<dc:creator>decepticonpunk</dc:creator>
				<category><![CDATA[Compilers]]></category>

		<guid isPermaLink="false">http://decepticonpunk.wordpress.com/?p=36</guid>
		<description><![CDATA[EDIT: The download links were modified to point to the GR Hack CVS server. Read this for more info on how to access the repository. I finally found some time to finish and release libbnf. Libbnf is a tiny C library that can parse a Backus-Naur Form grammar from a text file and create a [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=dp.grhack.net&blog=9185430&post=36&subd=decepticonpunk&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<p><em>EDIT: The download links were modified to point to the GR Hack CVS server. Read <a href="https://www.grhack.net/cgi-bin/cvsweb/papers/GR-Hack-CVS-HOWTO?rev=1.1;content-type=text%2Fplain">this</a> for more info on how to access the repository.</em></p>
<p>I finally found some time to finish and release libbnf. Libbnf is a tiny C library that can parse a Backus-Naur Form grammar from a text file and create a graph-like datastructure out of it. Libbnf can also visualize the parsed grammar via Graphviz &#8211; it actually exports the BNF grammar in Graphviz&#8217;s .dot format which your can later use in order to create a jpeg, png or even a vector image.</p>
<p>For example, <a href="https://www.grhack.net/files/opensat/C.png.gz">here&#8217;s</a> how libbnf visualizes <a href="https://www.grhack.net/files/opensat/C.bnf">this</a> C grammar (K&amp;R with minor modifications).</p>
<p>Libbnf requires libdatastruct which you can download from <a href="https://www.grhack.net/cgi-bin/cvsweb/opensat/libdatastruct/">here</a>. Unfortunately, libdatastruct still lacks proper documentation. </p>
<p>You can download libbnf from this <a href="https://www.grhack.net/cgi-bin/cvsweb/opensat/libbnf/">location</a>. Make sure you read the REAMDE, test.c, test.bnf and C.bnf files before using libbnf in your programs. If you encounter any problems, bugs etc let me know by mailing me. Please do not post compilation errors in the comment section!</p>
<p>Waiting for your feedback!<br />
&#8211; dp</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/decepticonpunk.wordpress.com/36/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/decepticonpunk.wordpress.com/36/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/decepticonpunk.wordpress.com/36/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/decepticonpunk.wordpress.com/36/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/decepticonpunk.wordpress.com/36/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/decepticonpunk.wordpress.com/36/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/decepticonpunk.wordpress.com/36/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/decepticonpunk.wordpress.com/36/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/decepticonpunk.wordpress.com/36/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/decepticonpunk.wordpress.com/36/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=dp.grhack.net&blog=9185430&post=36&subd=decepticonpunk&ref=&feed=1" />]]></content:encoded>
			<wfw:commentRss>http://dp.grhack.net/2009/09/22/announcing-libbnf-v1-0/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/58749f444c40ea81aa9d5b3cd664a6ea?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">decepticonpunk</media:title>
		</media:content>
	</item>
		<item>
		<title>Python in noexec-land</title>
		<link>http://dp.grhack.net/2009/09/17/python-in-noexec-land/</link>
		<comments>http://dp.grhack.net/2009/09/17/python-in-noexec-land/#comments</comments>
		<pubDate>Thu, 17 Sep 2009 13:07:55 +0000</pubDate>
		<dc:creator>decepticonpunk</dc:creator>
				<category><![CDATA[Vulnerabilities and exploits]]></category>

		<guid isPermaLink="false">http://decepticonpunk.wordpress.com/?p=12</guid>
		<description><![CDATA[About two or three days ago, me and <a href="mailto:slasher@grhack.net">slasher</a> had our special version of wargames. We quickly noticed that although the system we came acorss used a vulnerable kernel, it actually had all the writable partitions mounted as noexec. So what could we do?<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=dp.grhack.net&blog=9185430&post=12&subd=decepticonpunk&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<p>About two or three days ago, me and <a href="mailto:slasher@grhack.net">slasher</a> had our special version of wargames. We quickly noticed that although the system we came across used a vulnerable kernel, it actually had all the writable partitions mounted as noexec. So what could we do?</p>
<p>It is of common belief that interpreted languages like perl, ruby or python, are pretty useful when you are under strict noexec permissions. The source scripts can be executed without requiring +x on the target .pl, .rb or .py file. So that was the next thing we looked for and we immediately found out that the target box had perl and python installed.</p>
<p>Perl and python are both very nice programming languages, but personally I prefer python. Well, actually it is not only a matter of personal taste. Python supports a feature called FFI (Foreign Function Interface) which allows any python coder to directly call any C function from any shared object. FFI is not a python specific feature, in fact, the term FFI usually refers to interpreter infrastructure. For more info you can have a look <a href="http://en.wikipedia.org/wiki/Foreign_function_interface">here</a> and <a href="http://docs.python.org/library/ctypes.html">here</a>. Python&#8217;s FFI includes support for structures, unions and&#8230; pointers!</p>
<p>Great news! Since python permits pointer usage via the ctypes FFI library, it is also implied that we can allocate, deallocate, dereference and even find the address of a buffer within the context of an interpreted language (does perl have a feature like that?). By combining what was said so far, we can build or port any exploit in python. We chose to port the public exploit for the <a href="http://blog.cr0.org/2009/08/linux-null-pointer-dereference-due-to.html">proto_ops[] NULL pointer dereference</a>, a bug discovered by Julien Tinnes and Travis Ormandy of Google security, and we did have a great success.</p>
<pre style="font-size:12px;font-family:courier new;white-space:pre-wrap;">
sh-3.2$ uname -a
Linux xxx 2.6.27.8-xxx #4 SMP PREEMPT Sun Aug 9 20:31:40 EEST 2009 i686 Intel(R) Core(TM)2 Duo CPU T5450 @ 1.66GHz GenuineIntel GNU/Linux
sh-3.2$ python proto_ops_exp.py
Linux &lt;= 2.6.30.4 proto_ops[] NULL pointer dereference exploit
Using Python&#39;s FFI to bypass noexec!

# Current uid=101 and current gid=102
# Reported page size is 4096 bytes
# Copying uid and gid in the heap
# Copied 4 bytes at 0x082c3940
# Copied 4 bytes at 0x082c3930
# Copying &quot;/bin/sh&quot; string in the heap
# Copied 7 bytes at 0x082c4f50
# Copying exit_code() in the heap
# Copied 15 bytes at 0x08276678
# Copying exit_stack[] in the heap
# Copied 4096 bytes at 0x082dfb80
# Loading kernel_code() in the null page
# Copied 406 bytes of shellcode at 0x00000000
# If you don&#39;t get root you are an idiot
bash-3.2# id
uid=0(root) gid=0(root) groups=102(xxx)
bash-3.2# echo burp &amp;&amp; exit
burp
exit
</pre>
<p>For very obvious reasons, I won&#8217;t publish the python code of the above exploit. It is fairly easy for any programmer to code one of his own (python manuals are self explanatory and the vulnerability is public since around August 13th). So, have a nice time porting your codes!</p>
<p>&#8211; dp</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/decepticonpunk.wordpress.com/12/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/decepticonpunk.wordpress.com/12/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/decepticonpunk.wordpress.com/12/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/decepticonpunk.wordpress.com/12/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/decepticonpunk.wordpress.com/12/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/decepticonpunk.wordpress.com/12/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/decepticonpunk.wordpress.com/12/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/decepticonpunk.wordpress.com/12/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/decepticonpunk.wordpress.com/12/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/decepticonpunk.wordpress.com/12/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=dp.grhack.net&blog=9185430&post=12&subd=decepticonpunk&ref=&feed=1" />]]></content:encoded>
			<wfw:commentRss>http://dp.grhack.net/2009/09/17/python-in-noexec-land/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/58749f444c40ea81aa9d5b3cd664a6ea?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">decepticonpunk</media:title>
		</media:content>
	</item>
		<item>
		<title>printf(&#8220;Hello world!\n&#8221;);</title>
		<link>http://dp.grhack.net/2009/08/26/hello-world/</link>
		<comments>http://dp.grhack.net/2009/08/26/hello-world/#comments</comments>
		<pubDate>Wed, 26 Aug 2009 17:46:30 +0000</pubDate>
		<dc:creator>decepticonpunk</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false"></guid>
		<description><![CDATA[Hello everyone, this is my first post. Hopefully, soon enough I&#8217;ll start posting more interesting stuff than those ugly introductional texts. For now, you can only have a look at what this blog is about. See you soon! &#8211; dp<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=dp.grhack.net&blog=9185430&post=1&subd=decepticonpunk&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<p>
Hello everyone, this is my first post. Hopefully, soon enough I&#8217;ll start posting more interesting stuff than those ugly introductional texts. For now, you can only have a look at <a href="/about">what this blog is about</a>.
</p>
<p>
See you soon! <br />
&#8211; dp</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/decepticonpunk.wordpress.com/1/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/decepticonpunk.wordpress.com/1/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/decepticonpunk.wordpress.com/1/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/decepticonpunk.wordpress.com/1/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/decepticonpunk.wordpress.com/1/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/decepticonpunk.wordpress.com/1/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/decepticonpunk.wordpress.com/1/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/decepticonpunk.wordpress.com/1/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/decepticonpunk.wordpress.com/1/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/decepticonpunk.wordpress.com/1/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=dp.grhack.net&blog=9185430&post=1&subd=decepticonpunk&ref=&feed=1" />]]></content:encoded>
			<wfw:commentRss>http://dp.grhack.net/2009/08/26/hello-world/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/58749f444c40ea81aa9d5b3cd664a6ea?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">decepticonpunk</media:title>
		</media:content>
	</item>
	</channel>
</rss>