dsh-plugin-reverse: DeepSeek Harness JavaScript Reverse Engineering Toolkit

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:

  1. 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.
  2. 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.
  3. 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:

  1. Feasibility Assessment: Before starting analysis, run rev_assess first. 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.
  2. Assisted Localization: If the code contains eval or dynamic logic, use rev_hook_generate to 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.
  3. Static Extraction: Use rev_extract_pure for static restoration, generating pure.mjs / env.mjs / demo.mjs modules after dependency closure extraction and environment injection.
  4. Code Deobfuscation: Use rev_deobfuscate to perform semantically-preserving safe rewriting of source code (such as escape restoration, constant folding, member access normalization), and detect obfuscation patterns.
  5. Result Validation: Use rev_crypto_calc to 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).

More Information

羽毛球分组比赛记分
小程序二维码

欢迎使用《羽毛球分组比赛记分》微信小程序

Xiaoye