2. The IDA SDK
IDA is a fantastic disassembler and comes with a variety of debuggers too. While IDA alone has
an amazing amount of functionality, there are always things you'll want to automate or do in some
particular way that IDA doesn't support. Thankfully, the guys at Hex-Rays have released the IDA
SDK: a way for you to hook your own desired functionality into IDA.
There are four types of modules you can write for IDA using the IDA SDK, plug-in modules being
the subject of this tutorial:
Module Type
Purpose
Processor
Adding support for different processor architectures. Also known as
IDP (IDa Processor) modules.
Plug-in
Extending functionality in IDA.
Loader
Adding support for different executable file formats.
Debugger
Adding support for debugging on different platforms and/or interacting
with other debuggers / remote debugging.
From here onwards, the term "plug-in" will be used in place of "plug-in module", unless otherwise
indicated.
The IDA SDK contains all the header and library files you need to write an IDA plug-in. It supports
a number of compilers on Linux, Mac and Windows platforms, and also comes with several
example plug-ins that illustrate a couple of basic features available.
Whether you're a reverse engineer, vulnerability researcher, malware analyst, or a combination of
them, the SDK gives you a tremendous amount of power and flexibility. You could essentially
write your own debugger/disassembler using it, and that's just scratching the surface. Here's a
tiny sample of some very straight-forward things you could do with the SDK:
➢
Automate the analysis and unpacking of packed binaries.
➢
Automate the process of finding the use of particular functions (for example,
LoadLibrary()
,
strcpy(),
and whatever else you can think of.)
➢
Analyse program and/or data flow, looking for things of interest to you.
➢
Binary diff'ing.
➢
Write a de-compiler.
➢
The list goes on..
To see a sample of what some people have written using the IDA SDK, check out the IDA Palace
website or the IDA download page (
http://www.hex-rays.com/idapro/idadown.htm).
2.1 Installation