目标网站上PM2.5实时查询|PM2.5历史数据查询|PM2.5全国城市排名|PM2.5雾霾地图|中国空气质量在线监测分析平台|真气网
首先要确定是否是虚拟机,虚拟机https://www.aqistudy.cn/明显的特征虚拟机一般源文件上会有回事VM开头,非虚拟机直接是正常文件名和地址如下:
,虚拟机的特性在于如果想hook的话,要先找到源码的地址,方便去hook。
打开浏览器调试器发现右键被禁止,进入调试界面,变成了无限debugger,如下:在栈堆去定位参数,发现来自网页中
发现两个函数造成了debugger,但是这个函数没有定义,所以如果直接用fiddler hook的话可能会被重新覆盖掉,所以在函数前下断点debugger,来自一个js加密
破解方法是把return替换成document.getElementById('textareaID').innerText=p,以后碰见类似的自作了一个显示方法:
<!DOCTYPE html P LIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><title> Crack Baidu统计构造函数</title><meta http-equiv="content-type" content="text/html; charset=UTF-8" /><meta http-equiv="X- -Compatible" content="IE=EmulateIE7" /><meta name="Author" content=www.gemingcao.com/><meta name="Keywords" content="" /><meta name="Description" content="" /> </head><body><textarea id="textareaID" rows="25" cols="50"></textarea><script type="text/javascript">eval(function(p, a, c, k, e, d) { e = function(c) { return (c < a ? "" : e(parseInt(c / a))) + ((c = c % a) > 35 ? String.fromCharCode(c + 29) : c.toString(36)) }; if (!''.replace(/^/, String)) { while (c--) d[e(c)] = k[c] || e(c); k = [function(e) { return d[e] }]; e = function() { return '\\w+' }; c = 1; }; while (c--) if (k[c]) p = p.replace(new RegExp('\\b' + e(c) + '\\b', 'g'), k[c]); document.getElementById('textareaID').innerText=p;}('这里添加加密后字符串即可'.split('|'), 0, {}));// debug detect</script></body></html>
解码后:
,这里直接用fiddler修改后的本地文件去替换
然后在fiddler去替换
,然后加载分页的时候,又进debugger,发现又被断住了。
这里直接注入更替debugger代码到最顶端
Function.prototype.__constructor_back = Function.prototype.constructor;Function.prototype.constructor = function() { if(arguments && typeof arguments[0]==='string'){ //alert("new function: "+ arguments[0]); if("debugger" === arguments[0]){ //arguments[0]="console.log(\"anti debugger\");"; //arguments[0]=";"; return } } return Function.prototype.__constructor_back.apply(this,arguments);}
fiddler本地部署对于动态加载不上,所以最好用编程猫工具直接注入。