Foreword¶
DeepSeek Harness (DSH) allows extending agent capabilities through plugins. When analyzing front-end encryption logic or dealing with obfuscated JavaScript, direct debugging in a browser environment is often limited by environment isolation and missing dependencies. This plugin aims to solve this pain point by providing a set of tools for static restoration and dynamic Hooking, helping analysts extract clean logic from obfuscated code.
Core Capabilities¶
The plugin consists of three main functional modules:
- Static Restoration: This is the core path. It converts extracted obfuscated front-end JS into compute functions with no host dependencies, stripping environment dependencies such as
window/document/navigator/canvas. This enables analysts to compute signatures, encrypt request bodies, or decrypt responses in a pure Node environment without browser injection. - Assisted Localization: Generates Hook scripts to capture function arguments, return values, and call stacks. This is highly effective for debugging, forensics, and locating encryption entry points.
- Validation: Built-in validation functions for various cryptographic algorithms covering AES/RSA/MD5/SHA/HMAC/cyclic XOR/single-byte brute force/large-integer modular exponentiation, allowing recomputation and verification using known ciphertext, keys, or IVs.
Installation & Configuration¶
Environment Requirement: Node.js >= 24 is required.
Installation Command:
dsh plugin --profile web add github:wangyin572/dsh-plugin-reverse
After installation, the plugin provides a series of analysis tool commands in DSH. After running the above command, restart the corresponding profile to take effect.
Typical Workflow¶
Depending on the code situation, follow these steps:
- Feasibility Assessment: Before starting analysis, run
rev_assessfirst. This command analyzes the code to determine whether static restoration or Hooking is feasible, providing blocking points, entry point candidates, and environment value requirements, and generates an execution plan. - Assisted Localization: If the code contains
evalor dynamic logic, userev_hook_generateto generate a Hook script. After saving and running the script, you can use__revHook.dump()to view captured records,__revHook.save()to export JSON, or__revHook.unhook()to restore methods. - Static Extraction: Use
rev_extract_purefor static restoration, generatingpure.mjs/env.mjs/demo.mjsmodules after dependency closure extraction and environment injection. - Code Deobfuscation: Use
rev_deobfuscateto perform semantically-preserving safe rewriting of source code (such as escape restoration, constant folding, member access normalization), and detect obfuscation patterns. - Result Validation: Use
rev_crypto_calcto validate encryption results, covering both standard library and hand-written large integer paths.
Scope of Use & Notes¶
Scope of Use: This plugin is only applicable to authorized analysis of code, including self-owned projects, authorized security testing, malware analysis, CTF, and interoperability research.
Security Warning: Hook scripts record function arguments and return values, which may contain credentials. Please only run in environments where you are authorized to analyze. Do not point this tool at others’ accounts or systems.
Configuration Note: Do not mix bundle manifest (dsh.bundle) with profile manifest (dsh.profile).