Home



Sunday, December 11, 2011

Malware Analysis Idiot's Guide

Idiots guide to Malware analysis:
Malware Analysis Idiot's Guide :
BECOME A MALWARE ANALYST IN A 24Hours !!!
(From the Book Malware Analysts CookBook)

Analyzing unknown JavaScript.

1.Using Spidermonkey.

; Spidermonkey = JavaScript Interpreter.
; sudo apt-get install spidermonkey-bin on an Ubuntu machine.
; use from command line in Linux

; Attackers can create a JS function that translates
numbers into JavaScript Code.In this way, attackers
can prevent someone that views the source code from
understanding what the code is actually doing.

;Identify the suspect Function

; place the suspect JavaScript into a separate file.
; edit the JavaScript to print rather than execute.
Add
> suspectfunction = print
at top of file
; Run SpiderMonkey using the Command
$ js suspect_script.txt | indent

; SpiderMonkey executes the suspect function but prints
the result instead of passing it. Now we can see the
attacker’s real intentions and begin analyzing how it uses
the Internet Explorer browser, Adobe Reader plug-in,
and the Winamp ActiveX control.

2.Using Jsunpack
Automatically Decoding JavaScript with Jsunpack
http://jsunpack.jeek.org/

Jsunpack online Javascript decoder.
> URL,Chunk of JavaScript,PDF,HTML
Jsunpack-n is the command line version.

No comments: