Websense Security Labs Blog

Websense Security Labs discovers, investigates and reports on advanced Internet threats that traditional security
research methods miss.

The official website of AskMen is compromised to serve malicious code

View all posts > 

The official website of AskMen is compromised to serve malicious code

Posted: 23 Jun 2014 02:55 PM | AToro | no comments


Websense® ThreatSeeker® Intelligence Cloud has detected that the official website of AskMen (at www.askmen.com ), a popular free online men's web portal, has been compromised and injected with malicious "drive by" code that appears to be part of a mass-injection attack. According to similarweb.com, AskMen's website has more than 10 million visitors each month. The injected code redirects a user to a website serving exploit code, which subsequently drops malicious files on the victim's computer.

 

Websense Security Labs™ has contacted the host master of askmen.com with a notification regarding the compromise.

 

Update: We've been working with Ziff Davis' web security team regarding the compromise, as of today (7th July 2014) we verified with our processes that the website is clean when checked at 14:00 BST and does not serve malicious code. This is not a guarantee the website will continue to be clean. We will continue to monitor the website and update the blog if needed. 

 

 

AskMen's main page as of 23 June 2014:

 

SimilarWeb.com statistics for AskMen:

 

 

Websense customers are protected from this threat with ACE, our Advanced Classification Engine, at the following stages:

 

  • Stage 2 (Lure) - ACE has detection for the compromised websites.
  • Stage 3 (Redirect) - ACE has detection for the injected code that redirects the user to the exploit page.
  • Stage 4 (Exploit Kit) - ACE has detection for the malicious code that attempts to execute this cyber-attack.
  • Stage 5 (Dropper Files) - ACE has detection for the binary files associated with this attack.
  • Stage 6 (Call Home) - Communication to the associated C&C server is prevented.

 

 

Analysis

 

The injected code has been found in multiple locations within the main website as well as in localized versions of it, like au.askmen.com. When a user browses to the main website, the injected code loads automatically and silently redirects the user to a website serving the actual exploit code. The injected code is obfuscated and can be found at the bottom of legitimate JavaScript pages on AskMen's website.

 

The injected code on AskMen's website:

 

How DGA is used to redirect the user

 

The obfuscation used here is a simple base64 encoding, which can be easily de-obfuscated to a Redirect to a website generated by its domain generation algorithm (DGA) as well as the DGA itself.

 

De-obfuscated JavaScript code:

 

 

What the above code does is basically this: It takes the current date (year, month, and day) and uses a CRC32 algorithm as a hash function to hash that data, which ends up being the domain name. This means that a new domain will be generated everyday, and as we know how the algorithm works, we can easily predict future domains. For example, the domains that will be generated in the next 7 days (from 24 to 30 June) can be seen below.

 

Exploit page URLs from 24 to 30 June:

 

 

The Redirect takes the unsuspecting user to a heavily obfuscated page serving a Java exploit (most likely CVE-2013-2465) and also an Adobe PDF reader exploit.

 

The exploit page:

 

 

Java exploit:

 

 

 

 

Nuclear Pack Exploit Kit

 

The exploit page displays similar obfuscation techniques, which are often used in the Nuclear Pack exploit kit. In addition, the above mentioned Java exploit is most often used by Nuclear Pack. These facts strongly indicate that the attacker is using either the Nuclear Pack exploit kit or a variant of it.

The similarities between the obfuscation methods can be seen below. For example, note how the eval() function is obfuscated when some color name is inserted in the middle of the string. The page uses this as the default background and the string is removed dynamically at runtime. So "eblackval" will successfully be evaluated as "eval".

 

AskMen exploit page:

 

Nuclear Pack exploit kit page:

 

 

Malware

 

Once the target is successfully exploited, the infamous malware Caphaw is dropped, allowing the attacker unfettered access to the victim's computer. 

 

Websense ThreatScope identifies the dropped file as "Suspicious":

Here is the full ThreatScope Report.

 

Conclusion

 

As we can see, even very popular websites are not immune to malicious code injection attacks. An attack of this scale can potentially infect tens of thousands of unsuspecting users due to the nature of the attack and the high popularity of the website.

 

Blog Contributor: Elad Sharf



Leave a Comment

(required)  

Email address: (required)