Thursday, September 27, 2012

Analyzing the Blackhole Exploit Kit 2.0 with JSDetox

With the release of the new Blackhole Exploit Kit version, I wanted to check if JSDetox is still able to analyze it. As it turns out, the process is not much different from the last version (shown in this screencast).
I checked to find a current sample. Of course you should not visit those URLs with your normal browser as they contain malware - I will not "hide" those URLs here as they are publicly documented (and seem to be taken offline by now). The same applies for the tool JSDetox, you should run it in an isolated environment.

The obfuscated iframe leading to the exploit kit sounds interesting, so lets use that one:
wget -O pho.htm ""
The downloaded file contains this:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">

<h1><b>Please wait a moment. You will be forwarded...</h1></b>


Paste the javascript code into the textbox in the "Code Analysis" tab and click "Execute":

The code tries to call "window.eval()" - click "Show Code" to see what would be executed:

Click "Send to Analyze" to view the code in the code analysis tab and click "Analyze" to see a formatted version of the code:

Downloading the content of the created iframe...
wget -O column.php ""
This file contains 29kb of data and looks like this (shortened):
<html><body><script>g="getElementById";cc="concat";ss=String.fromCharCode;gg="getAttribute";function asd(){try{(alert+"fewfbw")()}catch(adgsdg){window["e"+"v"+"a"+"l"](s);}}</script><u id="google" 


if(r){s=s+r;}else break;
The last version of the Blackhole Exploit Kit I analyzed stored the obfuscated data in the text content of HTML attributes, this version uses different attributes of one single HTML element. To analyze this in JSDetox, copy the whole content of the file in the textbox in the "HTML Document" tab and click "Extract Scripts":

You are then taken to the "Code Analysis" tab where you can analyze the code (it is a decoding loop) or directly execute the script:

JSDetox logs that the code executed "document.getElementById" (to access the big HTML element containing the obfuscated code) and that it emulated that access with the imported HTML data. JSDetox then catches a call to "window.eval()" and makes it possible to view the code that would be executed (click "Show Code" and then "Send to Analyze").

Click "Reformat" to make the code readable. At the end of the code, we find this:

Downloading the file:
wget -O cee0c21.exe ""
A check on virustotal gives a detection rate of 6/43, a few ours later it was 11/43 with some major vendors still missing it:


  1. It seems great! Here are some discount ray ban sunglasses for you.

  2. شركتنا من المتميزون في اعمال الاصلاح بدون هدم او تكسير من خلال شركة ركن البيت التي تقدم الكثير والكثير في عمل اللازم وتصحيح الاخطاء التي تسببها تسريبات المياه فنحن مثلا

    شركة كشف تسربات المياه بجدة تقدم خدمة لعمل الاصلاح بدون اي خراب ونقدم النصيحة للعملاء بالابتعاد عن الاعمال التي تؤدي الي هذا الخراب فتعاملك مع شركة كشف تسربات بجدة لديها الخبرة الكافية تساعدك في الحفاظ علي منزلك كما اننا نتمكن في اننا سوف نرتقي بخدمة لاننا نقوم بالعمل السليم لها كما يوجد لدينا خدمات العوازل التي تمنع التسريبات من الاسقف لكم والحوائط والخزانات من خلال شركة تسمي الاولي في مجالها لذلك نحن نقدم شركة عزل خزانات بالرياض التي تعتبر في عل الخزانات الارضية من الداخل بواسطة مواد متميزة كما نقدم لكم شركة عزل اسطح بالرياض لعمل العوازل التي تمنع جميع التسريبات في الاسقف

  3. One of the most prominent issues the students have to deal with while writing assignments is plagiarism. Hence, they extensively use free plagiarism checker to check if there are any copied content in the paper.
    Another major reason for using plagiarism checkers is that universities do not accept plagiarized content. Plagiarism is a serious offence. Hence, if found, the students are suspended or might even lose the grades.
    Due to these limitations, it is evident that the plagiarism checking & word counter tool are not at all effective to check plagiarism. The term plagiarism is actually very broad. It is merely not coping with words. But these tools, unfortunately, detect words but not ideas. Hence, the chances of plagiarized papers remain.

  4. I suggest everyone to choose Assignment Help Australia for getting the best guidance in their academia. The proficient experts assist as per the requirements and learning styles desired by the university.

  5. There are many other things as well which you keep in mind before choosing it. Go through their samples before choosing any website. So, you can understand the knowledge of assignment experts. Assignment help play an important role as they are the one who writes their assignments.
    Programming help

    Java Assignment help

  6. Thanks for sharing useful information to getting Assignment Help in correct way. If you need any information for hiring an academic writer, place your call via greatassignmenthelp and talk to expert for resolving your concerns.
    Assignment Help Online
    Online Assignment Help
    Assignment Help Online Services
    Assignment Helper
    Assignment Assistance
    Assignment Help Experts
    Online Assignment Help Services
    Assignment Writing Help

  7. Thanks for updating the post! Your post has shared all essential information of Assignment Help very clearly. Students should opt for online assignment writing services in order to save their time. For more details regarding the best academic writing, connect with customer care services of assignmenthelpshop
    Assignment Help Online
    Online Assignment Help
    Assignment Help Online Service
    Assignment Helper
    Assignment Assistance
    Assignment Help Experts
    Online Assignment Help Services

  8. The mt everest base camp trek is the best trekking adventure in the world. It is a best journey to Mount Everest.

  9. Thank you for sharing valuable information. Nice post. I enjoyed reading this post.