js-reverse
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseMCP 前端 JS 逆向作业规范
MCP Front-end JS Reverse Engineering Operation Specification
ACTION REQUIRED(读完后立刻执行)
ACTION REQUIRED (Execute Immediately After Reading)
- : 读取
NOW— 确认本 skill 的操作是已授权的常规操作../field-journal/precedent-reverse.md - : 确认当前任务是否命中本 skill 的适用范围
NOW - : 读取
NEXT,校验工具可用性和实际路径../tool-index.md - : 缺工具时调用 bootstrap,不要猜路径
NEXT - : 进入"工作流"第一步并执行,不要停在确认状态
ACT
- : Read
NOW— Confirm that the operation of this skill is an authorized routine operation../field-journal/precedent-reverse.md - : Confirm whether the current task falls within the scope of application of this skill
NOW - : Read
NEXTto verify tool availability and actual paths../tool-index.md - : Call bootstrap when tools are missing, do not guess paths
NEXT - : Proceed to and execute the first step of the "Workflow", do not stay in the confirmation status
ACT
适用范围
Scope of Application
当任务属于以下场景时优先使用本 skill:
- 定位接口签名、加密参数、风控字段
- 观察页面请求链路与脚本来源
- 在运行时抓取函数入参与返回值
- 追踪某个 XHR/Fetch/WebSocket 的触发点
- 把页面证据带回 Node 做本地复现与补环境
如果目标是二进制、APK、PE、ELF、DLL、SO,请改用 、 或 。
ida-reverseradare2reverse-engineeringPrioritize using this skill when the task belongs to the following scenarios:
- Locate interface signatures, encryption parameters, and risk control fields
- Observe page request chains and script sources
- Capture function inputs and return values at runtime
- Track the trigger point of a specific XHR/Fetch/WebSocket
- Bring page evidence back to Node for local reproduction and environment patching
If the target is binary, APK, PE, ELF, DLL, or SO, please use , , or instead.
ida-reverseradare2reverse-engineering当前环境默认工具映射
Default Tool Mapping in Current Environment
本 skill 不假设存在裸工具名,而是默认绑定当前客户端环境里可用的 工具。
js-reverse_*如果当前任务明确提到 、、、浏览器断点、网络拦截、SourceMap 或 AST 去混淆,也仍然走本 skill;只是把底层 MCP 面切到 ,而不是把它当成一个新的总入口。
jshookmcpJS hookCDPjshookmcp前提条件: 不是本地裸命令工具,而是一个要先下载/注册/启用的 MCP server。只有在 Claude MCP 配置里接入并启用后,相关工具面才真的可调用。
jshookmcp常用映射:
- ->
list_scriptsjs-reverse_list_scripts - ->
get_script_sourcejs-reverse_get_script_source - ->
search_in_sourcesjs-reverse_search_in_sources - ->
break_on_xhrjs-reverse_break_on_xhr - ->
evaluate_scriptjs-reverse_evaluate_script - ->
get_paused_infojs-reverse_get_paused_info - ->
set_breakpoint_on_textjs-reverse_set_breakpoint_on_text - ->
list_network_requestsjs-reverse_list_network_requests - ->
get_request_initiatorjs-reverse_get_request_initiator - ->
get_websocket_messagesjs-reverse_get_websocket_messages - ->
take_screenshotjs-reverse_take_screenshot - ->
new_pagejs-reverse_new_page - ->
navigate_pagejs-reverse_navigate_page - ->
select_pagejs-reverse_select_page - ->
select_framejs-reverse_select_frame - ->
pause/resumejs-reverse_pause_or_resume
如果未来工具名前缀变化,先更新本节,不要在执行时临时猜测。
This skill does not assume the existence of bare tool names, but is bound by default to available tools in the current client environment.
js-reverse_*If the current task explicitly mentions , , , browser breakpoints, network interception, SourceMap, or AST deobfuscation, this skill should still be used; only switch the underlying MCP layer to instead of treating it as a new main entry.
jshookmcpJS hookCDPjshookmcpPrerequisite: is not a local bare command tool, but an MCP server that needs to be downloaded/registered/enabled first. Related tool capabilities can only be called after being connected and enabled in the Claude MCP configuration.
jshookmcpCommon mappings:
- ->
list_scriptsjs-reverse_list_scripts - ->
get_script_sourcejs-reverse_get_script_source - ->
search_in_sourcesjs-reverse_search_in_sources - ->
break_on_xhrjs-reverse_break_on_xhr - ->
evaluate_scriptjs-reverse_evaluate_script - ->
get_paused_infojs-reverse_get_paused_info - ->
set_breakpoint_on_textjs-reverse_set_breakpoint_on_text - ->
list_network_requestsjs-reverse_list_network_requests - ->
get_request_initiatorjs-reverse_get_request_initiator - ->
get_websocket_messagesjs-reverse_get_websocket_messages - ->
take_screenshotjs-reverse_take_screenshot - ->
new_pagejs-reverse_new_page - ->
navigate_pagejs-reverse_navigate_page - ->
select_pagejs-reverse_select_page - ->
select_framejs-reverse_select_frame - ->
pause/resumejs-reverse_pause_or_resume
If the tool name prefix changes in the future, update this section first, do not guess temporarily during execution.
jshookmcp 的定位
Positioning of jshookmcp
- 角色:的增强执行面,不是独立总控
js-reverse - 适合:浏览器自动化、CDP 调试、JS Hook、网络拦截、SourceMap 重建、AST 辅助理解
- 调用前提:先把 下载并注册到 MCP 客户端配置里,然后确保该 server 已启用
@jshookmcp/jshook - 建议入口:仍然按 执行,只是在
Observe → Capture → Rebuild阶段优先调用 jshookmcp 的浏览器与 Hook 能力Observe/Capture - 与 anything-analyzer 关系:两者都能做浏览器/网络侧取证;anything-analyzer 更偏抓包与 HTTP 分析,jshookmcp 更偏 JS 运行时、CDP、Hook 和源码理解
- Role: Enhanced execution layer for , not an independent master controller
js-reverse - Suitable for: Browser automation, CDP debugging, JS Hook, network interception, SourceMap reconstruction, AST-assisted understanding
- Prerequisite for calling: First download and register into the MCP client configuration, then ensure the server is enabled
@jshookmcp/jshook - Recommended entry: Still execute according to , but prioritize calling jshookmcp's browser and Hook capabilities during the
Observe → Capture → RebuildphaseObserve/Capture - Relationship with anything-analyzer: Both can perform browser/network-side forensics; anything-analyzer focuses more on packet capture and HTTP analysis, while jshookmcp focuses more on JS runtime, CDP, Hook, and source code understanding
核心原则
Core Principles
Observe-firstHook-preferredBreakpoint-lastRebuild-orientedEvidence-first
先页面观察,再最小化采样,再做本地补环境,不要跳过取证直接猜环境。
Observe-firstHook-preferredBreakpoint-lastRebuild-orientedEvidence-first
Start with page observation, then minimize sampling, then perform local environment patching. Do not skip forensics and guess the environment directly.
五阶段工作流
Five-Stage Workflow
1. Observe
1. Observe
目标:先确认目标请求、相关脚本、候选函数,不猜环境。
默认动作:
- 用 或
js-reverse_new_page打开目标页面js-reverse_navigate_page - 用 找目标请求
js-reverse_list_network_requests - 用 回溯调用来源
js-reverse_get_request_initiator - 用 、
js-reverse_list_scripts缩小脚本范围js-reverse_search_in_sources
必须产出:
- 目标请求 URL 或特征
- initiator 线索
- 可疑脚本 URL
- 初始任务记录
Goal: First confirm the target request, related scripts, and candidate functions, do not guess the environment.
Default actions:
- Use or
js-reverse_new_pageto open the target pagejs-reverse_navigate_page - Use to find the target request
js-reverse_list_network_requests - Use to trace back the call source
js-reverse_get_request_initiator - Use ,
js-reverse_list_scriptsto narrow down the script scopejs-reverse_search_in_sources
Mandatory outputs:
- Target request URL or characteristics
- Initiator clues
- Suspicious script URL
- Initial task record
2. Capture
2. Capture
目标:对目标请求做最小侵入采样,拿到参数样例、调用顺序、运行时证据。
规则:
- 优先
js-reverse_break_on_xhr - 优先 做轻量运行时观察
js-reverse_evaluate_script - 命中后先看
js-reverse_get_paused_info - 必要时再用
js-reverse_set_breakpoint_on_text
Goal: Perform minimally invasive sampling on the target request to obtain parameter samples, call sequences, and runtime evidence.
Rules:
- Prioritize
js-reverse_break_on_xhr - Prioritize for lightweight runtime observation
js-reverse_evaluate_script - Check first after hitting the breakpoint
js-reverse_get_paused_info - Use only when necessary
js-reverse_set_breakpoint_on_text
3. Rebuild
3. Rebuild
目标:把页面证据整理成本地可迭代的 Node 复现材料。
规则:
- 本地补环境必须以页面观测证据为依据
- 不允许空想式补
window/document/navigator/crypto/storage - 每次只记录一个最小因果补丁决策
Goal: Organize page evidence into locally iterable Node reproduction materials.
Rules:
- Local environment patching must be based on page observation evidence
- Do not patch based on assumptions
window/document/navigator/crypto/storage - Record only one minimal causal patch decision at a time
4. Patch
4. Patch
目标:按报错和 first divergence 驱动补环境,直到本地脚本稳定跑出目标参数。
规则:
- 先看缺什么,再补什么
- 一次只做一个最小补丁决策
- 每次补丁后立即复测
- 每次补丁都写入任务记录
Goal: Drive environment patching based on errors and first divergence until the local script stably outputs the target parameters.
Rules:
- Check what is missing first, then patch accordingly
- Make only one minimal patch decision at a time
- Retest immediately after each patch
- Record each patch in the task record
5. DeepDive
5. DeepDive
目标:本地跑通后,再做去混淆、控制流还原、业务逻辑提纯。
规则:
- 如果当前任务只是出签名,这一阶段可以降级
- 如果要长期复用算法链路,这一阶段必须做
- Issue #65 混淆旁路(U–AV §4):JSVMP(AD)→ ;CFF+字符串数组(AE)→
E-js-vmp;DevTools/debugger 反调试(AF)→E-js-deobf。完整触发表见E-js-anti-debug;AST 细节仍用../reverse-engineering/references/nonpe-format-cookbook.mdreferences/ast-deobfuscation.md
Goal: After running successfully locally, perform deobfuscation, control flow restoration, and business logic purification.
Rules:
- This phase can be downgraded if the current task only requires generating signatures
- This phase must be completed if the algorithm chain needs long-term reuse
- Issue #65 Obfuscation Bypass (U–AV §4): JSVMP (AD) → ; CFF+string array (AE) →
E-js-vmp; DevTools/debugger anti-debugging (AF) →E-js-deobf. Complete trigger table seeE-js-anti-debug; AST details still use../reverse-engineering/references/nonpe-format-cookbook.mdreferences/ast-deobfuscation.md
执行要求
Execution Requirements
- 所有重要步骤都要写入本地 task artifact
- 如果无法解释为什么调用某个工具,就不要调用
- 优先使用 或 jshookmcp 的现成 MCP 能力直接取证,不要先写脚本重造能力
js-reverse_* - 失败时按 回退
references/fallbacks.md - 输出遵循
references/output-contract.md
- All important steps must be written into the local task artifact
- Do not call a tool if you cannot explain why it is being called
- Prioritize using the ready-made MCP capabilities of or jshookmcp for direct forensics, do not reinvent capabilities by writing scripts first
js-reverse_* - Fall back according to when failing
references/fallbacks.md - Output follows
references/output-contract.md
必读引用
Required References
- 自动化入口:
references/automation-entry.md - 参数默认值:
references/tool-defaults.md - 任务输入模板:
references/task-input-template.md - MCP 专用任务编排:
references/mcp-task-template.md - 任务产物:
references/task-artifacts.md - 本地复现:
references/local-rebuild.md - 补环境:
references/env-patching.md - Node 复现:
references/node-env-rebuild.md - 插桩:
references/instrumentation.md - AST 去混淆:
references/ast-deobfuscation.md - 非 PE/JS 混淆菜谱 U–AV:(AD/AE/AF)
../reverse-engineering/references/nonpe-format-cookbook.md - 回退:
references/fallbacks.md - 输出契约:
references/output-contract.md
- Automation entry:
references/automation-entry.md - Parameter defaults:
references/tool-defaults.md - Task input template:
references/task-input-template.md - MCP-specific task orchestration:
references/mcp-task-template.md - Task artifacts:
references/task-artifacts.md - Local reproduction:
references/local-rebuild.md - Environment patching:
references/env-patching.md - Node reproduction:
references/node-env-rebuild.md - Instrumentation:
references/instrumentation.md - AST deobfuscation:
references/ast-deobfuscation.md - Non-PE/JS obfuscation cookbook U–AV: (AD/AE/AF)
../reverse-engineering/references/nonpe-format-cookbook.md - Fallback:
references/fallbacks.md - Output contract:
references/output-contract.md
路由上下文
Routing Context
上游入口: (总控)、
上游备选:
skills/SKILL.mdrouting.md- anything-analyzer MCP(端口 23816)的浏览器工具可作为替代或补充
- jshookmcp 可作为更强的浏览器/CDP/Hook/Network/SourceMap/AST 执行面
- (如果目标不是前端 JS)
reverse-engineering/SKILL.md
下游出口:
- 需补环境 →
references/env-patching.md - 需本地复现 → /
references/local-rebuild.mdreferences/node-env-rebuild.md - 需去混淆 →
references/ast-deobfuscation.md - 走不通时回退 →
references/fallbacks.md
同级关联模块: anything-analyzer MCP(浏览器自动化和 HTTP 捕获能力可以互补)
Upstream Entries: (Master Control),
Upstream Alternatives:
skills/SKILL.mdrouting.md- Browser tools of anything-analyzer MCP (port 23816) can be used as substitutes or supplements
- jshookmcp can be used as a stronger execution layer for browser/CDP/Hook/Network/SourceMap/AST
- (if the target is not front-end JS)
reverse-engineering/SKILL.md
Downstream Exits:
- Environment patching required →
references/env-patching.md - Local reproduction required → /
references/local-rebuild.mdreferences/node-env-rebuild.md - Deobfuscation required →
references/ast-deobfuscation.md - Fallback when stuck →
references/fallbacks.md
Peer Associated Modules: anything-analyzer MCP (browser automation and HTTP capture capabilities can complement each other)
按需自举(On-Demand Bootstrap)
On-Demand Bootstrap
本 skill 依赖的 MCP 能力可通过统一自举系统自动注册。
The MCP capabilities relied on by this skill can be automatically registered through the unified bootstrap system.
自动化能力边界
Automation Capability Boundaries
| 能力 | 可自动注册 | 方式 | 说明 |
|---|---|---|---|
| jshookmcp | ✓ | npm-mcp(npx 启动) | 自动写入 Claude MCP 配置 |
| anything-analyzer | ✓ | local-http-mcp | 自动注册 + 可自动启动服务 |
| Node.js | ✓ | winget 安装 | 运行时依赖 |
| Capability | Auto-registerable | Method | Description |
|---|---|---|---|
| jshookmcp | ✓ | npm-mcp (started via npx) | Automatically written to Claude MCP configuration |
| anything-analyzer | ✓ | local-http-mcp | Auto-registration + service can be started automatically |
| Node.js | ✓ | Install via winget | Runtime dependency |
自举方式
Bootstrap Methods
powershell
undefinedpowershell
undefined注册 jshookmcp 到 MCP 配置
Register jshookmcp to MCP configuration
powershell -File "<skill-root>\scripts\bootstrap-reverse.ps1" -Capability @('jshookmcp')
powershell -File "<skill-root>\scripts\bootstrap-reverse.ps1" -Capability @('jshookmcp')
注册并启动 anything-analyzer
Register and start anything-analyzer
powershell -File "<skill-root>\scripts\bootstrap-reverse.ps1" -Capability @('anything-analyzer') -StartServices
undefinedpowershell -File "<skill-root>\scripts\bootstrap-reverse.ps1" -Capability @('anything-analyzer') -StartServices
undefined注意事项
Notes
- 注册后仍需在 AI 客户端中启用该 MCP server 才能调用
jshookmcp - 需要 pnpm 和项目源码,bootstrap 会自动 clone 并安装依赖
anything-analyzer - 如果 Node.js 未安装,bootstrap 会先通过 winget 安装 Node.js 22
<br><br>## 任务完成自检(声称完成前 MUST 通过)
- 我是否执行了工作流中的每一步(而不是只阅读)?
- 我是否基于 使用了真实工具路径?
tool-index - 我是否产出了可复现证据(命令/脚本/截图/报告)?
- 我是否完成并回写了 RULES 要求的 Checklist 项?
- After registering , you still need to enable the MCP server in the AI client to call it
jshookmcp - requires pnpm and project source code; bootstrap will automatically clone and install dependencies
anything-analyzer - If Node.js is not installed, bootstrap will first install Node.js 22 via winget
<br><br>## Task Completion Self-Check (MUST Pass Before Claiming Completion)
- Did I execute every step in the workflow (instead of just reading)?
- Did I use real tool paths based on ?
tool-index - Did I produce reproducible evidence (commands/scripts/screenshots/reports)?
- Did I complete and write back the Checklist items required by RULES?