瑞数 6vmp 补环境 js逆向

前言

现在许多gov网站都上了最新的瑞数6vmp,而vmp如果采用传统的扣代码方法难度是不小的。所以我决定采用补环境的方法过,虽然补环境框架那种一力破万法的方式很强,但是我还是决定用node+代理的方式,所以今天发一点纯补js过瑞数vmp的文章以供大家学习参考。

学习目标网站

aHR0cDovL3FpbmdkYW8uY2hpbmF0YXguZ292LmNuL3Jlc291cmNlZGF0YS9zc3dmMjAxOS9xeS8yMDIyMDEvdDIwMjIwMTEwXzY3NjA0Lmh0bWw=
    

如何判断是否为瑞数vmp

1.清除cookie情况下返回状态为412

2. 412 响应内容如下

3.之后还会生成一个js文件

过无限debugger

网上的代码参考

var _constructor = constructor;
Function.prototype.constructor = function (s) {
    if (s == "debugger") {
        console.log(s);
        return null;
    }
    return _constructor(s);
}
//去除无限debugge
Function.prototype.__constructor_back = Function.prototype.constructor;
Function.prototype.constructor = function () {
    if (arguments && typeof arguments[0] === 'string') {
//alert("new function: "+ arguments[e]);
        if ("debugger" === arguments[0]) {
// arguments[e]-"consoLe.Log(\"anti debugger\");";
//arguments[0]=“;”;
            return
        }

        return Function.prototype._constructor_back.apply(this, arguments);
    }
}
var _Function = Function;

Function = function (s) {
    if (s == 'debugger') {

        console.log(s);
        return null;
    }
    return _Function(s);
}

var eval_ = window.eval;
window.eval = function(x){
    eval_(x.replace("debugger;","  ; "));
};
window.eval.toString = eval_.toString;

实测我的目标网站只需要以下操作即可

window.setInterval=function(){};

注意谨慎hook eval 因为可能导致hook后返回400 走错误分支

补环境

这里可以用框架也可以自己代理(可以看看开源框架如何循环代理的),这里帖一些可能的检测点

  1. try{return (window instanceof Window);}catch(e){}
  2. try{return __filename;}catch(e){}
  3. return typeof __loadScript == "function" && typeof __date_clock == "function"
  4. return typeof _globalObject != "undefined" && typeof window != "undefined" && _globalObject == window
  5. Object.getOwnPropertyDescriptor(navigator,'webdriver')
  6. eval('!new function(){eval("this.a=1")}().a')
  7. div=document.createElement('div');div.getElementsByTagName('i').length;;div.getElementsByTagName('i')[0]
  8. s=document.getElementsByTagName('script');s.length;s[1].getAttribute('r');s[0].parentElement.removeChild(s[1])
  9. s=document.getElementsByTagName('script');s.length;s[0].getAttribute('r');s[0].parentElement.removeChild(s[0])
  10. 错误堆栈检测
  11. meta=document.getElementById('ykBL9Y2EzdpX'); meta.getAttribute('r');meta.parentNode.removeChild(meta);meta.content
  12. document.visibilityState
  13. base=document.getElementsByTagName('base');base.length
  14. location.protocol;location.port;location.search;location.pathname;location.href;location.hostname;location.hash;
  15. window.self;window.top;
  16. history.replaceState
  17. xp=document.createExpression;'_doc' in xp;(jsdom检测)
  18. window.CanvasRenderingContext2D.prototype.getImageData.toString()
  19. window.HTMLCanvasElement.prototype.toBlob.toString()
  20. window.HTMLCanvasElement.prototype.toDataURL.toString()
  21. window.clientInformation
  22. /class/ 正则 test 'Event' (检测node Event)
  23. ActiveXObject
  24. dom form 操作
  25. document.documentElement.getAttribute('selenium');document.documentElement.getAttribute('driver');document.documentElement.getAttribute('webdriver')
  26. document.all
    document. all===undefined;
    document.all==undefined;
    document. all.length;

最后成功拿到cookie,请求到200页面

学术交流+

  • 10
    点赞
  • 18
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值