<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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: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>Comments on: Book Review: The IDA Pro Book</title>
	<atom:link href="http://trailofbits.com/2008/08/29/book-review-the-ida-pro-book/feed/" rel="self" type="application/rss+xml" />
	<link>http://trailofbits.com/2008/08/29/book-review-the-ida-pro-book/</link>
	<description>4888 C3C4 099A 4240 9648  719B 84E0 A6FE 32AE 38F6</description>
	<lastBuildDate>Mon, 02 May 2011 23:50:01 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
	<item>
		<title>By: John McDonald</title>
		<link>http://trailofbits.com/2008/08/29/book-review-the-ida-pro-book/#comment-149</link>
		<dc:creator><![CDATA[John McDonald]]></dc:creator>
		<pubDate>Tue, 02 Sep 2008 16:02:20 +0000</pubDate>
		<guid isPermaLink="false">http://trailofbits.wordpress.com/?p=91#comment-149</guid>
		<description><![CDATA[Yeah, I think I dialed in an appropriate level of vagueness for that comment, as I was pretty curious what the hell I meant too. ;&gt; I think getting stuff like you mentioned wrong comes with the territory when you&#039;re pushing into undocumented stuff. God, a 15-minute conversation with a kernel engineer at Sun probably would have saved us a lot of pain. :&gt;

Just checked out your PowerPC post. Very cool.. I had no idea it was that nuanced, especially with the different designs of L1 cache across the different chips. Mark and I were musing the other night that Intel becoming the dominant PC platform is actually something of a slightly lucky draw for exploitation, as there&#039;s so many little details that roughly work out in your favor. Not to say that it&#039;s really materially easier by any means, as it&#039;s clearly still a challenge. That said, there is a slight confluence of events that you probably wouldn&#039;t notice (or care about ;&gt;) unless you&#039;d spent too much time banging your head against other architectures. (thinking alignment, caching, stack semantics and direction, variable length instructions/fluid instruction boundaries, delay slots, lil endian for partial overwrites, read/exec, and other small random details I&#039;m probably forgetting or otherwise cut both ways).]]></description>
		<content:encoded><![CDATA[<p>Yeah, I think I dialed in an appropriate level of vagueness for that comment, as I was pretty curious what the hell I meant too. ;&gt; I think getting stuff like you mentioned wrong comes with the territory when you&#8217;re pushing into undocumented stuff. God, a 15-minute conversation with a kernel engineer at Sun probably would have saved us a lot of pain. :&gt;</p>
<p>Just checked out your PowerPC post. Very cool.. I had no idea it was that nuanced, especially with the different designs of L1 cache across the different chips. Mark and I were musing the other night that Intel becoming the dominant PC platform is actually something of a slightly lucky draw for exploitation, as there&#8217;s so many little details that roughly work out in your favor. Not to say that it&#8217;s really materially easier by any means, as it&#8217;s clearly still a challenge. That said, there is a slight confluence of events that you probably wouldn&#8217;t notice (or care about ;&gt;) unless you&#8217;d spent too much time banging your head against other architectures. (thinking alignment, caching, stack semantics and direction, variable length instructions/fluid instruction boundaries, delay slots, lil endian for partial overwrites, read/exec, and other small random details I&#8217;m probably forgetting or otherwise cut both ways).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dino Dai Zovi</title>
		<link>http://trailofbits.com/2008/08/29/book-review-the-ida-pro-book/#comment-142</link>
		<dc:creator><![CDATA[Dino Dai Zovi]]></dc:creator>
		<pubDate>Mon, 01 Sep 2008 01:04:02 +0000</pubDate>
		<guid isPermaLink="false">http://trailofbits.wordpress.com/?p=91#comment-142</guid>
		<description><![CDATA[Thanks :).  But to be fair, I only understood that stuff after trying to figure out what the hell you meant in that exploit.  And I even got it wrong publicly also, I made some patently false statements that you can probably find if you look hard enough.  I really only started writing SPARC stuff in early 2000, and that was just lame locals and remotes in crappy web servers, not remotes in BIND (!!@#$).  By then, you had already done most of the hard work.

I ran into similar issues on PowerPC.  The problem there isn&#039;t register windows, it&#039;s the separate data and instruction cache.  I&#039;ll probably write a big blog post on this eventually, but the short version is that with a write-back separate instruction cache, your shellcode isn&#039;t where you expect it to be.  When you jump to the overwritten return address, the CPU fetches instructions directly from RAM and your shellcode is not written to RAM until it is expired from the data cache.  So in order to run your shellcode, you have to cause a trap, system call, or page fault.

So your theory is totally correct.  In my first exploit for DaveG&#039;s OSX AFP bug, I got lucky b/c I could usually trigger a page fault, but it wasn&#039;t deterministic.  I described this problem to dvorak @ DEFCON one year and he asked me, &quot;why not just force it to execute a system call?&quot;  And I thought, duh, that&#039;s way easier.  My next version did a ret-into-libc to execute getuid() and then jumped into my shellcode.  That made the exploit 100% reliable :).

Thanks for the great comments, btw.]]></description>
		<content:encoded><![CDATA[<p>Thanks <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> .  But to be fair, I only understood that stuff after trying to figure out what the hell you meant in that exploit.  And I even got it wrong publicly also, I made some patently false statements that you can probably find if you look hard enough.  I really only started writing SPARC stuff in early 2000, and that was just lame locals and remotes in crappy web servers, not remotes in BIND (!!@#$).  By then, you had already done most of the hard work.</p>
<p>I ran into similar issues on PowerPC.  The problem there isn&#8217;t register windows, it&#8217;s the separate data and instruction cache.  I&#8217;ll probably write a big blog post on this eventually, but the short version is that with a write-back separate instruction cache, your shellcode isn&#8217;t where you expect it to be.  When you jump to the overwritten return address, the CPU fetches instructions directly from RAM and your shellcode is not written to RAM until it is expired from the data cache.  So in order to run your shellcode, you have to cause a trap, system call, or page fault.</p>
<p>So your theory is totally correct.  In my first exploit for DaveG&#8217;s OSX AFP bug, I got lucky b/c I could usually trigger a page fault, but it wasn&#8217;t deterministic.  I described this problem to dvorak @ DEFCON one year and he asked me, &#8220;why not just force it to execute a system call?&#8221;  And I thought, duh, that&#8217;s way easier.  My next version did a ret-into-libc to execute getuid() and then jumped into my shellcode.  That made the exploit 100% reliable <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> .</p>
<p>Thanks for the great comments, btw.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: John McDonald</title>
		<link>http://trailofbits.com/2008/08/29/book-review-the-ida-pro-book/#comment-141</link>
		<dc:creator><![CDATA[John McDonald]]></dc:creator>
		<pubDate>Mon, 01 Sep 2008 00:07:17 +0000</pubDate>
		<guid isPermaLink="false">http://trailofbits.wordpress.com/?p=91#comment-141</guid>
		<description><![CDATA[One last thing - I had a theory that you could also get a context switch / flush from a page fault if it accessed memory/code it hadn&#039;t touched before and needed to pull off disk. (or writing to a copy-on-write page maybe) I never got around to testing it though, so I might have been massively wrong.]]></description>
		<content:encoded><![CDATA[<p>One last thing &#8211; I had a theory that you could also get a context switch / flush from a page fault if it accessed memory/code it hadn&#8217;t touched before and needed to pull off disk. (or writing to a copy-on-write page maybe) I never got around to testing it though, so I might have been massively wrong.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: John McDonald</title>
		<link>http://trailofbits.com/2008/08/29/book-review-the-ida-pro-book/#comment-140</link>
		<dc:creator><![CDATA[John McDonald]]></dc:creator>
		<pubDate>Sun, 31 Aug 2008 23:24:17 +0000</pubDate>
		<guid isPermaLink="false">http://trailofbits.wordpress.com/?p=91#comment-140</guid>
		<description><![CDATA[Damn, I guess I really did miss out on the whole adb thing. All I remember is $ r and $ q I think. You weren&#039;t kidding about learning how to write SPARC overflows, as I stumbled on this the other day:

http://archives.neohapsis.com/archives/vuln-dev/2001-q4/0341.html

I&#039;m impressed. That took forever for me to sort out, and it&#039;s clearly pretty important. I had always meant to go actually study the kernel code that performed the stack flush/return to userland setup of the register windows before I tried to explain it publicly. Never got around to it, and I likely would have failed if I tried. Probably pretty hard. :&gt;

That&#039;s funny that by that time the loading down the machine thing was a known idiom. I did it in a few exploits but never felt comfortable really telling anyone about it because I wasn&#039;t 100% on the details. I did offer a sort-of explanation of inducing load to flush register windows in the header of this one:

http://packetstormsecurity.org/9911-exploits/adm-nxt.c

I made a really stupid mistake in there with memset(), so I hope my reasoning was correct and not just a lucky artifact of my larger C fail. ;&gt;

How bout if I pretend that you preferred adb solely for aesthetic reasons, you&#039;ll overlook the conspicuous omission of register window flushing semantics from my sparc overflow paper? :&gt;

Hexrays is great, but yeah, I don&#039;t know if it&#039;s $2300 great unless you can spend someone else&#039;s money on it. :&gt; There haven&#039;t been any updates in a little while, but the recent-ish IDA addition of the local type database was a huge step for making it more effective.

I think in reality, IDA is probably worth a lot more than he charges for it, so maybe this is his way of making up for his lost millions. ;&gt;]]></description>
		<content:encoded><![CDATA[<p>Damn, I guess I really did miss out on the whole adb thing. All I remember is $ r and $ q I think. You weren&#8217;t kidding about learning how to write SPARC overflows, as I stumbled on this the other day:</p>
<p><a href="http://archives.neohapsis.com/archives/vuln-dev/2001-q4/0341.html" rel="nofollow">http://archives.neohapsis.com/archives/vuln-dev/2001-q4/0341.html</a></p>
<p>I&#8217;m impressed. That took forever for me to sort out, and it&#8217;s clearly pretty important. I had always meant to go actually study the kernel code that performed the stack flush/return to userland setup of the register windows before I tried to explain it publicly. Never got around to it, and I likely would have failed if I tried. Probably pretty hard. :&gt;</p>
<p>That&#8217;s funny that by that time the loading down the machine thing was a known idiom. I did it in a few exploits but never felt comfortable really telling anyone about it because I wasn&#8217;t 100% on the details. I did offer a sort-of explanation of inducing load to flush register windows in the header of this one:</p>
<p><a href="http://packetstormsecurity.org/9911-exploits/adm-nxt.c" rel="nofollow">http://packetstormsecurity.org/9911-exploits/adm-nxt.c</a></p>
<p>I made a really stupid mistake in there with memset(), so I hope my reasoning was correct and not just a lucky artifact of my larger C fail. ;&gt;</p>
<p>How bout if I pretend that you preferred adb solely for aesthetic reasons, you&#8217;ll overlook the conspicuous omission of register window flushing semantics from my sparc overflow paper? :&gt;</p>
<p>Hexrays is great, but yeah, I don&#8217;t know if it&#8217;s $2300 great unless you can spend someone else&#8217;s money on it. :&gt; There haven&#8217;t been any updates in a little while, but the recent-ish IDA addition of the local type database was a huge step for making it more effective.</p>
<p>I think in reality, IDA is probably worth a lot more than he charges for it, so maybe this is his way of making up for his lost millions. ;&gt;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dino Dai Zovi</title>
		<link>http://trailofbits.com/2008/08/29/book-review-the-ida-pro-book/#comment-136</link>
		<dc:creator><![CDATA[Dino Dai Zovi]]></dc:creator>
		<pubDate>Sat, 30 Aug 2008 09:02:50 +0000</pubDate>
		<guid isPermaLink="false">http://trailofbits.wordpress.com/?p=91#comment-136</guid>
		<description><![CDATA[@JohnMcDonald
Heh, I guess the progression that I listed betrayed how I learned IDA and reverse engineering (although I am hesitant to admit that I have yet to actually write any IDC scripts or plugins).  Yes, I am the sunday afternoon kind of IDA user these days...

Adb rocks!  I learned how to write SPARC overflows using it and the Solaris crash dump analysis book.  You had to scroll up to see all the registers w/ gdb but adb displayed them nicely in a way that fit a 80x24 terminal perfectly.  At DEFCON someone asked me why I didn&#039;t use gdb and honestly I didn&#039;t know at the time that you could step by single instructions in gdb, so I had always used adb.

I so crave Hex-Rays.  While I can convince my employer that I need an IDA Pro Advanced license, I have yet to be able to justify paying for licenses for the more fun toys like Hex-Rays and Bin Navi (sorry Halvar!).  I prematurely signed up for technical mediocrity already, so I don&#039;t have to worry about being lame and using Hex-Rays.  Do you wanna see my Excel macros to score vulnerabilities and make pretty pictures?]]></description>
		<content:encoded><![CDATA[<p>@JohnMcDonald<br />
Heh, I guess the progression that I listed betrayed how I learned IDA and reverse engineering (although I am hesitant to admit that I have yet to actually write any IDC scripts or plugins).  Yes, I am the sunday afternoon kind of IDA user these days&#8230;</p>
<p>Adb rocks!  I learned how to write SPARC overflows using it and the Solaris crash dump analysis book.  You had to scroll up to see all the registers w/ gdb but adb displayed them nicely in a way that fit a 80&#215;24 terminal perfectly.  At DEFCON someone asked me why I didn&#8217;t use gdb and honestly I didn&#8217;t know at the time that you could step by single instructions in gdb, so I had always used adb.</p>
<p>I so crave Hex-Rays.  While I can convince my employer that I need an IDA Pro Advanced license, I have yet to be able to justify paying for licenses for the more fun toys like Hex-Rays and Bin Navi (sorry Halvar!).  I prematurely signed up for technical mediocrity already, so I don&#8217;t have to worry about being lame and using Hex-Rays.  Do you wanna see my Excel macros to score vulnerabilities and make pretty pictures?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: John McDonald</title>
		<link>http://trailofbits.com/2008/08/29/book-review-the-ida-pro-book/#comment-135</link>
		<dc:creator><![CDATA[John McDonald]]></dc:creator>
		<pubDate>Fri, 29 Aug 2008 23:15:11 +0000</pubDate>
		<guid isPermaLink="false">http://trailofbits.wordpress.com/?p=91#comment-135</guid>
		<description><![CDATA[I like your progression of IDA skills, though I actually think of it almost in the opposite order. Also, I&#039;m actively procrastinating reversing something at the moment, so it seems fitting that I should posture about reversing on your blog instead of actually doing it. :&gt;

Anyway, I started by converting everything back to C from assembly, but Thomas basically relentlessly mocked me until I developed a complex about it. He also mocked me for using gdb, which was apparently tragically unhip. In case you were curious, the cool kids apparently use adb, which I believe is sort of like a combination of a 1982-era RPN HP calculator and being stabbed in the face. 

I currently fall into the category of the guy who tries to use all the features I can. I basically need all the magic help I can get, and also having stuff to play with in the periphery of the idb is a good way to pretend that I&#039;m working without having to do a whole lot of actual reversing. I do however draw the line at using the debugger, as that would probably run dangerously close to making me productive in C++ code.

Mark is a better reverser than I (lol, most unnecessary sentence ever), but he doesn&#039;t really use much of the built-in stuff, and just annotates the idb with comments. I tried to get him to use the struct interface once but he was deeply suspicious that it was some sort of elaborate trap to make him bad at computers.

Neel is better than both of us, and I don&#039;t think he even uses comments. He just sees it. It actually makes me angry to think about it.

IIRC, Thomas seemed to prefer deadlisting with objdump to IDA for some reason, though it was a really long time ago. Also, he probably did that just to mess with me. Pretty sure he was secretly using gdb when I wasn&#039;t looking.

Anyways, thought I&#039;d share. :&gt; I have a terrible dark expensive shameful secret, which is known as Hex-Rays. I swear to god it&#039;s awesome. I think basically everyone should be given a copy on their 30th birthday, as it can definitely help you buy a couple of months before your inevitable descent into technical mediocrity and male pattern baldness.]]></description>
		<content:encoded><![CDATA[<p>I like your progression of IDA skills, though I actually think of it almost in the opposite order. Also, I&#8217;m actively procrastinating reversing something at the moment, so it seems fitting that I should posture about reversing on your blog instead of actually doing it. :&gt;</p>
<p>Anyway, I started by converting everything back to C from assembly, but Thomas basically relentlessly mocked me until I developed a complex about it. He also mocked me for using gdb, which was apparently tragically unhip. In case you were curious, the cool kids apparently use adb, which I believe is sort of like a combination of a 1982-era RPN HP calculator and being stabbed in the face. </p>
<p>I currently fall into the category of the guy who tries to use all the features I can. I basically need all the magic help I can get, and also having stuff to play with in the periphery of the idb is a good way to pretend that I&#8217;m working without having to do a whole lot of actual reversing. I do however draw the line at using the debugger, as that would probably run dangerously close to making me productive in C++ code.</p>
<p>Mark is a better reverser than I (lol, most unnecessary sentence ever), but he doesn&#8217;t really use much of the built-in stuff, and just annotates the idb with comments. I tried to get him to use the struct interface once but he was deeply suspicious that it was some sort of elaborate trap to make him bad at computers.</p>
<p>Neel is better than both of us, and I don&#8217;t think he even uses comments. He just sees it. It actually makes me angry to think about it.</p>
<p>IIRC, Thomas seemed to prefer deadlisting with objdump to IDA for some reason, though it was a really long time ago. Also, he probably did that just to mess with me. Pretty sure he was secretly using gdb when I wasn&#8217;t looking.</p>
<p>Anyways, thought I&#8217;d share. :&gt; I have a terrible dark expensive shameful secret, which is known as Hex-Rays. I swear to god it&#8217;s awesome. I think basically everyone should be given a copy on their 30th birthday, as it can definitely help you buy a couple of months before your inevitable descent into technical mediocrity and male pattern baldness.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

