抓包

image-20260127095001629

多次请求后发现只有m值为变化的加密点

同理找堆栈

image-20260127095530050

断点后一直往下执行,从jquery-3.6.0.min.js跳到pagination18.js的位置就是加密点

image-20260127100111552
image-20260127100221020

实际上的代码加密流程

1
2
3
4
5
_0x2ef45b['ts'] = vmExecute(0x1, _0x2ef45b)
_0x2ef45b['crawler'] = vmExecute(0x2, _0x2ef45b)
_0x2ef45b[_0x38ae12(0x209)]['m'] = _0x2ef45b['crawler'] + vmExecute(0x3, {
'input': _0x38ae12(0x1f8) + _0x2ef45b['ts']
})

ts直接为时间戳、实际上的函数为分析vmExecute(0x2, _0x2ef45b)的生成

image-20260127200848487

通过对当前函数的追踪和改写,可以拿到最后的代码

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
var B = function(_0x3f0d72) {
return anti(0x4)({
'serverTime': _0x3f0d72
})['messagePack']();
};

function getCrawlerInfo(_0x2926eb) {
return B(_0x2926eb);
}

const VM_OPS = {
0x2: function(_0x4deae8) {
return getCrawlerInfo(_0x4deae8['ts']);
}
};

function vmExecute(_0x4d87c8, _0x32370b) {
return VM_OPS[_0x4d87c8]["apply"](null, [_0x32370b]);
}


_0x2ef45b = {
"headers": {},
"ts": 1769515549614,
"crawler": ""
}
vmExecute(0x2, _0x2ef45b)

最后分析的就是anti函数了,直接追进去

image-20260127202252446

image-20260127202339550

可以看到此webpack格式代码

在chrome环境中调用能得到值

image-20260127202423400

将全部代码在pycharm中补环境、主要是document,下面是我简易补的

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
window = global;
document = {
createElement: function(arg){
console.log("对象:document =====>方法:createElement ===>参数:", arg)
if(arg === "video"){
return watch({"canPlayType": ""}, 'createElement->video')
}
return watch({}, 'createElement')
},
addEventListener: function(arg){
console.log("对象:document =====>方法:addEventListener ===>参数:", arg)
if(arg === "mousedown"){
return {}
}
if(arg === "mousemove"){
return {}
}
if(arg === "click"){
return {}
}
if(arg === "scroll"){
return {}
}
return watch({}, 'addEventListener')
}
}
var Element = function Element() {

};
navigator = {
userAgent: "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.0.0 Safari/537.36"
}
location = {
href: "https://www.mashangpa.com/problem-detail/18/",
port: ""
}
localStorage = "https://www.mashangpa.com/problem-detail/18/"
screen = {
availWidth: 1920,
availHeight: 1080
}
history = {}

image-20260127205206601

结果正常

image-20260127210900216

更多内容也在公众号更新:码字的秃猴

tuhou