JS Graphing


Author: David Zimmer
Date: 05.30.15 - 7:17am



as a malware analyst you spend a lot of time looking at obsfuscated JavaScript. the JavaScript_UI feature in PDF stream dumper has a fair amount of tools for cutting through the crap. as other users have noted its tools can be used for other JavaScript analysis needs such as malicious webpages and flash action script. I myself use it a lot for this task.

note that if you are analyzing flash action script, you should remove some of the flash specific keywords such as protected, final, etc for the formatter (and subsequently function extractor to work). also remove the outter class{} wrapper.

when analyzing html remove the html and leave just the script. Also web browser DOM objects are not supported, but I have added support for document.write[ln] as a convenience. You can add support for more DOM objects by editing userlib.js.

even if you cant use the run feature, the navigation and cleanup features are still worth keeping it in mind.

if you are not familiar here are some quick features:
  • syntax highlighting
  • auto code formatting
  • parsed function list for navigation
  • word highlighting
  • basic refactoring



  • strip inline function calls
  • simplify numeric expansions
  • simplify strings
anyway the reason for this post, is that I just added another small but handy feature. A right click Graph Xrefs to/from that works the same way as its namesake in IDA. I also added a lines of code (loc) column to the function list so you can see at a glance which functions are significant)







If you're not familiar with the "strip in-line function calls", or "simplify numeric expansions" features, below is a screenshot of them in action. I don't think I ever publicly mentioned them before but they have been in there for a while












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