# JS-Deobfuscator（0x1Avram）Obfuscator.io 反混淆工具

> 面向 Timofey Kachalov 的 javascript-obfuscator（亦以 obfuscator.io 提供）所生成 JavaScript 的 Node.js 反混淆工具。它用 esprima 解析样本，依次运行十一个与该混淆器同名的阶段：移除注入的自我防护和调试保护代码，还原控制流平坦化和死代码注入，恢复被转换的字面量和对象键，把字符串数组调用替换为解码后的字符串，化简结果，并对传给 eval 的代码递归处理。字符串数组相关代码可自动识别，也可拆成单独文件输入；Examples 目录收录了原始、混淆后和反混淆后的成对样本。

- 类型：工具
- 目标：网站
- 类别：网站分析工具
- 关联：基础工具
- 来源复核于：2026-10-27
- 收录于：2026-11-03
- 原始资源：<https://github.com/0x1Avram/js-deobfuscator>
- 一手来源：<https://github.com/0x1Avram/js-deobfuscator/blob/3a4a20ab0d107d168bbef14105c35970c59e4eae/README.md>
- 目录页面：<https://awesomerea.org/zh/resources/0x1avram-js-deobfuscator/>
- 记录 JSON：<https://awesomerea.org/resources/0x1avram-js-deobfuscator/record.json>
- 英文版：[English](https://awesomerea.org/resources/0x1avram-js-deobfuscator/index.md)

## 使用条件与局限

- 自所审阅的 main 分支提交（2023-04-17 的 README 更新）以来没有新的提交。最后一个版本 1.0.7（2022-12-29）附带 binaries.zip，内含用 pkg 构建的独立 Windows 和 Linux 程序，而 package.json 中的版本号仍为 1.0.2。README 称开发时使用 Node.js 16.15，并适用于当时的混淆器版本；旧版混淆器的输出可能生成不同的 AST。
- 从源码运行需先执行 npm install（依赖 esprima、escodegen、esquery、estraverse、winston 和 yargs），再用 node index.js -i 输入 -o 输出 调用。自动识别失败时，需用 -s、-w、-n 和 -r 分别以单独文件传入字符串数组、其包装函数、包装函数名和轮转代码。esprima 无法解析所有较新的 JavaScript 语法，README 建议先用 Babel 转译这类输入。
- README 警告该代码并不安全，只应在虚拟机等隔离环境中运行：解码字符串数组时，会在反混淆工具自身的 Node.js 进程中用 eval 执行从样本中取出的代码。标识符和属性重命名阶段只是空的占位实现，因此不会恢复被混淆的名称。
- 需自行提供待分析的混淆脚本。Examples 中的文本文件取自简短代码片段、javascript-obfuscator 的示例脚本（BSD-2-Clause）和 javascript-algorithms（MIT），并附有这两份许可证。
- MIT 许可证（LICENSE）。它与 ben-sb javascript-deobfuscator 是不同项目，后者的 npm 包同样名为 js-deobfuscator；本项目需从仓库或发布版程序使用。

## 一手来源

1. <https://github.com/0x1Avram/js-deobfuscator/blob/3a4a20ab0d107d168bbef14105c35970c59e4eae/README.md>
2. <https://github.com/0x1Avram/js-deobfuscator/blob/3a4a20ab0d107d168bbef14105c35970c59e4eae/package.json>
3. <https://github.com/0x1Avram/js-deobfuscator/blob/3a4a20ab0d107d168bbef14105c35970c59e4eae/deobfuscator.js>
4. <https://github.com/0x1Avram/js-deobfuscator/blob/3a4a20ab0d107d168bbef14105c35970c59e4eae/Stages/stage_09_preparing.js>
5. <https://github.com/0x1Avram/js-deobfuscator/blob/3a4a20ab0d107d168bbef14105c35970c59e4eae/Stages/stage_03_stringarray.js>
6. <https://github.com/0x1Avram/js-deobfuscator/blob/3a4a20ab0d107d168bbef14105c35970c59e4eae/Stages/stage_04_renameidentifiers.js>
7. <https://github.com/0x1Avram/js-deobfuscator/tree/3a4a20ab0d107d168bbef14105c35970c59e4eae/Examples>
8. <https://github.com/0x1Avram/js-deobfuscator/blob/3a4a20ab0d107d168bbef14105c35970c59e4eae/LICENSE>
9. <https://github.com/0x1Avram/js-deobfuscator/releases/tag/1.0.7>

## 同分区更多条目：网站

- [HTTP Toolkit HTTP(S) 调试代理](https://awesomerea.org/zh/resources/http-toolkit/index.md) · 工具
- [willnode JavaScript 手动反混淆编辑器](https://awesomerea.org/zh/resources/willnode-deobfuscator/index.md) · 工具
- [go-fAST JavaScript 语法树库](https://awesomerea.org/zh/resources/go-fast-js-ast/index.md) · 工具
- [Hetty HTTP 安全研究工具包](https://awesomerea.org/zh/resources/hetty/index.md) · 工具
- [debundle JavaScript 打包文件拆包工具](https://awesomerea.org/zh/resources/debundle/index.md) · 工具
- [JStillery JavaScript 部分求值反混淆工具](https://awesomerea.org/zh/resources/jstillery/index.md) · 工具

## 关于此条目

说明已依据一手来源复核。
原创说明采用 MIT 许可；外部项目、论文与素材保留各自的权利和许可。
