GithubHelp home page GithubHelp logo

hhy5277 / etacsufbo Goto Github PK

View Code? Open in Web Editor NEW

This project forked from vasiab/etacsufbo

0.0 1.0 0.0 82 KB

基于 AST 变换的简易 Javascript 反混淆辅助工具

Home Page: http://blog.knownsec.com/2015/08/use-estools-aid-deobfuscate-javascript/

License: GNU General Public License v3.0

Makefile 2.54% JavaScript 97.46%

etacsufbo's Introduction

etacsufbo

experimental Build Status Coverage Status

'obfuscate'.split('').reverse().join('')

一个简易 Javascript 反混淆工具,基于抽象语法树分析和修改实现。

这个工具已废弃。请移步类似工具 https://github.com/mindedsecurity/JStillery

如果您有 PL 的基础,建议阅读和使用 http://prepack.io/

快速上手

git clone https://github.com/ChiChou/etacsufbo.git 下载项目

cd etacsufbo 进入目录

npm i 安装依赖项目

./cli.js path/to/obfuscated/script.js 输出反混淆结果

命令行参考

./cli.js [混淆的代码] [输出文件名]

  • 如省略输出文件名,程序将把清理结果输出到 stdout
  • 如不带参数执行,将进入 REPL 模式
  • 使用 npm link 可将 etacsufbo 命令注册到全局

在代码库中引用

npm install https://github.com/ChiChou/etacsufbo.git 将项目添加为依赖项

require('etacsufbo').clean('your code goes here') 只提供一个 API

代码还原规则

  • 全局变量声明的字符串数组,在代码中直接使用数字下标引用其值
  • 连续的二元运算,如 1 * 2 + 3 / 4 - 6 % 5
  • 正则表达式字面量的 source,字符串字面量的 length
  • 完全由字符串常量组成的数组,其 join / reverse / slice 等方法的返回值
  • 字符串常量的 substr / charAt 等方法的返回值
  • decodeURIComponent 等全局函数,其所有参数为常量的,替换为其返回值
  • 结果为常数的数学函数调用,如 Math.sin(3.14)

TODO

  • 处理作用域
  • 处理自定义加密函数

许可

GPL v3

etacsufbo's People

Contributors

chichou avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.