This post is part of the series of Practical Malware Analysis Exercises.
sub_401130
- Character string containing the command (parsed from HTML).
- Character string containing
Existing Filename
(argv[0]
).
Switch with 5 cases that checks the command, implemented as a jump table.
Carries out the command, installing the malware.
- Case 0: Make the directory
C:\Temp
- Case 1: Copy self (
argv[0]
) binary to malware path. - Case 2: Delete the malware.
- Case 3: Tries to set reg value
Malware
:C:\\Temp\\cc.exe
in theCurrentVersion\Run
registry key. - Case 4: Sleep for 100 seconds.
- Default: Print error message, bad command.
- File:
C:\Temp\cc.exe
- Registry key:
CurrentVersion\Run\Malware
:C:\Temp\cc.exe
Administer a malware infection. Provide updates/persistence.
Checks for an internet connection, gets a remote command, and executes it. Command is
lower case letter: a
, b
, c
, d
, e
.
Based on that command, it can:
- Install the malware to run at boot.
- Copy a new version of the malware.
- Delete the malware.