This post is part of the series of Practical Malware Analysis Exercises.
Patch the password or decode the correct one.
- Pass
-in <password>
for installation. - The file will be copied to System32, cloning kernel32's timestamp.
- A service will be created pointing to the new exe.
- A registry key will be created, presumably with configuration info.
- Service will start on next reboot.
-in <1>
: Create service, create registry key, copy file, modify timestamp.-re <1>
: Uninstall service, delete file.-c <4>
: Update configuration. Create registry key if not there.-cc <0>
: Print configuration:k:<aa> h:<bb> p:<cc> per:<dd>
k=ups
h=host:http://www.practicalmalwareanalysis.com
p=port:80
per=60
Change conditional jump to an unconditional jump at 00402B61
.
- Registry key:
HKLM\SOFTWARE\Microsoft \XPS
- File: exe in system32 with kernel32 timestamp, and a service named after it.
- SLEEP: sleep X seconds.
- UPLOAD: upload file to host.
- DOWNLOAD: download file from host.
- CMD: run command on the host.
- NOTHING
Since it can run commands, it can update and remove remotely.
When the service starts:
- DNS query:
www.practicalmalwareanalysis.com
- Connect over port 80.
- GET requests: different strings each time, same format
HjD2/eMH7.stT
SCAL/fD8H.bSS
8A0y/RwoX.laU
When sending a request, it calls time functions. May be used for mangling.
- URL:
http://www.practicalmalwareanalysis.com