This week I’m getting back to Practical Malware Analysis after looking into some honeypot options. But now I need to get back on the grind; I’ll come back to that later.
Chapter 3 of PMA (as I’ll refer to it) is a dynamic analysis refresher, helping aspiring analysts develop a workflow for finding those host-based and network indicators. I won’t repeat all of their write-ups, which are quite detailed, but I will outline my dynamic analysis process and explain why I picked that order. But first:
My Lab
I’m using Oracle’s VirtualBox (yeah, I know) with a host-based adapter for my analysis.
In order to simulate network traffic for malware I set up the Remnux box as the DNS server for the Windows box, and of
The final important thing one should do before analyzing any sample is to snapshot, saving the state of the virtual machine (VM). But now to the meat of the matter:
Dynamic Analysis Workflow
- Start Process Explorer and Process Hacker
- Start Netcat Listeners (ports 80, 443)
- Start Process Monitor (Procmon)
- 1st Registry Snapshot (Regshot)
Inetsim , Wireshark- Run malware
- Analyze Process Explorer, Process Hacker
- Wait 5 minutes if it has not elapsed
- 2nd Regshot
- End Procmon
- Analyze Wireshark, Netcat, Inetsim, Procmon, Regshot
- Revert snapshot
Explanation
- Process Hacker and Process Explorer are very useful for runtime analysis. They don’t generate tons of logs like Procmon, so it’s fine to run them first. I start Procmon after that because its filtering capabilities can eliminate the noise of later programs. However, Regshot has fewer capabilities to deal with noise. So I prefer to do as few operations between Regshots as possible.
- I start Inetsim and Wireshark right before executing the malware to avoid any noise from the Windows box attempting to look for network shares, request updates, or use NetBios.
- I prefer not to end P
rocmon or Wireshark captures until sufficient time has passed. For example, Lab 3-2 waited a minute before executing.
Things I Learned
- One tip from PMA that was especially helpful was in the capabilities of Process Explorer. During Lab 3-2, you use rundll.exe to execute the malware and eventually
an svchost.exe is spawned that uses that DLL. But as manygeekspeople know, there are often manysvchost processes running simultaneously. Of course, there are many ways to narrow down which process used the DLL (my first instinct was to check the properties of each and search through the handles), but few are as quick as:- Process Explorer: Find > Find Handle or DLL
Well, that’s it for the first post! Feel free to leave me some feedback and I’ll post an update when I finish Chapter 4 (or I’ll get sidetracked with some CTF problem).