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:
Name:
Email: (not shown)
Message: (Required)
 



Twitter
RSS

About Me
More Blogs
Main Site
Posts:
64bit IDA Plugins
Twitter Feed
anterior lines
misc news/updates
KANAL Mod
Decoders again
CDO.Message Breakpoints
SysAnalyzer Updates
SysAnalyzer and Site Updates
crazy decoder
ida js w/dbg
flash patching #2
JS Graphing
packet reassembly
Delphi IDA Plugin
scdbg IDA integration
API Hash Database
Winmerge plugin
IDACompare Updates
Guest Post @ hexblog
TCP Stream Reassembly
SysAnalyzer Updates
Apilogger Video
Shellcode2Exe trainer
scdbg updates
IDA Javascript w/IDE
Rop Analysis II
scdbg vrs ROP
flash patching
x64 Hooks
micro hook
jmp api+5 *2
SysAnalyzer Updates
InjDll runtime config
C# Asm/Dsm Library
Shellcode Hook Detection
Updates II
findDll
Java Hacking
Windows 8
Win7 x64
Graphing ideas
.Net Hacking
Old iDefense Releases
BootLoaders
hll shellcode
ActionScript Tips
-patch fu
scdbg ordinal lookup
scdbg -api mode
Peb Module Lists
scdbg vrs Process Injection
GetProcAddress Scanner
scdbg fopen mode
scdbg findsc mode
scdbg MemMonitor
demo shellcodes
scdbg download
api hashs redux
Api hash gen
Retro XSS Chat Codes
Exe as DLL
Olly Plugins
Debugging Explorer
Attach to hidden process
JS Refactoring
Asm and Shellcode in CSharp
Fancy Return Address
PDF Stream Dumper
Malcode Call API by Hash
WinDbg Cheat Sheet
GPG Automation