IDA Javascript w/IDE

Author: David Zimmer
Date: 03.06.13 - 11:58pm

A while back I was trying to figure out an easier way to streamline my IDA plug-in development. I write a lot of plug-ins for a lot of different applications but I am not fan of the traditional plug-in development cycle at all.

One of the things that Ive always wanted for IDA, was to be able to script it using standard JavaScript with a syntax colored coded IDE complete with IntelliSense. Thats too much to ask for with an in process plug-in. Also I want to be able to create small quick little plug-ins without the development pain of compile, reopen, relaunch, test, close, compile, ad infintium...

I started experimenting with an IDA server plug-in that was just a server listening within IDA using some form of IPC mechanism. Initially I used sockets, as can be found in the IdaVBScript plugin. They are nice for some things such as having an instance of Olly in a remote virtual machine, sync the disassembly view in IDA on your desktop as you single step or hit breakpoints. However for wiring it to a scripting implementation, sockets add more overhead than necessary to handle synchronous requests, packet loss, timeouts etc.

The next step was to write a small C stub plugin that uses WM_CopyDATA window messaging as the IPC mechanism (IDASrvr). This automatically handles blocking and ensures synchronous requests. I then grabbed the Scintilla control I use in stream dumper and wired that with an IPC client and script control to create the IDA_Jscript poc. Currently it supports 34 IDA commands which is enough to be useful.

Being able to quickly code out of process plug-ins and having a full IDE with intellisense for your IDA scripting would be a really powerful capability. I wish I had time to fully build it out because its a great idea. Someone with more time and less tendinitis should really run with it, it would be a strong contender for the yearly plug-in contest. If my arms werent bothering me so much I would go for it, but its just not going to happen.

One other nice thing about this approach is that its easy to interface with it from just about any programming language. If you can call SendWindowMessage and CopyMemory you can interact with it. Examples are already available in C, C#, and vb6.

Source for all the projects mentioned above can be found in my RE_Plugins github repository

Update: See the project update that now includes built in debugger support.

Comments: (0)

Leave Comment:
Email: (not shown)
Message: (Required)
Math Question: 44 + 38 = ? followed by the letter: Q 

About Me
More Blogs
Main Site
Posts: (All)
2024 ( 1 )
2023 ( 4 )
2022 ( 5 )
2021 ( 2 )
2020 ( 5 )
2019 ( 6 )
2017 ( 5 )
2016 ( 4 )
2015 ( 5 )
2014 ( 5 )
2013 (9)
     Guest Post @ hexblog
     TCP Stream Reassembly
     SysAnalyzer Updates
     Apilogger Video
     Shellcode2Exe trainer
     scdbg updates
     IDA Javascript w/IDE
     Rop Analysis II
     scdbg vrs ROP
2012 ( 13 )
2011 ( 19 )
2010 ( 11 )
2009 ( 1 )