Log in

View Full Version : IDA Pro Development Environment


OpenRCE_Saphex
June 9th, 2008, 03:20
Introduction

In this blog entry, I will explain how to set up a nice environment for IDA Pro plug-in development. Instead of an extensive step by step, I will focus on giving the basic pointers. The tools used are Eclipse ("http://www.eclipse.org"), MinGW ("http://www.mingw.org") and IDA Pro SDK ("http://www.hex-rays.com/idapro"). All the tools that I used to set up the environment are freely available, without licensing strings, except for the IDA Pro SDK.

The Tools

Eclipse is a open source multi platform Java ("http://www.java.sun.com") based IDE. It as very good expandability trough a well implemented and defined plug-in architecture that allows it, to support many programming languages, CVS, database and many other. The plug-in that allows Eclipse to support C/C++ is CDT ("http://cdt.eclipse.org").
MinGW, Minimalist GNU for Windows, allows Windows users to compile C/C++ code using the GNU ("http://www.gnu.org") tool sets. It contains freely distributable Windows specific header files and import libraries. Another advantage, over Microsoft tool set, is that makes it easier to develop portable code. Eclipse support for MinGW is excellent.
The IDA Pro SDK it's only available to IDA Pro licensees, but with a little bit of reverse engineering effort, the right tools, some example plug-ins freely available (OpenRCE IDA Plug-ins ("http://www.openrce.org/downloads/browse/IDA_Plugins")) and a visit to IDA Plug-in Tutorial ("http://www.binarypool.com/idapluginwriting") by Steve Micallef ("steve@binarypool.com"), will give the reader all the information needed to develop is own headers for IDA Pro. There is also, a freely available version of IDA Pro, it's IDA Pro 4.9 ("http://www.hex-rays.com/idapro/idadownfreeware.htm"). Even though is outdated and out featured in comparison with IDA Pro 5.2, it still is a excellent choice over other options.

Starting Up

Installing

The first thing to do is download Eclipse ("http://www.eclipse.org/downloads"). You should download the version for C/C++ developers. If you already have Eclipse installed, you can update it trough software updates from the help menu in Eclipse. Eclipse doesn't need to be installed on a specific directory. Note that you should have an updated version of the JRE (Java Runtime Environment ("http://java.sun.com/javase/downloads/index.jsp")). The next step is to download the MinGW installer. It will download all the tools necessary for you. After you completed all the steps above, and assuming that you already have IDA Pro and IDA Pro SDK installed, its time to fire up Eclipse.

Test Project

After starting Eclipse, create a new C++ project. Define the name, and select MinGW toolchain from the shared library.

http://img79.imageshack.us/img79/4387/ss011vj0.jpg
http://img504.imageshack.us/img504/6871/ss010sa4.jpg


Right click on the project and choose properties, it's needed to add the include paths.

http://img26.picoodle.com/img/img26/4/6/8/f_ss012m_f03b4f4.jpg
http://img28.picoodle.com/img/img28/4/6/8/f_ss013m_601caf9.jpg
http://img30.picoodle.com/img/img30/4/6/8/f_ss014m_ad45156.jpg


If you are using the official SDK, you should define the following symbols, __NT__, __IDP__ and WIN32.

http://img37.picoodle.com/img/img37/4/6/8/f_ss015m_41945cc.jpg


Add the library, and the library path in the MinGW Linker options. Because MinGW Linker is a bit picky about library names, make sure that the name of the library in the file system is libida.a, and that you choose the GCC version.

http://img37.picoodle.com/img/img37/4/6/8/f_ss016m_623c1fc.jpg


Create new source file, add some code :P and build.

http://img27.picoodle.com/img/img27/4/6/8/f_ss017m_01910f3.jpg
http://img34.picoodle.com/img/img34/4/6/8/f_ss018m_4f8b893.jpg


Conclusion

This environment, will allow a soft, and fast developing of IDA Pro plug-ins. With capabilities like CVS, task focused developing (Mylyn ("http://www.eclipse.org/mylyn")), refactor and code assistance, makes it the perfect option for team projects.

Hope y'all enjoyed this blog entry.

https://www.openrce.org/blog/view/1157/IDA_Pro_Development_Environment

NeOXOeN
June 11th, 2008, 21:20
damn nice.. i hope you post more :P