dsl-vm-reverse
Reverse JavaScript-based custom DSL/VM interpreters and risk-control engines: identify IIFE/switch-based opcode dispatch, extract opcode tables, and capture runtime semantics.
🔄 DSL 自定义虚拟机逆向(DSL VM Reverse Engineering)
When to Use
- A protected web asset runs a custom bytecode VM (risk-control/captcha engines).
- Recovering opcode semantics from a JS interpreter loop.
目录
- [1. 适用范围](#1-适用范围)
- [2. DSL VM 识别特征](#2-dsl-vm-识别特征)
- [3. 通用逆向工作流](#3-通用逆向工作流)
- [4. Opcode 提取与分类](#4-opcode-提取与分类)
- [5. 运行时捕获方案](#5-运行时捕获方案)
- [6. 常见状态码](#6-常见状态码)
- [7. Skill 自检清单](#7-skill-自检清单)
1. 适用范围
当目标文件符合以下 任意特征 时使用本 skill:
| # | 特征 | 说明 |
|---|---|---|
| 1 | IIFE 开头 + 大量单字母变量名 | !function(){var U=void 0,y=parseInt,E0=Function,...} |
| 2 | 包含 DG() 或类似函数含 switch-case 循环 | 解释器主循环,d[7]&31 解码 opcode |
| 3 | 大文件(500KB+)但零字节占比 < 1% | 非标准 WASM,纯 JS |
| 4 | 包含 C[number] 常量表引用 | C[9][xxx] 函数表/字符串表 |
| 5 | 单行压缩代码 | 583KB 单行,混淆变量名 |
排除规则
| 条件 | 非本 skill | 转至 |
|---|---|---|
文件以 \x00asm 开头 | 标准 WASM 二进制 | reverse-engineering/languages.md |
文件以 Uint8Array([0,97,115,109]) 含 WASM 魔术字 | WASM 嵌入式 | 提取 .wasm 后转 IDA/Ghidra |
标准 Webpack 打包(function(e,t,n){...}) | 普通 JS | js-reverse/ |
| 零字节占比 > 20% | WASM 二进制 | reverse-engineering/languages.md |
2. DSL VM 识别特征
代码特征
// 特征 1: IIFE 入口,单字母变量映射数字常量
!function(){
var U=void 0, y=parseInt, E0=Function, AN=Uint8Array;
var E=15, l=10, m=12, x=16, S=13, $=11;
// 数字常量映射为变量名,替代原始数字
...
}
// 特征 2: 解释器主循环 DG()
function DG(C, d, Subscribers only
The full skill, its 1 bundled files and every download is included with every paid Complete AI plan.
Details
| Source | zhaoxuya520/reverse-skill |
|---|---|
| License | MIT |
| Risk label | safe ("critical" means the skill may run commands or touch files — read before use) |
| Files | SKILL.md |
| Added | 2026-08-25 |
