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)
Math Question: 40 + 100 = ? followed by the letter: C 



About Me
More Blogs
Main Site
Posts: (All)
2023 ( 4 )
2022 ( 5 )
2021 ( 2 )
2020 ( 5 )
2019 ( 6 )
2017 ( 5 )
2016 ( 4 )
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 )
2012 ( 13 )
2011 ( 19 )
2010 ( 11 )
2009 ( 1 )