<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
   <channel>
      <title>Hex blog</title>
      <link>http://hexblog.com/</link>
      <description>About IDA Pro, decompilation, programming, binary program analysis, information security.</description>
      <language>en</language>
      <copyright>Copyright 2008</copyright>
      <lastBuildDate>Fri, 21 Nov 2008 13:54:43 +0100</lastBuildDate>
      <generator>http://www.sixapart.com/movabletype/?v=3.2</generator>
      <docs>http://blogs.law.harvard.edu/tech/rss</docs> 

            <item>
         <title>IDA and MIPS</title>
         <description><![CDATA[<p>If you analyze MIPS binaries, you may find useful the following addition to IDA:</p>

<p><a href="http://www.binary-art.net/?p=1002">http://www.binary-art.net/?p=1002</a></p>

<p>This is MIPS emulator for Linux. It can generate an IDC script after emulation, which then can be applied to the database and make it more readable.</p>

<p> </p>]]></description>
         <link>http://hexblog.com/2008/11/ida_and_mips.html</link>
         <guid>http://hexblog.com/2008/11/ida_and_mips.html</guid>
         <category>IDA Pro</category>
         <pubDate>Fri, 21 Nov 2008 13:54:43 +0100</pubDate>
      </item>
            <item>
         <title>Bochs plugin goes alpha</title>
         <description><![CDATA[<p><a href="http://bochs.sourceforge.net/"><img valign="top" border="0" src="http://www.hexblog.com/ida_pro/pix/bochs.jpg" alt="Bochs emulator" align="left" style="padding-right:5px"/></a><br />
Bochs debugger plugin is in alpha stage now, all of the 3 loaders mentioned in the <a href="http://hexblog.com/2008/10/bochs_emulator_and_ida.html#more">previous blog entry</a>, are now complete.</p>]]></description>
         <link>http://hexblog.com/2008/11/bochs_plugin_goes_alpha.html</link>
         <guid>http://hexblog.com/2008/11/bochs_plugin_goes_alpha.html</guid>
         <category>IDA Pro</category>
         <pubDate>Fri, 07 Nov 2008 12:51:41 +0100</pubDate>
      </item>
            <item>
         <title>From simple to complex</title>
         <description><![CDATA[The last week Elias ran a sample malware in the <a href="http://hexblog.com/2008/10/bochs_emulator_and_ida.html">Bochs emulator</a> and I was curious to see what it exactly does. 

So I took the unpacked version of the malware and fed it into the decompiler. It turned out to be a pretty short downloadler (different AV vendors give it different names: <em>Lighty</em> 
after the compression method, or <em>FraudLoad</em>, or <em>FakeAlert</em>, etc). Such simple code is very easy to decompile. I renamed some functions and added some 
comments to it. The final text looks like this:
]]></description>
         <link>http://hexblog.com/2008/10/from_simple_to_complex.html</link>
         <guid>http://hexblog.com/2008/10/from_simple_to_complex.html</guid>
         <category>Decompilation</category>
         <pubDate>Fri, 10 Oct 2008 18:22:30 +0100</pubDate>
      </item>
            <item>
         <title>Bochs Emulator and IDA?</title>
         <description><![CDATA[<p><a href="http://bochs.sourceforge.net/"><img valign="top" border="0" src="http://www.hexblog.com/ida_pro/pix/bochs.jpg" alt="Bochs emulator" align="left" style="padding-right:5px"/></a><br />
The next version of IDA will be released with a bochs debugger plugin, and what is nice about is that you will be able to use it easily by just downloading bochs executables and telling IDA where to find it.</p>]]></description>
         <link>http://hexblog.com/2008/10/bochs_emulator_and_ida.html</link>
         <guid>http://hexblog.com/2008/10/bochs_emulator_and_ida.html</guid>
         <category>IDA Pro</category>
         <pubDate>Fri, 03 Oct 2008 00:11:14 +0100</pubDate>
      </item>
            <item>
         <title>BITS used as a covert channel</title>
         <description><![CDATA[<div style=" background-image: url(/decompilation/pix/redcables.jpg);background-repeat: no-repeat">
The idea to use BITS to download files from the internet is not new. If you check the corresponding page from Wikipedia, you will find that

<p><a href="http://en.wikipedia.org/wiki/Background_Intelligent_Transfer_Service">Background Intelligent Transfer Service (BITS) is a component of modern Microsoft Windows operating systems that facilitates prioritized, throttled, and asynchronous transfer of files between machines using idle network bandwidth.</a></p>

<p>The web page ends with a list of third-party applications that use BITS. However, as any technical method, it can be used for evil purposes as well. Eric Landuyt analyzed a malware that exploits it for bad:</p>

<p><a href="http://www.datarescue.com/laboratory/trojan2008/index.html">http://www.datarescue.com/laboratory/trojan2008/index.html</a></p>

<p>I liked the "proof of concept" WinDbg script that runs the malware in a controlled manner. Breakpoints with actions are very powerful, indeed.</p>

<p>Nice work, Eric! <img src="/decompilation/pix/thumbsup.gif" /><br />
</div></p>]]></description>
         <link>http://hexblog.com/2008/09/bits_used_as_a_covert_channel.html</link>
         <guid>http://hexblog.com/2008/09/bits_used_as_a_covert_channel.html</guid>
         <category>Decompilation</category>
         <pubDate>Thu, 25 Sep 2008 23:12:18 +0100</pubDate>
      </item>
            <item>
         <title>The IDA Pro book</title>
         <description><![CDATA[<center>
<a href="http://nostarch.com/idapro.htm">
<img src="http://www.hexblog.com/ida_pro/pix/idabook.jpg">
</a>
</center>
<p>
This is not the first book about IDA Pro. However, this is the first
book I recommend to anyone using IDA Pro because of the following points:
<ul>
<li><b>Comprehensive</b>: it describes all major IDA features
by starting at the beginning and going all the way to the end.
Experienced users may be tempted to skip the first few chapters; resist this
temptation and you will discover something new (I did :)

<li><b>Accurate</b>: it is very difficult to be detailed and precise when describing
such a complex product. Chris does it excellently well.

<li><b>Real</b>: handles real world malware, packers, and obfuscated code

<li><b>No fillers</b>: it is direct and concise

<li><b>Profound</b>: this is not just a collection of recipes or tricks, but will give
you a better understanding of the IDA architecture, thus saving you
from unnecessary frustration. Knowing the limitations of your tool is just as
important as knowing its capabilities.


</ul>
It comes tons of code snippets, scripts, and sample modules. Programming for IDA Pro is covered
too: from simple plugins to processor modules.
<p>
If you want to use IDA efficiently, get your copy from <a href="http://nostarch.com/idapro.htm">No Starch Press</a>!
<p>
<small>
UPD for numerologists: the book has exactly 640 pages, no less, no more!
</small>]]></description>
         <link>http://hexblog.com/2008/08/the_ida_pro_book_1.html</link>
         <guid>http://hexblog.com/2008/08/the_ida_pro_book_1.html</guid>
         <category>IDA Pro</category>
         <pubDate>Tue, 26 Aug 2008 18:53:07 +0100</pubDate>
      </item>
            <item>
         <title>Mr. Bachaalany joins Hex-Rays</title>
         <description><![CDATA[<p>I'm happy to tell you that Mr. Elias Bachaalany has joined our development team!</p>

<p>He is one of keenest and most knowledgeable IDA users. Elias bought his first copy of IDA long ago while he was a student. Immediately after that he contacted us with tons of questions, suggestions, ideas how to improve things, etc. While we addressed most his questions, we could not handle everything. Then he designed and implemented many free and open source scripts and plugins for IDA.</p>

<p>We are lucky to have him in our team. I'm sure that very soon we will see new nice features in IDA Pro created by Elias. Stay tuned!</p>]]></description>
         <link>http://hexblog.com/2008/08/mr_bachaalany_joins_hexrays.html</link>
         <guid>http://hexblog.com/2008/08/mr_bachaalany_joins_hexrays.html</guid>
         <category>IDA Pro</category>
         <pubDate>Thu, 21 Aug 2008 15:25:33 +0100</pubDate>
      </item>
            <item>
         <title>Blackhat USA 2008</title>
         <description><![CDATA[<p>Sometimes names just do not reflect the nature of things. Sometimes it is our fault to attribute a wrong meaning to  names. I do not know which of the above holds for Windows ASLR. After Alex Sotirov and Mark Dowd's <a href="https://www.blackhat.com/html/bh-usa-08/bh-usa-08-speakers.html#Sotirov">talk</a>  at Blackhat I know that ASLR is not <b>that</b> random despite of its name.</p>

<p>The <a href="http://en.wikipedia.org/wiki/Address_space_layout_randomization">ASLR </a> abbreviation contains "randomization", which is enough (at least for me) to deduce that EXEs and DLLs get loaded at randomly chosen addresses. I was wrong to think that this makes it hard for the attacker to guess the loaded addresses. As it turns out, binaries get loaded to somehow predictable addresses.</p>

<p>While I understand that there were some technical difficulties and compatibility issues, the implementation choices made for ASLR effectively weakened it a lot to the point that it failed to deliver the promised.</p>

<p>Another revelation of this talk was that IE happily loads any .NET DLL provided by the web server using the plain old LoadLibrary function. The ramifications of this are enormous because the system is essentially accepting raw binary data (a file of the PE file format) and runs it on the user's computer. No need to talk about GS, SafeSEH and any other protections mechanisms after this.</p>

<p>The outcome of these two choices is also predictable, as Alex and Mark demonstrated to us: anyone visiting a malicious web site with IE can be easily owned.</p>

<p>There were other interesting talks at Blackhat, no way I can mention all of them here. Just one more pointer: I was amused and amazed by Hovav Scacham's <a href="https://www.blackhat.com/html/bh-usa-08/bh-usa-08-speakers.html#Shacham"> Return-Oriented Programming</a>. As it turns out, pieces of "good" code in standard libraries can be used to build a turing-complete machine. This machine is programmable by the attacker using a byte code which does not require the X (execute) bit in the page permissions. This defeats W^X or DEP protections.</p>

<p>My <a href="http://www.hex-rays.com/idapro/ppt/decompilers_and_beyond.ppt">talk</a> on decompilers was received well. If you missed it, find the <a href="http://www.hex-rays.com/idapro/ppt/decompilers_and_beyond_white_paper.pdf">white paper</a> here.</p>

<p>Heading to DEFCON now, for more interesting talks!<br />
</p>]]></description>
         <link>http://hexblog.com/2008/08/blackhat_usa_2008.html</link>
         <guid>http://hexblog.com/2008/08/blackhat_usa_2008.html</guid>
         <category>Security</category>
         <pubDate>Sat, 09 Aug 2008 19:01:03 +0100</pubDate>
      </item>
            <item>
         <title>IDA on iPhone</title>
         <description><![CDATA[<p>Good news for real iPhone fans: we ported IDA to iPhone! It can handle any application and provides the same analysis as on other platforms. It is funny to see IDA on a such small device:</p>

<p><img src="/ida_pro/pix/iphone1.jpg" /></p>]]></description>
         <link>http://hexblog.com/2008/07/ida_on_iphone.html</link>
         <guid>http://hexblog.com/2008/07/ida_on_iphone.html</guid>
         <category>IDA Pro</category>
         <pubDate>Wed, 23 Jul 2008 21:30:16 +0100</pubDate>
      </item>
            <item>
         <title>Apple&apos;s variant of ptrace()</title>
         <description><![CDATA[<p>Have you ever tried to create a debugger for Mac OS X? It is an adventurous enterprise with lots of unexpected (should I say unforeseeable?) problems. This guy tried and described his adventures in this entertaining post:</p>

<p><a href="http://www.matasano.com/log/1100/what-ive-been-doing-on-my-summer-vacation-or-it-has-to-work-otherwise-gdb-wouldnt/">http://www.matasano.com/log/1100/what-ive-been-doing-on-my-summer-vacation-or-it-has-to-work-otherwise-gdb-wouldnt/</a></p>

<p>His post reminded me of all problems we faced with the first version of the IDA debugger for iMac. They also reminded me of even more convoluted puzzles with the iPhone debugger because ptrace() is broken beyond any hope there (one simple rule: use only PT_TRACEME).</p>

<p>Anyway, if anyone wants to repeat our steps, we are giving away the source code of all debugger modules with the new IDA v5.3: iMac and iPhone debugger codes included. They can certainly help you  to avoid some headache and frustration!</p>]]></description>
         <link>http://hexblog.com/2008/07/apples_variant_of_ptrace.html</link>
         <guid>http://hexblog.com/2008/07/apples_variant_of_ptrace.html</guid>
         <category>IDA Pro</category>
         <pubDate>Thu, 17 Jul 2008 14:45:15 +0100</pubDate>
      </item>
            <item>
         <title>Recon2008</title>
         <description><![CDATA[<p><a href="http://recon.cx"><img src="/ida_pro/pix/recon.gif" align=left style="padding: 5px" /></a>The last week I attended the <a href="http://recon.cx/2008/index.html">Recon conference</a>. It was a very enjoyable event, very nicely organized and handled, in a charming city (Montreal). Since I haven't seen many conferences yet, I can not really compare it to others but I think it was really great: real RE stuff with no superficial talks. You can find the slides and videos on the conference site. The following blogs describe the event in more detail:</p>

<p><a href="http://dvlabs.tippingpoint.com/blog/">http://dvlabs.tippingpoint.com/blog/</a><br />
<a href="http://blog.trailofbits.com/2008/06/16/recon-2008-review/">http://blog.trailofbits.com/2008/06/16/recon-2008-review/</a></p>

<p>There were quite a few interesting talks, I especially liked the ones about iMac and iPhone (other talks disclosed new ideas too, it is just that I'm currently working on Apple products ;))</p>

<p>Thanks to the conference organizers for making such an event possible! David, Hugo, Guillaume did an excellent job. Now waiting for the next recon, which will normally be held in 2010.</p>]]></description>
         <link>http://hexblog.com/2008/06/recon2008_1.html</link>
         <guid>http://hexblog.com/2008/06/recon2008_1.html</guid>
         <category>IDA Pro</category>
         <pubDate>Thu, 19 Jun 2008 02:48:08 +0100</pubDate>
      </item>
            <item>
         <title>Testing debuggers</title>
         <description><![CDATA[<p>Software programs must be tested before put in use. When there is a single program, things are relatively simple. Running it on multiple platforms is more challenging because it requires testing all of them. But the real nightmare starts when there are multiple programs running on multiple platforms and going to a high abstract level is not an option.</p>

<p>This is the case with IDA debuggers. The current version supports five different variants: Win32/Win64/WinCE/Linux/iMac but the upcoming v5.3 adds <strong>Symbian</strong> and <strong>iPhone</strong> to the list.</p>

<p>We can not use a high level language for debuggers because the very nature of the information is low level: bits and bytes, registers and memory cells. The core of the debugger operates with some abstractions but this does not make it really impervious to low level details: each platform has its peculiarities. It is more of a disadvantage than a bonus: changing anything in debugger core could introduce a bug in any of the supported platforms, something hard to reproduce and fix.</p>

<p>Given all the above, we decided to spend some time on a test system. And here is the result: custom made, hardcore command line, user agnostic (or unfriendly?) but it does the job. It generates megabytes of logs and can check all debuggers: local or remote, 32 or 64 bit, single or multithreaded.</p>

<p>Below is a link to a short video. I'm sorry for the window size, it is really difficult to fit all windows into a small area.</p>

<center><a href="http://www.hex-rays.com/video/testing_debuggers.html"><img src="/ida_pro/pix/dbgtesting_icon.gif" /></a></center>

<p>One more thing I wanted to tell you: we have the iPhone debugger ready for beta testing. It was a hard job to create it, especially with the broken <em>ptrace</em> on iPhone. I'm still curious to know more about its implementation and limitations...</p>

<p>If you want to participate in beta testing of the <strong>iPhone</strong> debugger, just send us a message.<br />
</p>]]></description>
         <link>http://hexblog.com/2008/06/testing_debuggers.html</link>
         <guid>http://hexblog.com/2008/06/testing_debuggers.html</guid>
         <category>IDA Pro</category>
         <pubDate>Wed, 04 Jun 2008 01:52:56 +0100</pubDate>
      </item>
            <item>
         <title>Some functions are neater than the decompiler thinks</title>
         <description><![CDATA[<p>The decompiler makes some assumptions about the input code. Like that call instructions usually return, the memory model is flat, the function frame is set properly, etc. When these assumptions are correct, the output is good. When they are wrong, well, the output does not correspond to the input. Take, for example, the following snippet:</p>

<p><img style="border:1px solid" src="http://www.hexblog.com/decompilation/pix/spoils_callerasm.gif" /></p>

<p>The decompiler produces the following pseudocode:</p>

<p><img style="border:1px solid" src="http://www.hexblog.com/decompilation/pix/spoils_callerc1.gif" /></p>

<p>Apparently, the <b>v3</b> variable  (it corresponds to <b>edx</b>)  is not initialized at all. Why?</p>]]></description>
         <link>http://hexblog.com/2008/04/some_functions_are_too_neat.html</link>
         <guid>http://hexblog.com/2008/04/some_functions_are_too_neat.html</guid>
         <category>Decompilation</category>
         <pubDate>Wed, 09 Apr 2008 22:22:07 +0100</pubDate>
      </item>
            <item>
         <title>Symbian debugger</title>
         <description><![CDATA[<p>It works! There are lots of limitations but it is alive, handles breakpoints, exceptions, and even some limited tracing is available. It is possible to launch processes and attach to them. Here is just one screenshot:</p>

<p><img style="border:1px" src="http://www.hexblog.com/ida_pro/pix/epoc_debugger.gif" /></p>

<p>Expect many limitations in the first version (no hardware bpts, limited multithread support, etc). One of the most annoying shortcomings is that the memory layout is not determined automatically - we had to introduce 'manual memory regions' window to overcome this.</p>

<p>Since it is a new beast and many aspects need polishing, beta testers are welcome!<br />
</p>]]></description>
         <link>http://hexblog.com/2008/04/symbian_debugger.html</link>
         <guid>http://hexblog.com/2008/04/symbian_debugger.html</guid>
         <category>IDA Pro</category>
         <pubDate>Tue, 08 Apr 2008 19:02:06 +0100</pubDate>
      </item>
            <item>
         <title>Symbian AppTRK</title>
         <description><![CDATA[<p><img align="left" src="http://www.hexblog.com/ida_pro/pix/symbian_logo.jpg" /> Things are quite easy with the Symbian TRK! Today I decided to write a small program to interact with it and everything worked extremely smoothly. My driver program can download a SIS file to the phone, automatically install and run it. It reacts to debugging events and gracefully closes the connection when the application terminates. Below are just a few pictures for the curious. </p>]]></description>
         <link>http://hexblog.com/2008/03/symbian_apptrk.html</link>
         <guid>http://hexblog.com/2008/03/symbian_apptrk.html</guid>
         <category>IDA Pro</category>
         <pubDate>Sat, 29 Mar 2008 02:06:06 +0100</pubDate>
      </item>
      
   </channel>
</rss>
