Lab 12
Lab 12
- Process Monitor
- Regshot
- HandleDiff
1. Process Monitoris: a free tool from Microsoft that displays file system,
registry, process, and other activities on the system.
- It’s an invaluable tool for troubleshooting Windows problems as well as for
malware forensics and analysis tasks.
- The thoroughness of the tool is also weakness, as the amount of data
captured by Process Monitor can easily overwhelm the analyst.
(We have already used this tool in the previous section, so we will not
introduce it again)
Install:
- ProccessMonitor on Windows: Download on
https://docs.microsoft.com/en-us/sysinternals/downloads/procmon
LAB 1:
What you need: The Windows 2008 Server virtual machine we have been
using.
Purpose: Analyze malware behavior
Static Analysis with Strings
Examine the strings in Lab11-01.exe. You should find the two items below.
In Resource Hacker, in the left pane, click 0 ti highlight it, as shown above.
Click Action, Save Resource as a binary file...".
Save the file as YOURNAME-TGAD0.exe, replacing the text
"YOURNAME" with your own name.
HashCalc
If you don't have it, get HashCalc here:
http://www.slavasoft.com/hashcalc/
Calculate the MD5 hash of the msgina32.dll file created by running the
malware.
The MD5 hash begins with 7ce4, as shown below.
Strings
Examine the strings in Lab12-01.exe. Find these three strings, which show
the process being injected, the DLL file used, and psapi.dll, which is used
for
process enumeration:
explorer.exe
Lab12-01.dll
psapi.dll
IDA Pro
Load Lab12-01.exe in IDA Pro Free.
Click Options, General.
Check "Line Prefixes" and set the "Number of opcode bytes" to 6, as
shown below.
Find the code shown below, near the start of main():
This code uses psapi three times to locate a Windows API function and
store its address in a numerical address. This obfuscates the code, so later
calls to
these functions will be difficult to recognize.
We'll assign labels to these memory addresses in IDA Pro to make later
analysis easier.
The first section of code assigns a pointer to the function
EnumProcessModules.
In the line starting with address 00401136, right-click dword_408714 and
click Rename.
Enter a new Name of myEnumProcessModules in the box, as shown
below. Click OK.
Increase the length limit when you are prompted to.
Repeat the process to rename dword_40870C to
myGetModuleBaseNameA
Repeat the process to rename dword_408710 to myEnumProcesses
Process Explorer
Close IDA Pro. Double-click Lab12-01.exe to run the malware.
A box pops up saying "Press OK to reboot". as shown below. Drag this box
out of the way.
Open Process Explorer.
In the upper pane, scroll to the bottom of the list. Click explorer.exe to
select it.
In Process Explorer, from the menu bar, click View and make sure "Show
Lower Pane" is checked.
In Process Explorer, from the menu bar, click View, "Lower Pane View",
DLLs.
In the lower pane, find the Lab12-01.dll that has been injected into
explorer.exe, as shown below.