This post is part of the series of Practical Malware Analysis Exercises.
WinAPI: KERNEL32
, NETAPI32
, USER32
Other: DLL1
, DLL2
, DLL3
- DLL 1)
10000000
- DLL 2)
10000000
- DLL 3)
10000000
- DLL 1)
10000000
- DLL 2)
00330000
- DLL 3)
00390000
Prints the PID.
Console:
DLL 1 mystery data 7132
DLL 1 mystery data 7760
- Number changes each run.
- In IDA, 2 functions reference
10008030
:DLL1Print
DLLMain
.
DLLMain
gets the PID.- The number is the PID, stored in the DLL's memory.
Filename is temp.txt
- File handle opened and returned by
DLL2.DLL2ReturnJ
. - In
DLL2.DllMain()
, creates filetemp.txt
and stores. - The file handle is returned by
DLL2.DLL2ReturnJ
.
Passes the buffer in a call to DLL3.DLL3GetStructure
. Returns the parameter.
DLL3GetStructure returns a pointer to a generated AT
INFO` structure.
- 8 bytes: ptr to job time (
0036EE80
) - 8 bytes: days of month (NULL)
- 1 byte: days of week (0x7f=1111111), run every day.
- 1 byte: flags (0x11),
JOB_NONINTERACTIVE & JOB_RUN_PERIODICALLY
- 64 bytes: unicode command string
ping www.malwareanalysisbook.com
- DLL1: PID
- DLL2: File handle
- DLL3: Unicode string as integer.
Manual loading, specifying address base 00330000
.