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: 58 + 74 = ? followed by the letter: N 

About Me
More Blogs
Main Site
Posts: (year)
2024 (1)
     vbdec backstory
2023 (4)
     Yara Workbench Automation
     VS linker versions
     IDA decompiler comments
2022 (5)
     VB6 Implements
     VB6 Stubs BS
     VB6 TypeInfo
     VB6 VTable Layout
     Yara isPCode rule
2021 (2)
     VB6 Gosub
2020 (5)
     AutoIT versions
     IDA JScript 2
     Using VB6 Obj files from C
     Yara Corrupt Imports
     Yara Undefined values
2019 (6)
     Yara WorkBench
     vb6 API and call backs
     UConnect Disable Cell Modem
2017 (5)
     IDA python over IPC
     dns wildcard blocking
     64bit IDA Plugins
     anterior lines
     misc news/updates
2016 (4)
     KANAL Mod
     Decoders again
     CDO.Message Breakpoints
     SysAnalyzer Updates
2015 (5)
     SysAnalyzer and Site Updates
     crazy decoder
     ida js w/dbg
     flash patching #2
     JS Graphing
2014 (5)
     Delphi IDA Plugin
     scdbg IDA integration
     API Hash Database
     Winmerge plugin
     IDACompare Updates
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)
     flash patching
     x64 Hooks
     micro hook
     jmp api+5 *2
     SysAnalyzer Updates
     InjDll runtime config
     C# Asm/Dsm Library
     Shellcode Hook Detection
     Updates II
     Java Hacking
     Windows 8
     Win7 x64
2011 (19)
     Graphing ideas
     .Net Hacking
     Old iDefense Releases
     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
2010 (11)
     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
2009 (1)
     GPG Automation