常见混淆方法

1,141 阅读1分钟

前沿 V_JSTOOLS JS逆向分析工具 提供简单ast解混淆方法

github.com/cilame/v_js…

astexplorer.net/

1.sojson

事例:

2.ob混淆

事例:

function aaa(){
  return 'b'
}
function bbb(){
  let a={
    x:1,
    y:2,
    z:3
  }
  let b=aaa[a.x]+aaa[a.y]+aaa[a.z]
  return b
} 

2.1 解混淆

//a0_0x5991 为字典方法
CallExpression(path) {//回调表达式匹配--替换加密数组为对应的值
    if (types.isIdentifier(path.node.callee, {name: 'a0_0x5991'})) {
        //当变量名与解密函数名相同时,就执行相应操作
        // console.log(path.toString());
        // console.log(eval(path.toString()));
        path.replaceWith(types.valueToNode(eval(path.toString())));
        // 值替换节点
    }
},

ps:参考博客 jia666666.blog.csdn.net/article/det…