For all who interested and seems no one not willing to share this, IDK why. Easy way to complete Sirefef droppers fuckup and extracting all resources from it. Step by step.
To be able to decrypt dropper you need a basic knowledge how Sirefef installs itself. This is quite complex malware installation process with combination of different stages, shellcode injections and Adobe dll's spoofing (yes Adobe mad skillz even here, already discussed, nothing interesting).
Overall work scheme:
0. Adobe Flash Installer working as loader for malware dropper. Signed and trusted, facepalm.
1. Obfuscator decrypts container with payload and redirects execution flow to it. Bpx NtResumeThread and you have totally decrypted stuff in dropper memory. Carefully cut it off. We are working with this binary now.
2. Dropper check environment and self deletes itself on error (cmd.exe shellcode)
3. If everything fine it additional memory pages in Explorer.exe memory and maps another shellcode here, causing "n" to be loaded inside Explorer.exe. "n" includes "desktop.ini" component inside as raw data.
Authors of this crap were so lazy to implement aplib so they decided to use MS Cabinet format instead. Take decrypted binary from step 1 and locate cabinet signature
MSCF.
Cut the data to new file. Unzip/whatever it and all is done.
Cabinet archive info (in bytes):
Total size: 193184
Packed size: 104293
The above mentioned sample contains:
Code: Select allName Size(bytes)
fp.exe (Adobe Flash Installer) 89248
n32 (sirefef x86 edition) 56832
n64 (sirefef x64 edition) 43008
s32 (config for x86) 2048
s64 (config for x64) 2048
As everybody now knows from Flame hysterics there are several TimeStamps inside PE32 files, so you can take a look when these components was compiled :)