<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>IA32 on Zach Alexander</title><link>https://zpalexander.com/tags/ia32/</link><description>Recent content in IA32 on Zach Alexander</description><generator>Hugo</generator><language>en-us</language><lastBuildDate>Sat, 10 Jan 2015 12:09:45 -0800</lastBuildDate><atom:link href="https://zpalexander.com/tags/ia32/index.xml" rel="self" type="application/rss+xml"/><item><title>Binary Bomb Lab :: Phase 6</title><link>https://zpalexander.com/posts/binary-bomb-lab-phase-6/</link><pubDate>Sat, 10 Jan 2015 12:09:45 -0800</pubDate><guid>https://zpalexander.com/posts/binary-bomb-lab-phase-6/</guid><description>&lt;p&gt;A note to the reader: For explanation on how to set up the lab environment see the &lt;a href="https://zpalexander.com/posts/binary-bomb-lab-set-up/"&gt;&amp;ldquo;Introduction&amp;rdquo;&lt;/a&gt; section of the post.&lt;/p&gt;&#10;&lt;p&gt;If you&amp;rsquo;re looking for a specific phase:&lt;/p&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;&lt;a href="https://zpalexander.com/posts/binary-bomb-lab-phase-1/"&gt;Here is Phase 1&lt;/a&gt;&lt;/li&gt;&#10;&lt;li&gt;&lt;a href="https://zpalexander.com/posts/binary-bomb-lab-phase-2/"&gt;Here is Phase 2&lt;/a&gt;&lt;/li&gt;&#10;&lt;li&gt;&lt;a href="https://zpalexander.com/posts/binary-bomb-lab-phase-3/"&gt;Here is Phase 3&lt;/a&gt;&lt;/li&gt;&#10;&lt;li&gt;&lt;a href="https://zpalexander.com/posts/binary-bomb-lab-phase-4/"&gt;Here is Phase 4&lt;/a&gt;&lt;/li&gt;&#10;&lt;li&gt;&lt;a href="https://zpalexander.com/posts/binary-bomb-lab-phase-5/"&gt;Here is Phase 5&lt;/a&gt;&lt;/li&gt;&#10;&lt;li&gt;&lt;a href="https://zpalexander.com/posts/binary-bomb-lab-phase-6/"&gt;Here is Phase 6&lt;/a&gt;&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;hr&gt;&#10;&lt;p&gt;This phase is definitely the trickiest out of all of the other bomb lab phases. Prepare for data structures…&lt;/p&gt;</description></item><item><title>Binary Bomb Lab :: Phase 5</title><link>https://zpalexander.com/posts/binary-bomb-lab-phase-5/</link><pubDate>Fri, 09 Jan 2015 12:09:45 -0800</pubDate><guid>https://zpalexander.com/posts/binary-bomb-lab-phase-5/</guid><description>&lt;p&gt;A note to the reader: For explanation on how to set up the lab environment see the &lt;a href="https://zpalexander.com/posts/binary-bomb-lab-set-up/"&gt;&amp;ldquo;Introduction&amp;rdquo;&lt;/a&gt; section of the post.&lt;/p&gt;&#10;&lt;p&gt;If you&amp;rsquo;re looking for a specific phase:&lt;/p&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;&lt;a href="https://zpalexander.com/posts/binary-bomb-lab-phase-1/"&gt;Here is Phase 1&lt;/a&gt;&lt;/li&gt;&#10;&lt;li&gt;&lt;a href="https://zpalexander.com/posts/binary-bomb-lab-phase-2/"&gt;Here is Phase 2&lt;/a&gt;&lt;/li&gt;&#10;&lt;li&gt;&lt;a href="https://zpalexander.com/posts/binary-bomb-lab-phase-3/"&gt;Here is Phase 3&lt;/a&gt;&lt;/li&gt;&#10;&lt;li&gt;&lt;a href="https://zpalexander.com/posts/binary-bomb-lab-phase-4/"&gt;Here is Phase 4&lt;/a&gt;&lt;/li&gt;&#10;&lt;li&gt;&lt;a href="https://zpalexander.com/posts/binary-bomb-lab-phase-5/"&gt;Here is Phase 5&lt;/a&gt;&lt;/li&gt;&#10;&lt;li&gt;&lt;a href="https://zpalexander.com/posts/binary-bomb-lab-phase-6/"&gt;Here is Phase 6&lt;/a&gt;&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;hr&gt;&#10;&lt;p&gt;Ok, let’s get right to it and dig into the &lt;code&gt;&amp;lt;phase_5&amp;gt;&lt;/code&gt; code:&lt;/p&gt;&#10;&lt;p&gt;&lt;img src="https://zpalexander.com/images/binary-bomb/phase-5-overview.png" alt="Phase 5 overview"&gt;&lt;/p&gt;&#10;&lt;p&gt;So, what have we got here? First things first, we can see from the call to &lt;code&gt;&amp;lt;string_length&amp;gt;&lt;/code&gt; at &lt;code&gt;&amp;lt;phase_5+23&amp;gt;&lt;/code&gt; and subsequent jump equal statement our string should be six characters long.&lt;/p&gt;</description></item><item><title>Binary Bomb Lab :: Phase 4</title><link>https://zpalexander.com/posts/binary-bomb-lab-phase-4/</link><pubDate>Thu, 08 Jan 2015 12:09:45 -0800</pubDate><guid>https://zpalexander.com/posts/binary-bomb-lab-phase-4/</guid><description>&lt;p&gt;A note to the reader: For explanation on how to set up the lab environment see the &lt;a href="https://zpalexander.com/posts/binary-bomb-lab-set-up/"&gt;&amp;ldquo;Introduction&amp;rdquo;&lt;/a&gt; section of the post.&lt;/p&gt;&#10;&lt;p&gt;If you&amp;rsquo;re looking for a specific phase:&lt;/p&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;&lt;a href="https://zpalexander.com/posts/binary-bomb-lab-phase-1/"&gt;Here is Phase 1&lt;/a&gt;&lt;/li&gt;&#10;&lt;li&gt;&lt;a href="https://zpalexander.com/posts/binary-bomb-lab-phase-2/"&gt;Here is Phase 2&lt;/a&gt;&lt;/li&gt;&#10;&lt;li&gt;&lt;a href="https://zpalexander.com/posts/binary-bomb-lab-phase-3/"&gt;Here is Phase 3&lt;/a&gt;&lt;/li&gt;&#10;&lt;li&gt;&lt;a href="https://zpalexander.com/posts/binary-bomb-lab-phase-4/"&gt;Here is Phase 4&lt;/a&gt;&lt;/li&gt;&#10;&lt;li&gt;&lt;a href="https://zpalexander.com/posts/binary-bomb-lab-phase-5/"&gt;Here is Phase 5&lt;/a&gt;&lt;/li&gt;&#10;&lt;li&gt;&lt;a href="https://zpalexander.com/posts/binary-bomb-lab-phase-6/"&gt;Here is Phase 6&lt;/a&gt;&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;hr&gt;&#10;&lt;h4 id="phase-4"&gt;Phase 4&lt;/h4&gt;&#10;&lt;p&gt;In my opinion, this is where things start to get tricky. In this phase, it is not enough to simply understand the assembly. Some pattern-recognition will be required. As usual, let&amp;rsquo;s start by taking a look at the code for this phase&amp;rsquo;s function to see if we can find a vector through which to understand what&amp;rsquo;s happening. I&amp;rsquo;m going to do so by running gdb with a test string and using disas:&lt;/p&gt;</description></item><item><title>Binary Bomb Lab :: Phase 3</title><link>https://zpalexander.com/posts/binary-bomb-lab-phase-3/</link><pubDate>Wed, 07 Jan 2015 12:09:45 -0800</pubDate><guid>https://zpalexander.com/posts/binary-bomb-lab-phase-3/</guid><description>&lt;p&gt;A note to the reader: For explanation on how to set up the lab environment see the &lt;a href="https://zpalexander.com/posts/binary-bomb-lab-set-up/"&gt;&amp;ldquo;Introduction&amp;rdquo;&lt;/a&gt; section of the post.&lt;/p&gt;&#10;&lt;p&gt;If you&amp;rsquo;re looking for a specific phase:&lt;/p&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;&lt;a href="https://zpalexander.com/posts/binary-bomb-lab-phase-1/"&gt;Here is Phase 1&lt;/a&gt;&lt;/li&gt;&#10;&lt;li&gt;&lt;a href="https://zpalexander.com/posts/binary-bomb-lab-phase-2/"&gt;Here is Phase 2&lt;/a&gt;&lt;/li&gt;&#10;&lt;li&gt;&lt;a href="https://zpalexander.com/posts/binary-bomb-lab-phase-3/"&gt;Here is Phase 3&lt;/a&gt;&lt;/li&gt;&#10;&lt;li&gt;&lt;a href="https://zpalexander.com/posts/binary-bomb-lab-phase-4/"&gt;Here is Phase 4&lt;/a&gt;&lt;/li&gt;&#10;&lt;li&gt;&lt;a href="https://zpalexander.com/posts/binary-bomb-lab-phase-5/"&gt;Here is Phase 5&lt;/a&gt;&lt;/li&gt;&#10;&lt;li&gt;&lt;a href="https://zpalexander.com/posts/binary-bomb-lab-phase-6/"&gt;Here is Phase 6&lt;/a&gt;&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;hr&gt;&#10;&lt;p&gt;By now you know the drill. Off to our objdump file!&lt;/p&gt;&#10;&lt;p&gt;&lt;img src="https://zpalexander.com/images/binary-bomb/phase-3-objdump.gif" alt="Phase 3 object dump"&gt;&lt;/p&gt;&#10;&lt;p&gt;Woah. There are a lot of conditionals here. Maybe you’re an IA32 warrior who can take one look at this code and immediately tell what is going on, but for the rest of us, an iterative approach might work better here.&lt;/p&gt;</description></item><item><title>Binary Bomb Lab :: Phase 2</title><link>https://zpalexander.com/posts/binary-bomb-lab-phase-2/</link><pubDate>Tue, 06 Jan 2015 06:48:00 -0800</pubDate><guid>https://zpalexander.com/posts/binary-bomb-lab-phase-2/</guid><description>&lt;p&gt;A note to the reader: For explanation on how to set up the lab environment see the &lt;a href="https://zpalexander.com/posts/binary-bomb-lab-set-up/"&gt;&amp;ldquo;Introduction&amp;rdquo;&lt;/a&gt; section of the post.&lt;/p&gt;&#10;&lt;p&gt;If you&amp;rsquo;re looking for a specific phase:&lt;/p&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;&lt;a href="https://zpalexander.com/posts/binary-bomb-lab-phase-1/"&gt;Here is Phase 1&lt;/a&gt;&lt;/li&gt;&#10;&lt;li&gt;&lt;a href="https://zpalexander.com/posts/binary-bomb-lab-phase-2/"&gt;Here is Phase 2&lt;/a&gt;&lt;/li&gt;&#10;&lt;li&gt;&lt;a href="https://zpalexander.com/posts/binary-bomb-lab-phase-3/"&gt;Here is Phase 3&lt;/a&gt;&lt;/li&gt;&#10;&lt;li&gt;&lt;a href="https://zpalexander.com/posts/binary-bomb-lab-phase-4/"&gt;Here is Phase 4&lt;/a&gt;&lt;/li&gt;&#10;&lt;li&gt;&lt;a href="https://zpalexander.com/posts/binary-bomb-lab-phase-5/"&gt;Here is Phase 5&lt;/a&gt;&lt;/li&gt;&#10;&lt;li&gt;&lt;a href="https://zpalexander.com/posts/binary-bomb-lab-phase-6/"&gt;Here is Phase 6&lt;/a&gt;&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;hr&gt;&#10;&lt;p&gt;Ok, now things get a lot more interesting a lot more quickly. Let’s get started the same way we did last time, by looking at our objdump file for clues:&lt;/p&gt;</description></item><item><title>Binary Bomb Lab :: Phase 1</title><link>https://zpalexander.com/posts/binary-bomb-lab-phase-1/</link><pubDate>Mon, 05 Jan 2015 12:09:45 -0800</pubDate><guid>https://zpalexander.com/posts/binary-bomb-lab-phase-1/</guid><description>&lt;p&gt;A note to the reader: For explanation on how to set up the lab environment see the &lt;a href="https://zpalexander.com/posts/binary-bomb-lab-set-up/"&gt;&amp;ldquo;Introduction&amp;rdquo;&lt;/a&gt; section of the post.&lt;/p&gt;&#10;&lt;p&gt;If you&amp;rsquo;re looking for a specific phase:&lt;/p&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;&lt;a href="https://zpalexander.com/posts/binary-bomb-lab-phase-1/"&gt;Here is Phase 1&lt;/a&gt;&lt;/li&gt;&#10;&lt;li&gt;&lt;a href="https://zpalexander.com/posts/binary-bomb-lab-phase-2/"&gt;Here is Phase 2&lt;/a&gt;&lt;/li&gt;&#10;&lt;li&gt;&lt;a href="https://zpalexander.com/posts/binary-bomb-lab-phase-3/"&gt;Here is Phase 3&lt;/a&gt;&lt;/li&gt;&#10;&lt;li&gt;&lt;a href="https://zpalexander.com/posts/binary-bomb-lab-phase-4/"&gt;Here is Phase 4&lt;/a&gt;&lt;/li&gt;&#10;&lt;li&gt;&lt;a href="https://zpalexander.com/posts/binary-bomb-lab-phase-5/"&gt;Here is Phase 5&lt;/a&gt;&lt;/li&gt;&#10;&lt;li&gt;&lt;a href="https://zpalexander.com/posts/binary-bomb-lab-phase-6/"&gt;Here is Phase 6&lt;/a&gt;&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;hr&gt;&#10;&lt;p&gt;Phase 1 is sort of the “Hello World” of the Bomb Lab. You will have to run through the reverse engineering process, but there won’t be much in the way of complicated assembly to decipher or tricky mental hoops to jump through. To begin, let’s take a look at the &lt;code&gt;&amp;lt;phase_1&amp;gt;&lt;/code&gt; function in our objdump file:&lt;/p&gt;</description></item><item><title>Binary Bomb Lab :: Set Up</title><link>https://zpalexander.com/posts/binary-bomb-lab-set-up/</link><pubDate>Sun, 04 Jan 2015 12:09:42 -0800</pubDate><guid>https://zpalexander.com/posts/binary-bomb-lab-set-up/</guid><description>&lt;p&gt;The first step on your way to getting through the bomb lab will be setting up your environment. This page will assume that you have decided to do the lab for fun and profit. If you are a student, you’ve probably already been given these materials by your professor. Get to work.&lt;/p&gt;&#10;&lt;p&gt;You can find all the necessary files on the &lt;a href="http://csapp.cs.cmu.edu/public/labs.html"&gt;“Lab Assignments” page of Bryant and O’Hallaron’s website&lt;/a&gt;, or you can download all the pieces individually.&lt;/p&gt;</description></item></channel></rss>