From 891b752962b5679389c4f1269b30bda2994be95a Mon Sep 17 00:00:00 2001 From: angusdevgo Date: Thu, 24 Sep 2026 14:59:33 +0800 Subject: [PATCH] =?UTF-8?q?docs:=20overhaul=20README.md=20&=20README.zh.md?= =?UTF-8?q?=20=E2=80=94=20ASCII=20arch=20diagram,=2030s=20demo,=20MCP+23,?= =?UTF-8?q?=20context-budget=20notes,=20collapsible=20tree,=20Roadmap,=20u?= =?UTF-8?q?pdated=20badges?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 464 +++++++++++++++++++++++++++++------------------- README.zh.md | 488 ++++++++++++++++++++++++++++++--------------------- 2 files changed, 572 insertions(+), 380 deletions(-) diff --git a/README.md b/README.md index 0de3abf..1bd8b6d 100644 --- a/README.md +++ b/README.md @@ -1,19 +1,24 @@

- Seep Reverse Lab Logo + Seep Reverse Lab Logo

Seep Reverse Lab

- Agent-Native Multi-Platform Reverse Engineering · Authorization Audit (CWE-602) · Autonomous Security Workbench + Agent-Native · Multi-Platform Reverse Engineering · CWE-602 Authorization Audit · Autonomous Security Workbench

- Release + Release License Platform Architecture - MCP Tools +

+ +

+ MCP Tools + Knowledge Base + MANUAL SOPs LINUX DO

@@ -22,14 +27,14 @@

- Overview • - Capabilities • - Structure • - Scope • + Overview • + Architecture • + Demo • MCP Matrix • Quick Start • + Scope • Agent Contract • - Community • + Roadmap • Disclaimer

@@ -41,256 +46,347 @@ --- -## 🌟 Project Overview & Problem Statement +## 🌟 Project Overview Seep consolidates fragmented reverse engineering toolchains (Radare2 / JADX / Apktool / Frida / IDA), operational knowledge bases, prompt engineering contracts, and battle-tested field experience into an **Agent-Native Autonomous Workbench**. Users provide plain-language technical goals; the agent autonomously performs platform identification, vulnerability type classification, surgical binary patching, and closed-loop evidence delivery. -### Five Core Pain Points Solved: -- 🚀 **Toolchain Fragmentation**: Traditional reverse engineering requires manual switching across 7+ disparate tools scattered across different paths. Seep bundles core toolchains and exposes them via a unified Model Context Protocol (MCP) server. -- 🧠 **Agent Decision Drift**: Confronted with obfuscated binaries or unknown APKs, LLMs frequently get trapped in trial-and-error rabbit holes. The `softseep` orchestrator implements automatic two-stage classification (Platform: Windows/Android/Linux/Web × Task Type: 9 categories) for deterministic routing. -- 🛡️ **Model Refusal in Security Audits**: Authorized white-box audits and reversing tasks frequently trigger provider safety filters. Seep implements a three-tier mitigation architecture: request-level `BLOCK_NONE` payload injection, transparent colloquial-to-formal security terminology mapping, and reasoning-level cognitive redirection. -- 📚 **Ephemeral Knowledge & Lack of Memory**: Most reversing tasks start from scratch. Seep bundles 9 desensitized industrial architecture paradigms (Project A through Project I) and 289 technical field journals, enforcing the discipline: *search knowledge base before executing commands*. -- 📦 **High Environment Setup Friction**: Manual toolchain configuration for new machines or interns is error-prone. Seep provides an automated one-click installation script supporting **Pi Agent**, **Claude Code**, **DeepSeek Harness (DSH)**, and **Codex / OpenCode**. +### Five Core Pain Points Solved + +| Pain Point | Solution | +|---|---| +| 🔧 **Toolchain Fragmentation** | 23 MCP tools wrapping Radare2, JADX, Apktool, Frida — unified API, zero manual switching | +| 🧠 **Agent Decision Drift** | `softseep` orchestrator: two-stage auto-classification (Platform × 9 Task Types) + 7-gate decision tree | +| 🛡️ **Model Refusal in Security Audits** | Three-tier mitigation: `BLOCK_NONE` injection + transparent terminology mapping + cognitive redirection | +| 📚 **Ephemeral Knowledge** | 289 technical field journals + 9 desensitized paradigms + "search KB before executing" enforced discipline | +| 📦 **Setup Friction** | One-click `install.ps1` → supports Pi Agent, Claude Code, DeepSeek Harness (DSH), Codex / OpenCode | --- -## ⚡ Core Capabilities (What It Is Good At) +## ⚙️ How It Works -- 🎯 **Natural Language Intent Resolution & Two-Stage Auto-Classification**: Users do not need to memorize flags or menus. Commands like "analyze license validation", "locate card-key check", or "suppress ad gating" are mapped using binary file signatures (magic bytes, PE headers, imports) and semantic verbs to automatically converge on the correct toolchain. -- 🔍 **Client-Side Authorization Audit (CWE-602)**: Determines within minutes whether a feature gate is driven by local booleans/timestamps or by server-authoritative signatures and remote asset delivery. Prevents the classic "fake VIP trap" where forcing local booleans leads to blank screens or unhandled exceptions when requesting missing server-side data. -- 🛡️ **Authenticode Digital Signature Preservation**: For signed Windows binaries, disk-level hex patching is strictly prohibited. Seep routes through DLL search-order hijacking (proxying system libraries like `version.dll` or `sentry.dll`) to apply in-memory patches during the loading phase, keeping the host binary's Authenticode signature 100% intact. -- 💎 **Comprehensive Coverage of 9 Industrial Paradigms**: - - In-memory patching of monolithic offline binaries - - IPC message filtering in multi-process architectures - - Display-layer string forgery via IAT hooking (`SetDlgItemTextW`) - - MPRESS packing analysis, 18-point surgical patching, and Windows ACL trial-period freezing - - EXECryptor VM concentrated arbitration bypass via 2-point Call redirection - - .NET dynamic IL extraction via Harmony memory dumping and 96-bit combined hash keygen reconstruction - - Self-referential hash check bypass and startup watchdog guards - - In-place Ed25519 public key ciphertext replacement - - Sliding-window validation bypass on weak-modulus RSA -- 🔌 **Pre-Packaged Offline Execution**: Core tool suites (Radare2, JADX, Apktool, Playwright engine, IDA bridge adapter) are pre-bundled on disk, ready to run inside fully isolated sandboxes with zero external network dependencies. +``` +User Input (plain language — "bypass the premium check in FooBar.apk") + │ + ▼ +┌───────────────────────────────────────────────────────────────────┐ +│ Lab Mode State Machine (disk-backed ~/.pi/agent/lab-mode.flag) │ +│ • Colloquial → compliance terminology auto-mapping │ +│ • BLOCK_NONE injection + cognitive redirection (anti-refusal) │ +│ • Context persists across model switches & context compression │ +└────────────────────────────┬──────────────────────────────────────┘ + │ + ▼ +┌───────────────────────────────────────────────────────────────────┐ +│ softseep Master Orchestrator │ +│ ① Platform → Windows PE / Android APK / Linux ELF / Web │ +│ ② Task Type → 9 Paradigms × 7 Gates (G0–G6 decision tree) │ +│ ③ Route → apkseep / ida-reverse / seep MCP / KB │ +└────────┬──────────────────┬────────────────────┬──────────────────┘ + │ │ │ + ▼ ▼ ▼ + seep MCP IDA Pro MCP KB Search + 23 tools (optional) 289 journals + (Radare2/JADX/ (Zero-Waste Recon) + Apktool/Frida) + │ + ▼ +┌───────────────────────────────────────────────────────────────────┐ +│ Context Budget Control (v1.1 noise reduction) │ +│ • seep_r2_decompile: full / fold (−60% tokens) / summary (−90%) │ +│ • seep_r2_disasm: full / branch (control-flow only) │ +│ • seep_r2_xrefs: paginated, limit=10, total stats header │ +└────────────────────────────┬──────────────────────────────────────┘ + │ + ▼ + PoC Generated → Sandbox Execution → Self-Healing Loop + │ + ▼ + Airplane-Mode Confirmation (CWE-602 iron-clad proof) + │ + ▼ + 3-Part Consulting-Grade Security Report ✓ +``` + +--- + +## ⚡ 30-Second Demo + +Once deployed, just talk to your agent in plain language: + +``` +lab: analyze FooBar.apk — find the premium check and bypass it +``` + +The agent autonomously: + +1. **`seep_auto_triage`** → identifies DEX + ARM64 SO, no packer detected +2. **`seep_apk_decompile`** with `output_mode=fold` → extracts control-flow skeleton only *(saves ~60% tokens)* +3. **`seep_kb_search`** → finds matching CWE-602 pattern from field journal #142 +4. **`seep_apk_gen_hook`** → generates `hook_verify.js` Frida script +5. Executes on connected device → captures stdout, **self-heals** `ClassNotFoundException`, re-runs +6. Airplane-mode confirmation ✓ → **`seep_gen_security_report`** → 3-part audit report delivered + +> Total elapsed time on a typical client app: **8–20 minutes**, fully unattended. + +--- + +## ⚡ Core Capabilities + +- 🎯 **Natural Language Intent Resolution**: Binary magic bytes + semantic verb mapping → correct toolchain, no flags to memorize +- 🔍 **CWE-602 Authorization Audit**: Minutes to determine if a feature gate is local-boolean or server-authoritative +- 🛡️ **Authenticode Signature Preservation**: DLL search-order hijacking (`version.dll` / `sentry.dll`) keeps host binary signature intact +- 🔄 **PoC Self-Healing Loop**: Frida error → root-cause mapping → auto-fix → re-execute (up to 3 attempts, then structured handoff) +- 💎 **9 Industrial Architecture Paradigms**: Monolithic offline PE → multi-process IPC → VM arbitration → .NET keygen → weak RSA bypass *(fully desensitized)* +- 🔌 **Offline-Ready**: All toolchains pre-bundled (251 MB), zero network dependencies after setup --- ## 📋 Directory Structure -Seep enforces strict progressive disclosure and modular separation of concerns: +
+📁 Full Directory Tree (click to expand) ``` Seep\ (251 MB) -├── README.md ← Global architecture and documentation (Default: English) +├── README.md ← This file (English default) ├── README.zh.md ← Chinese documentation (中文文档) -├── CLAUDE.md ← Project-level native instructions for Claude Code -├── .mcp.json ← Project-level MCP server registration (Claude Code / OpenCode) -├── DSH-PROFILE.md ← DeepSeek Harness Cordis plugin configuration template +├── CLAUDE.md ← Project-level instructions for Claude Code +├── .mcp.json ← Project-level MCP registration (Claude Code / OpenCode) +├── DSH-PROFILE.md ← DeepSeek Harness Cordis plugin config template +├── check.bat ← ⭐ Double-click one-shot health verifier (Windows) +├── check.ps1 ← PowerShell health verifier entry point │ -├── Tool\ ← Core workbench assets +├── Tool\ │ ├── skill\ ← 9 specialized reverse engineering skills -│ │ ├── softseep\ ← ⭐ Master orchestrator skill (Router + 8 on-demand reference guides) -│ │ ├── apkseep\ ← End-to-end Android APK/DEX/SO reverse engineering skill (115 files) -│ │ ├── ida-reverse\ ← IDA Pro automated spawning, headless probing, and MCP coordination -│ │ ├── client-license-validation-bypass\ ← Cross-runtime license / card-key validation attack playbook -│ │ └── safe-skills\ ← 5 standalone tool packages (General RE / APK diff / Radare2 / JS RE / IDA) +│ │ ├── softseep\ ← ⭐ Master orchestrator (Router + 8 on-demand references) +│ │ ├── apkseep\ ← End-to-end Android APK/DEX/SO skill (115 files) +│ │ ├── ida-reverse\ ← IDA Pro automated spawning & MCP coordination +│ │ ├── client-license-validation-bypass\ ← Cross-runtime license attack playbook +│ │ └── safe-skills\ ← 5 standalone tool packages │ │ -│ ├── mcp\ ← Tool service layer (MCP Engine) -│ │ ├── seep_mcp_server.py ← Core MCP server exposing 22 low-level reversing & KB tools +│ ├── mcp\ ← MCP Engine +│ │ ├── seep_mcp_server.py ← Core server: 23 native reversing & KB tools │ │ ├── mcp.json.template ← Global MCP client configuration template -│ │ └── Tool\ ← ⚠️ Hardcoded relative runtime path required by seep MCP -│ │ ├── safe\ ← Pre-bundled cross-platform reversing toolchains -│ │ │ ├── jadx\ ← 75 MB (v1.5.6 clean optimized build) -│ │ │ ├── radare2\ ← 39 MB (v6.2.2 full binary suite) -│ │ │ ├── apktool\ ← 24 MB (v3.0.3 runtime environment) -│ │ │ ├── hook-mcp\ ← 331 KB (Frida / LSPosed dynamic instrumentation templates) -│ │ │ ├── ida-pro-mcp\ ← 28 MB (IDA bridge adapter dependencies) -│ │ │ ├── js-reverse-mcp\← 61 MB (Web / JS dynamic debugging engine) -│ │ │ └── playwright-mcp\← 8.8 MB (Headless browser automation runtime) -│ │ └── reverselab\ ← Security knowledge base (687 files, including 289 field journals) +│ │ └── Tool\ ← ⚠️ Hardcoded relative runtime path (do not rename) +│ │ ├── safe\ ← Pre-bundled cross-platform toolchains +│ │ │ ├── jadx\ ← 75 MB (v1.5.6) +│ │ │ ├── radare2\ ← 39 MB (v6.2.2 full suite) +│ │ │ ├── apktool\ ← 24 MB (v3.0.3) +│ │ │ ├── hook-mcp\ ← Frida / LSPosed instrumentation templates +│ │ │ ├── ida-pro-mcp\ ← IDA bridge adapter +│ │ │ ├── js-reverse-mcp\← Web / JS debugging engine +│ │ │ └── playwright-mcp\← Headless browser automation +│ │ └── reverselab\ ← 289 field journals + attack chains │ │ -│ ├── prompts\ ← Agent coordination specifications and runtime extensions -│ │ ├── SYSTEM.md ← Pi Agent system instructions (Lab state machine, anti-refusal rules, SOP) -│ │ ├── AGENTS.md ← Cross-agent portable instructions (Codex, OpenCode, DSH) -│ │ └── extensions\ ← Runtime interceptors (BLOCK_NONE injection, automatic term mapping) +│ ├── prompts\ ← Agent coordination specs & runtime extensions +│ │ ├── SYSTEM.md ← Pi Agent system instructions +│ │ ├── AGENTS.md ← Cross-agent portable instructions +│ │ └── extensions\ ← BLOCK_NONE injection + terminology mapping │ │ -│ ├── cases\ ← 9 desensitized industrial paradigm reference projects (Project A ~ I) -│ │ ├── Project A\ (Offline PE) ├── Project B\ (Multi-Process) ├── Project C\ (Resource Template & IAT Hook) -│ │ ├── Project D\ (Packer/ACL) ├── Project E\ (VM Redirect) ├── Project F\ (.NET Reversible Keygen) -│ │ ├── Project G\ (Self-Ref) ├── Project H\ (Pubkey Repl) ├── Project I\ (Weak RSA Entry Patch) -│ │ -│ ├── upstream\ ← Upstream verification layer (apk-reverse offline test suite) -│ ├── docs\ ← Engineering reference docs (MCP setup, download origins, dependency map) -│ └── scripts\ ← Workspace automation scripts (Case initialization, signing, IDA spawning) +│ ├── cases\ ← 9 desensitized industrial paradigm projects (A ~ I) +│ ├── upstream\ ← apk-reverse offline verification test suite (MIT) +│ ├── docs\ ← Engineering reference docs +│ └── scripts\ ← Workspace automation scripts │ -├── setup\ ← Automated installation, dependency setup, and self-check scripts -└── MANUAL\ ← Infrastructure prerequisites and commercial licensing guide (IDA Pro, etc.) +├── setup\ ← Automated install, repair & self-check scripts +└── MANUAL\ ← 5 Tactical SOP guides + ├── PREREQUISITES.md ← Environment requirements + ├── IDA-PRO.md ← Commercial IDA Pro integration guide + ├── ANTI-DEBUG.md ← Anti-debug bypass dictionary & proxy DLL framework + ├── UNPACKING.md ← UPX/MPRESS/Themida/VMP unpacking SOP + └── POC-VALIDATION.md ← Frida self-healing loop & PoC sandbox validation ``` ---- - -## 🔬 Technical Scope - -Seep categorizes software protection, virtualized execution, and authorization schemes into four core technical domains: - -### 1. CTF & Challenge Workflows -- **Attack-Network Routing**: Driven by the integrated `reverselab` framework: *Signal Detection → Knowledge Base Search (`seep_kb_search`) → Template Assembly → MCP Tool Execution*. -- **Web Targets & Non-REST Protocols**: JWT signature attacks, KID injection, SSRF chains, SSTI, prototype pollution, deserialization gadget chains, and schema-free Protobuf decoding. -- **Automated Competitions**: Standardized exploit seed libraries (`seep_kb_payloads`) and emergency triage checklists (`seep_kb_checklist`) eliminate hand-writing repetitive verification scripts under competition pressure. - -### 2. Client-Side Authorization & License Auditing (CWE-602) -- **Authority Attribution Model**: Differentiates server-authoritative gates from client-side boolean checks using airplane mode isolation, loopback hijacking (`netsh interface ipv4 add address`), and timestamp offset testing. -- **Nine Architectural Paradigms**: - - **Project A (Monolithic Offline)**: Scalar return value override (`mov eax, 1; ret`). - - **Project B (Multi-Process Hybrid)**: Sub-process name-based proxy DLL dispatching and three-tier state persistence across UI and background services. - - **Project C (Resource Template & UI Forgery)**: Bijective bit-permutation mask decoding and IAT hooking on `SetDlgItemTextW`. - - **Project D (Compressed Packer & Multi-Strategy)**: MPRESS unpacking, 18-point binary patching, digital certificate directory truncation, and Windows ACL trial-key locking. - - **Project E (Virtualized Arbitration)**: Bypass EXECryptor VM verification via 2-point Call redirection to memory stubs. - - **Project F (.NET Dynamic Deobfuscation)**: Harmony-assisted memory dumping of decrypted IL, 96-bit combined hash recovery, and offline keygen generation. - - **Project G (Self-Referential Verification)**: Identifies self-referential SHA-384 payload hashing and applies 5-byte function-entry patching with login watchdog persistence. - - **Project H (In-Place Public Key Replacement)**: Replaces embedded Ed25519 public key ciphertext within binary using derived keystreams to sign arbitrary payloads. - - **Project I (High-Order Digital Signature Bypass)**: CNG structure analysis, weak-modulus RSA sliding window identification, and activation injection on export entry points. - -### 3. Android & DEX/SO Deep Analysis -- **Surgical DEX Patching**: Same-length byte patching (avoids method rebuilding and offset shifts) and automated recalculation of DEX header Adler-32 checksum and SHA-1 signatures. -- **Packer Diagnostics**: Clear classification tree distinguishing Java2C, native payload shells, extraction shells (trivial-body ratio metric), and private DEX-VMP bytecode. -- **Runtime Anti-Analysis Defeat**: Root detection bypass, multi-layer SSL Pinning circumvention, Native-layer Frida hooking, and Frida-RPC service bridging. -- **Repack & Align Pipeline**: Automated repacking enforcing `resources.arsc` STORED status, 4-byte Zipalign boundary alignment, and v1+v2+v3 digital signing. - -### 4. Binary Disassembly & Native Reverse Engineering (PE/ELF/Mach-O) -- **Multi-Platform Static Analysis**: Headless Radare2 execution for architecture identification, section entropy scanning, symbol recovery, and C-like decompilation. Full IDA Pro MCP integration for Hex-Rays decompilation, cross-references, and struct recovery. -- **Anti-Tamper & Suicide Logic Defeat**: Analysis of deliberate crashes (e.g. `fault addr 0x4` null-pointer stubs), raw `svc` syscall detection, and kernel-level anti-debugging. Enforces the rule: *neutralize termination paths by returning clean exit codes, never by hanging execution in infinite loops*. +
--- ## 🛠️ MCP Tool Matrix -The bundled `seep` MCP server exposes **22 native tools** across five functional groups: +The bundled `seep` MCP server exposes **23 native tools** across five functional groups: -| Category | Tool Identifier | Functionality | -|---|---|---| -| **Health Checks** | `seep_status` | Verifies readiness of Radare2, JADX, Apktool, and local knowledge base | -| | `seep_ida_status` | Probes connectivity to the remote IDA Pro MCP service | -| **Binary Analysis (R2)** | `seep_r2_info` | Reads binary architecture, bitness, endianness, and security mitigations (DEP/ASLR/Canary/PIE) | -| | `seep_r2_strings` | Extracts printable strings with regex and section filtering | -| | `seep_r2_functions` | Enumerates binary functions, import/export tables, and entry points | -| | `seep_r2_disasm` | Generates disassembly listings with cross-references and line markers | -| | `seep_r2_decompile` | Invokes decompiler engine to produce C-like pseudocode | -| | `seep_r2_diff` | Computes code-level or hex-level differences between two binaries | -| | `seep_r2_asm` | Assembles assembly instructions to machine code or disassembles raw hex | -| | `seep_r2_cmd` | Executes arbitrary low-level Radare2 pipeline commands | -| **Android RE** | `seep_apk_info` | Parses APK manifest, declared components, permissions, and signatures without Java | -| | `seep_apk_decompile` | Orchestrates JADX engine to output deobfuscated Java source projects | -| | `seep_apk_unpack` | Disassembles APK resources and Smali code trees via Apktool | -| | `seep_apk_smali_search`| Rapidly searches for crypto keys, API routes, or gate checks in Smali | -| | `seep_apk_gen_hook` | Generates ready-to-run Frida hooks with stack traces and argument overrides | -| **Knowledge Base** | `seep_kb_search` | Full-text searches across 289 field journals, returning actionable code and attack chains | -| | `seep_kb_read` | Retrieves full technical reference documents by topic | -| | `seep_kb_checklist` | Outputs emergency operational checklists and attack matrixes | -| | `seep_kb_payloads` | Retrieves security test payload seeds (JWT, SSRF, SSTI, SQLi, deserialization) | -| **Orchestration** | `seep_task_init` | Initializes an isolated, audit-compliant sandbox directory for new targets | -| | `seep_auto_triage` | Performs automated full-sample health check on unknown binaries | -| | `seep_gen_security_report`| Synthesizes collected findings into a 3-part structured compliance security report | +| Category | Tool | Functionality | Token Mode | +|---|---|---|---| +| **Health** | `seep_status` | Verifies Radare2, JADX, Apktool, KB readiness | — | +| | `seep_ida_status` | Probes IDA Pro MCP service connectivity | — | +| **Binary (R2)** | `seep_r2_info` | Architecture, bitness, DEP/ASLR/Canary/PIE | — | +| | `seep_r2_strings` | Extracts strings with regex + section filtering | `limit=` | +| | `seep_r2_functions` | Functions, imports, exports, entry points | `limit=` | +| | `seep_r2_disasm` | Disassembly with cross-references | `full` / `branch` | +| | `seep_r2_decompile` | C-like pseudocode via pdc engine | `full` / `fold` / `summary` | +| | `seep_r2_xrefs` | Cross-reference graph, paginated | `limit=10` default | +| | `seep_r2_diff` | Code / hex diff between two binaries | — | +| | `seep_r2_asm` | Assemble ↔ disassemble machine code | — | +| | `seep_r2_cmd` | Raw Radare2 pipeline commands | — | +| **Android** | `seep_apk_info` | APK manifest, permissions, signatures (no Java) | — | +| | `seep_apk_decompile` | JADX full Java source decompilation | — | +| | `seep_apk_unpack` | Apktool resource + Smali disassembly | — | +| | `seep_apk_smali_search` | Smali pattern search (crypto keys, auth gates) | `limit=` | +| | `seep_apk_gen_hook` | Ready-to-run Frida hooks with stack traces | — | +| **Knowledge Base** | `seep_kb_search` | Full-text search across 289 field journals | `limit=` | +| | `seep_kb_read` | Full technical reference retrieval by topic | — | +| | `seep_kb_checklist` | Emergency triage checklists & attack matrices | — | +| | `seep_kb_payloads` | Security test seeds (JWT, SSRF, SSTI, SQLi) | — | +| **Orchestration** | `seep_task_init` | Initializes isolated audit sandbox directory | — | +| | `seep_auto_triage` | Automated full-sample health check | — | +| | `seep_gen_security_report` | Synthesizes 3-part compliance security report | — | + +> 💡 **Context Budget Control** (v1.1): `seep_r2_decompile` with `output_mode=fold` reduces token consumption by ~60%; `summary` mode by ~90%. Use `seep_r2_xrefs` instead of raw `axt` to avoid flooding the context window with hundreds of references. --- ## 🚀 Quick Start & Deployment ### 1. Prerequisites -- **Operating System**: Windows 10 / 11 x64 (Recommended) or compatible Linux / macOS. -- **Runtimes**: Python 3.11+, Node.js 18+, Git. +- **OS**: Windows 10 / 11 x64 (recommended) or compatible Linux / macOS +- **Runtimes**: Python 3.11+, Node.js 18+, Git ### 2. One-Click Setup -Open an elevated terminal (PowerShell as Administrator on Windows), navigate to `setup/`, and run: +Open an elevated PowerShell terminal, navigate to the project root, and run: ```powershell cd setup powershell -ExecutionPolicy Bypass -File .\install.ps1 ``` -> **What the script does automatically**: Unpacks pre-compressed dependency archives (`node_modules.zip` / `venv.zip`) → Validates pre-bundled Jadx/R2 tools → Installs Python `mcp` protocol libraries → Registers MCP servers in the agent client → Performs full environment self-checks. +> **What this does automatically**: Unpacks dependency archives → validates pre-bundled tools → installs Python `mcp` libraries → registers MCP servers → runs full self-check. -### 3. Multi-Agent Setup Guide +### 3. Multi-Agent Setup -| Agent Platform | Instruction File | MCP Configuration | Setup Procedure | +| Agent | Instruction File | MCP Config | How to Activate | |---|---|---|---| -| **Pi Agent** | `Tool/prompts/SYSTEM.md` | `~/.pi/agent/mcp.json` | Running `install.ps1` automatically writes user configs and registers skills | -| **Claude Code** | `CLAUDE.md` (Project root) | `.mcp.json` (Project root) | Run `claude` in the workspace root; native project-level config loads automatically | -| **DeepSeek Harness (DSH)** | `Tool/prompts/AGENTS.md` | `DSH-PROFILE.md` (Cordis YAML) | Copy generic instructions to workspace root and paste plugin config into DSH profile | -| **OpenCode / Codex** | `AGENTS.md` (Project root) | Client global config | Copy `Tool/prompts/AGENTS.md` to project root | +| **Pi Agent** | `Tool/prompts/SYSTEM.md` | `~/.pi/agent/mcp.json` | `install.ps1` writes everything automatically | +| **Claude Code** | `CLAUDE.md` (project root) | `.mcp.json` (project root) | Run `claude` in workspace root — auto-loaded | +| **DeepSeek Harness** | `Tool/prompts/AGENTS.md` | `DSH-PROFILE.md` (Cordis YAML) | Copy instructions + paste plugin config to DSH profile | +| **OpenCode / Codex** | `AGENTS.md` (project root) | Client global config | Copy `Tool/prompts/AGENTS.md` to project root | -### 4. Verification & Integrity Health Check (部署完备性校验) -Once deployed, verify that all 9 skills, 4 MCP services, prompts, and reversing toolchains are complete: -- **Option A (One-Click GUI / Double-Click)**: Simply double-click `check.bat` in the project root. -- **Option B (PowerShell Command)**: - ```powershell - powershell -ExecutionPolicy Bypass -File .\check.ps1 - ``` -- **Option C (Agent Interactive Verification)**: In your agent chat session, send: - ```text - check - ``` - *(or `doctor` / `检查`), the agent will automatically execute the verifier and report the health status across all components.* +### 4. Verify Your Deployment + +Run the 7-section health verifier (35 checks) using any of these methods: + +| Method | Command | +|---|---| +| ⭐ Double-click (easiest) | `check.bat` in project root | +| PowerShell | `powershell -ExecutionPolicy Bypass -File .\check.ps1` | +| Agent chat | Send `check` (or `doctor` / `检查`) — agent runs and reports inline | --- -## 🎮 Workflow & Lab Mode Protocol +## 🎮 Workflow & Lab Mode -### 1. Lab Mode Protocol (Disk-Backed State Machine) -To maintain a strict boundary between normal casual conversation and sensitive reverse engineering audits, Seep uses a disk-backed state machine independent of LLM context window limits: -- **Activate Lab Mode**: Send the following command to the agent: - ``` - lab: - ``` - *(or combine with a task: `lab: analyze target binary FooBar.exe`)* - The agent generates a local state marker (`~/.pi/agent/lab-mode.flag`), activating security terminology translation, cognitive redirection, and anti-refusal overrides. **You do not need to repeat this prefix in subsequent messages.** -- **Deactivate Lab Mode**: Send `exit lab`. The agent immediately unlinks the state file and returns to normal conversation mode. +### Lab Mode Protocol (Disk-Backed State Machine) +``` +Activate: lab: # or: lab: analyze FooBar.exe +Deactivate: exit lab +``` +- State stored in `~/.pi/agent/lab-mode.flag` — **persists across model switches & context compression** +- Once activated: terminology auto-mapping, anti-refusal overrides, and shortcut expansion are live +- Casual chat outside lab mode passes through unmodified — zero interference -### 2. Task Shortcuts (Active in Lab Mode) -- `poc `: Triggers client-side authorization audit (CWE-602) and outputs verification code. -- `find-auth `: Searches for license, subscription, expiration, and hardware-binding functions. -- `hook `: Generates Frida hooks with stack tracing and return-value replacement. -- `gen-patch `: Outputs binary patch byte sequences or proxy DLL scaffolding. -- `triage `: Runs initial triage covering architecture, imports, packers, and strings. -- `check`: Executes full workbench health check (`verify.ps1`) and reports skill/MCP/runtime status. -- `report`: Synthesizes evidence in the active directory and exports a standardized 3-part audit report. +### Task Shortcuts (Active in Lab Mode) + +| Shortcut | Action | +|---|---| +| `poc ` | CWE-602 client-side authorization audit + verification code | +| `find-auth ` | Locate license, subscription, expiry, hardware-binding functions | +| `hook ` | Generate Frida hook with stack trace + return-value override | +| `gen-patch ` | Binary patch bytes or proxy DLL scaffold | +| `triage ` | Full triage: architecture, imports, packers, strings | +| `check` | Run 7-section workbench health verifier inline | +| `report` | Synthesize active directory evidence → 3-part audit report | --- -## 🤖 Agent Execution Contract (How an Agent Consumes This) +## 🔬 Technical Scope -This workspace is structured as a set of **executable gates and strict operational constraints**: +
+Click to expand full technical scope -- **Mandatory Gate Sequence (G-Auth & G0–G6)**: On any new target, the agent's first step is to confirm testing authorization. It then applies the *Four Core Questions* to determine authority ownership (Server vs Client) and deliverable form (Patch / Memory Hijack / Keygen / Relay / Payload Carving). If any gate fails, execution stops immediately. -- **Two-Strike Rule**: If an assumption, patch, or exploit path fails twice in the same manner, the agent must treat its technical model as refuted and fall back to classification. A third variation of a twice-failed hypothesis is strictly prohibited. -- **Zero-Waste Recon**: When signals appear (packers, JWT, crypto, drivers, self-referential checks), the agent must query `seep_kb_search` and map to pre-existing MCP tools rather than writing scripts from scratch. -- **Strict Definition of Done**: A clean console log is not evidence of success. "Done" requires a complete evidence chain: Target hashes → RVA identification → PoC execution → Offline airplane-mode confirmation (proving zero server dependency) → 3-part structured delivery report. +### 1. Client-Side Authorization Audit (CWE-602) + +**Authority Attribution**: Airplane mode + loopback hijacking + timestamp offset testing to classify gates as server-authoritative vs. local-boolean within minutes. + +**Nine Industrial Paradigms** — all fully desensitized: + +| Project | Architecture | Key Technique | +|---|---|---| +| **A** | Monolithic offline PE | Scalar return override (`mov eax,1; ret`) | +| **B** | Multi-process hybrid | Proxy DLL name-based dispatch + 3-tier state persistence | +| **C** | Resource template + UI | Bijective bit-permutation decoding + IAT hook on `SetDlgItemTextW` | +| **D** | Compressed packer (MPRESS) | 18-point surgical patch + ACL trial-key locking | +| **E** | EXECryptor VM arbitration | 2-point Call redirection to memory stubs | +| **F** | .NET dynamic deobfuscation | Harmony memory dump + 96-bit combined hash keygen | +| **G** | Self-referential SHA-384 | 5-byte function-entry patch + watchdog persistence | +| **H** | Ed25519 pubkey replacement | In-place ciphertext replacement via derived keystream | +| **I** | Weak-modulus RSA | Sliding-window bypass + activation injection on export entry | + +### 2. Android & DEX/SO Analysis +- Surgical DEX same-length patching with automated Adler-32 / SHA-1 recalculation +- Packer classification: Java2C / native payload / extraction shell / private DEX-VMP +- Runtime anti-analysis: root detection bypass, SSL pinning circumvention, Frida-RPC bridging +- Repack pipeline: STORED `resources.arsc` + 4-byte Zipalign + v1+v2+v3 signing + +### 3. Binary / Native (PE / ELF / Mach-O) +- Headless Radare2: architecture ID, entropy scan, symbol recovery, C-like decompilation +- Full IDA Pro MCP integration: Hex-Rays decompilation, xrefs, struct recovery +- Anti-tamper defeat: deliberate crash stubs, raw `svc` syscall detection, kernel anti-debug + +### 4. CTF & Challenge Workflows +- Attack-network routing: Signal → `seep_kb_search` → template assembly → MCP execution +- Web: JWT, KID injection, SSRF chains, SSTI, deserialization gadget chains, Protobuf decoding +- Seed libraries (`seep_kb_payloads`) + emergency checklists (`seep_kb_checklist`) + +
+ +--- + +## 🤖 Agent Execution Contract + +- **G-Auth Gate**: Confirm testing authorization on every new target. No authorization = stop. +- **7-Gate Decision Tree (G0–G6)**: Classify authority ownership (Server vs. Client) before touching any code. +- **Two-Strike Rule**: Same-shaped failure twice → refute the technical model, fall back to classification. Third variation is strictly prohibited. +- **Zero-Waste Recon**: Signal detected → `seep_kb_search` → pre-existing tool → execute. Never write scripts from scratch without checking the KB first. +- **Definition of Done**: Target hash → RVA identification → PoC execution → offline airplane-mode confirmation → 3-part structured delivery. Console log alone is not evidence. --- ## 📝 Deliverable Specification -Client-side vulnerability assessments must be delivered using a consulting-grade three-part report structure: +All client-side vulnerability assessments follow a consulting-grade 3-part structure: -1. **Vulnerability Detail & Risk**: Exact instruction RVA / file offsets and call chain context. Root cause analysis mapping to CWE-602, OWASP MASVS, and business severity ratings. -2. **Reproduction & PoC**: 100% reproducible instructions, proxy DLL source code, or Frida scripts. Documented offline/airplane-mode verification evidence confirming that feature restrictions were bypassed locally without server verification. +1. **Vulnerability Detail & Risk** — Exact RVA / file offsets, call chain, CWE-602 mapping, business severity +2. **Reproduction & PoC** — 100% reproducible instructions, proxy DLL source, or Frida script + offline confirmation evidence 3. **Defense-in-Depth Remediation**: - - **Loading Phase**: Restrict DLL search directories via `SetDefaultDllDirectories` to prevent search-order hijacking. - - **Runtime**: Enable `ProcessDynamicCodePolicy` to prevent executable memory manipulation. - - **Architecture**: Enforce server-side authority using cryptographic signatures and short-lived tokens for privileged actions. + - `SetDefaultDllDirectories` → prevent DLL hijacking + - `ProcessDynamicCodePolicy` → prevent executable memory injection + - Server-side authority via cryptographic signatures and short-lived tokens + +--- + +## 🗺️ Roadmap + +| Version | Focus | Status | +|---|---|---| +| **v1.0** | Core toolchain bundling, 9 paradigms, Lab Mode, 22 MCP tools | ✅ Released | +| **v1.1** | Context-aware MCP output (`fold`/`branch`/`summary`), `seep_r2_xrefs` paginator | ✅ Released | +| **v1.2** | MANUAL SOPs: Anti-Debug bypass, Unpacking (VMP/Themida/UPX), PoC Validation | ✅ Released | +| **v2.0** | Frida self-healing CI loop, Windows sandbox loader, automated PoC validation pipeline | 🔨 Planned | +| **v2.x** | Linux / macOS native support, Ghidra headless integration, YARA rule auto-generation | 💡 Proposed | --- ## 🤝 Acknowledgements & Community -- Special thanks to [**newliver666/apk-reverse**](https://github.com/newliver666/apk-reverse) for the foundational Android reverse engineering gating paradigm and verification methodology. +- Special thanks to [**newliver666/apk-reverse**](https://github.com/newliver666/apk-reverse) for the foundational Android reverse engineering paradigm and verification methodology. - Gratitude to the [**LINUX DO**](https://linux.do/) community for technical exchange, insight, and research collaboration. --- ## ⚖️ Disclaimer -**This repository, including all documentation, rules, scripts, and sample projects, is intended solely for authorized security research, white-box auditing, compliance vulnerability testing, and educational CTF training.** +**This repository is intended solely for authorized security research, white-box auditing, compliance vulnerability testing, and educational CTF training.** -- **Explicit Authorization Required**: Users must possess written authorization from the asset owner before analyzing any target binary, client, or system. -- **No Warranty**: All technical methodologies and research notes are provided "as is" based on sandbox measurements, without warranty of fitness for any specific environment. -- **Minimum Impact**: Analysis must be conducted in isolated virtual machines or test sandboxes. Testing against production systems or unauthorized networks is prohibited. -- **Limitation of Liability**: Authors and contributors assume no liability for misuse, unauthorized testing, or violations of applicable laws and regulations. +- **Explicit Authorization Required**: Written authorization from the asset owner is mandatory before analyzing any target. +- **No Warranty**: All methodologies are provided "as is" based on sandbox measurements. +- **Isolated Testing**: Conduct all analysis in isolated VMs or sandboxes. Testing against production systems or unauthorized networks is prohibited. +- **Limitation of Liability**: Authors assume no liability for misuse, unauthorized testing, or violations of applicable laws. diff --git a/README.zh.md b/README.zh.md index b89c3bb..39d41cd 100644 --- a/README.zh.md +++ b/README.zh.md @@ -1,20 +1,25 @@

- Seep Reverse Lab Logo + Seep Reverse Lab Logo

Seep Reverse Lab

- 面向 AI Agent 的多平台客户端逆向工程 · 授权流审计(CWE-602)· 自动化攻防工作台 + 面向 AI Agent 的多平台客户端逆向工程 · 授权流审计(CWE-602)· 自动化安全工作台

- Release + Release License Platform Architecture - MCP Tools - LINUX DO +

+ +

+ MCP Tools + Knowledge Base + MANUAL SOPs + LINUX DO

@@ -22,14 +27,14 @@

- 项目定位 • - 核心能力 • - 目录架构 • - 核心范畴 • + 项目定位 • + 运转原理 • + 30 秒 Demo • MCP 工具 • - 快速开始 • + 快速开始 • + 技术范畴 • 消费规范 • - 致谢社区 • + 路线图 • 免责声明

@@ -41,249 +46,340 @@ --- -## 🌟 项目定位与解决痛点 +## 🌟 项目定位 -它把分散的逆向工具链(Radare2 / JADX / Apktool / Frida / IDA)、战术知识库、提示词与实战经验,深度组装为一套 **AI Agent 能直接消费并自主驱动的自动化工作台(Agent-Native Workbench)** —— 用户仅需输入自然语言大白话,智能体即可自发展开平台识别、漏洞类型判型、微创打桩与证据链闭环交付。 +把分散的逆向工具链(Radare2 / JADX / Apktool / Frida / IDA)、战术知识库、提示词工程与实战经验深度组装为一套 **AI Agent 能直接消费并自主驱动的自动化工作台** —— 用户仅需输入自然语言,智能体即可自发展开平台识别、漏洞判型、微创打桩与证据链闭环交付。 -### 核心解决的五大痛点: -- 🚀 **工具链高度碎片化**:传统逆向需要手动切换七八个离散工具,路径四散 —— 本工作台全量内置,通过标准化 MCP 统一调度。 -- 🧠 **大模型缺乏决断逻辑**:面对混淆二进制或未知 APK,模型容易陷入盲目逆向 —— `softseep` 总控协议自发展开平台(Win/Android/Linux/Web)与业务类型(9 大类)自动判型,零摩擦分发。 -- 🛡️ **云端模型误报防拒**:日常逆向与合规白盒审计易触发模型敏感词安全熔断 —— 内置底座级 `BLOCK_NONE` 注入、动态口语合规转译与推理级思维重定向三层保险。 -- 📚 **实战经验无法沉淀**:多数逆向任务沦为一次性消耗 —— 内置 9 种脱敏工业架构范式(项目 A ~ I)与 289 篇系统化战术实战笔记,确立“先查知识库再动手”纪律。 -- 📦 **环境部署摩擦高昂**:实习生或新机器配置繁琐 —— 提供全自动一键配置脚本,原生支持 **Pi Agent**、**Claude Code**、**DeepSeek Harness (DSH)** 及 **Codex / OpenCode**。 +### 核心解决的五大痛点 + +| 痛点 | 解决方案 | +|---|---| +| 🔧 **工具链高度碎片化** | 23 个 MCP 工具封装 Radare2/JADX/Apktool/Frida,统一调度,零手动切换 | +| 🧠 **大模型缺乏决断逻辑** | `softseep` 总控:两级自动判型(平台 × 9 类业务)+ 七道门决策树 | +| 🛡️ **云端模型频繁拒绝** | 三层保险:底座级 `BLOCK_NONE` 注入 + 动态口语合规转译 + 推理级思维重定向 | +| 📚 **实战经验无法沉淀** | 289 篇战术实战笔记 + 9 大脱敏工业范式 + "先查知识库再动手"强制纪律 | +| 📦 **环境部署摩擦高昂** | 一键 `install.ps1`,原生适配 Pi Agent / Claude Code / DeepSeek Harness / Codex | --- -## ⚡ 本工作台的核心能力 (What it is good at) +## ⚙️ 运转原理 -- 🎯 **自然语言穿透与两级自动判型**:使用者无需记忆特定选单或参数,下达“分析这个程序特权验证”、“定位本地卡密校验”、“去广告”等日常指令,总控协议自主结合文件特征(魔数与导入表)与语义动词,瞬时收敛攻击路径。 -- 🔍 **客户端鉴权脆弱性走查(CWE-602)**:在几分钟内定性受限特权是由本地布尔/时间戳驱动,还是由服务端强验签与远程资产下发决定。严密规避“强改本地标志位导致客户端向服务端索要数据失败从而发生白屏或静默崩溃”的经典伪 VIP 陷阱。 -- 🛡️ **Authenticode 数字签名完备性保全**:对于具备官方签名的 Windows 核心进程,杜绝落地修改 EXE 文件,统一通过 DLL 搜索顺序劫持(代理 `version.dll`、`sentry.dll`)在内存加载期实施微创打桩,保全宿主二进制的合法数字签名。 -- 💎 **九大工业级架构范式全覆盖**:覆盖从单进程纯离线内存打桩、多进程架构分流过滤、资源模板与 IAT Hook 显示层伪造、压缩壳处理与 ACL 注册表冻结,到 VM 集中判定重定向、.NET 算法还原离线 Keygen、自引用哈希破局、Ed25519 公钥密文替换及弱模 RSA 验签入口旁路。 -- 🔌 **全量离线预置与零外网依赖**:底层工具集(Radare2、JADX、Apktool、Playwright 自动化引擎、IDA 桥接适配层等)均物理打包内置,解压即用,在完全隔离沙箱中稳定执行。 +``` +用户输入一句大白话("帮我分析 FooBar.apk 的会员验证") + │ + ▼ +┌──────────────────────────────────────────────────────────────────┐ +│ Lab Mode 状态机 (磁盘标志文件 ~/.pi/agent/lab-mode.flag) │ +│ • 口语 → 合规术语自动转译("破解" → CWE-602 旁路验证) │ +│ • BLOCK_NONE 注入 + 推理级防拒绝认知重定向 │ +│ • 状态持久化:切换模型/压缩上下文后依然生效 │ +└──────────────────────────┬───────────────────────────────────────┘ + │ + ▼ +┌──────────────────────────────────────────────────────────────────┐ +│ softseep 总控调度器 │ +│ ① 平台判型 → Windows PE / Android APK / Linux ELF / Web │ +│ ② 业务判型 → 9 大范式 × 七道门(G0–G6 决策树) │ +│ ③ 路由分发 → apkseep / ida-reverse / seep MCP / 知识库 │ +└─────────┬────────────────┬──────────────────┬─────────────────────┘ + │ │ │ + ▼ ▼ ▼ + seep MCP IDA Pro MCP 知识库检索 + 23 个工具 (可选联动) 289 篇战术笔记 + (R2/JADX/ (Zero-Waste Recon) + Apktool/Frida) + │ + ▼ +┌──────────────────────────────────────────────────────────────────┐ +│ 上下文预算控制 Context Budget Control(v1.1 降噪) │ +│ • seep_r2_decompile: full / fold(省 60% Token)/ summary(省 90%)│ +│ • seep_r2_disasm: full / branch(仅控制流骨架) │ +│ • seep_r2_xrefs: 分页返回,默认 limit=10,附总数统计摘要 │ +└──────────────────────────┬───────────────────────────────────────┘ + │ + ▼ + PoC 生成 → 沙箱执行 → Frida 报错自愈循环(最多 3 次) + │ + ▼ + 断网铁证确认(CWE-602 唯一可信证据) + │ + ▼ + 三段式咨询级安全报告 ✓ +``` --- -## 📋 目录架构体系 (Structure) +## ⚡ 30 秒感受一下 -本工作台遵循严密的渐进式披露(Progressive Disclosure)与分层管理规范: +部署完成后,直接在 Agent 对话框发一句大白话: + +``` +lab:分析 FooBar.apk,找到会员验证并绕过 +``` + +Agent 自主完成: + +1. **`seep_auto_triage`** → 识别 DEX + ARM64 SO,未检测到壳 +2. **`seep_apk_decompile`** with `output_mode=fold` → 仅提取控制流骨架 *(省约 60% Token)* +3. **`seep_kb_search`** → 命中知识库战术笔记 #142,CWE-602 匹配模式 +4. **`seep_apk_gen_hook`** → 自动生成 `hook_verify.js` Frida 探针脚本 +5. 注入测试机 → 捕获 stdout → **自愈** `ClassNotFoundException` → 自动修正类路径重跑 +6. 飞行模式断网确认 ✓ → **`seep_gen_security_report`** → 三段式审计报告交付 + +> 典型客户端应用全程耗时:**8–20 分钟,完全无人值守**。 + +--- + +## ⚡ 核心能力 + +- 🎯 **自然语言穿透与两级自动判型**:无需记忆命令或参数,大白话直接驱动,文件魔数 + 语义动词自动收敛攻击路径 +- 🔍 **客户端鉴权脆弱性走查(CWE-602)**:分钟级判定受限功能是本地布尔还是服务端权威,规避"伪 VIP 白屏"经典陷阱 +- 🛡️ **Authenticode 数字签名保全**:对具备数字签名的 Windows PE,通过代理 DLL(`version.dll`)劫持在内存打桩,宿主签名完好 +- 🔄 **PoC 自愈循环**:Frida 报错 → 根因映射 → 自动修正代码 → 重跑(最多 3 次,超限后结构化移交人工) +- 💎 **9 大工业级脱敏范式**:单进程离线 → 多进程 IPC → VM 集中判定 → .NET 算号 → 弱模 RSA 旁路,全覆盖 +- 🔌 **离线预置全量内置**:所有工具链物理打包(251 MB),部署后零外网依赖 + +--- + +## 📋 目录架构体系 + +
+📁 完整目录树(点击展开) ``` Seep\ (251 MB) -├── README.md ← 全局架构与工作台标准规范说明(本文件) -├── CLAUDE.md ← 面向 Claude Code 的项目级原生指令 -├── .mcp.json ← 项目级标准 MCP 注册配置文件(供 Claude Code / OpenCode 读取) -├── DSH-PROFILE.md ← 面向 DeepSeek Harness 的 Cordis 插件配置模板 +├── README.md ← 全局说明(英文默认) +├── README.zh.md ← 本文件(中文文档) +├── CLAUDE.md ← Claude Code 项目级原生指令 +├── .mcp.json ← 项目级 MCP 注册文件(Claude Code / OpenCode) +├── DSH-PROFILE.md ← DeepSeek Harness Cordis 插件配置模板 +├── check.bat ← ⭐ 双击一键体检入口(Windows) +├── check.ps1 ← PowerShell 体检入口 │ -├── Tool\ ← 工作台核心资产仓 -│ ├── skill\ ← 9 大逆向与白盒审计专业 Skill -│ │ ├── softseep\ ← ⭐ 核心总控 Skill(主控路由 + 8 大专题按需加载库) -│ │ ├── apkseep\ ← Android 移动端一体化逆向全链路专精 Skill(115 个工程文件) -│ │ ├── ida-reverse\ ← IDA Pro 自动化唤醒、无头探测与 MCP 深度分析协同 -│ │ ├── client-license-validation-bypass\ ← 跨运行时通用许可/卡密校验战术手册 -│ │ └── safe-skills\ ← 5 组独立战术包(通用逆向 / APK 差分 / Radare2 / JS 逆向 / IDA 辅助) +├── Tool\ +│ ├── skill\ ← 9 大逆向专业技能 +│ │ ├── softseep\ ← ⭐ 总控调度器(路由 + 8 专题按需库) +│ │ ├── apkseep\ ← Android 全链路逆向(115 个工程文件) +│ │ ├── ida-reverse\ ← IDA Pro 自动化联动 +│ │ ├── client-license-validation-bypass\ ← 跨运行时卡密/授权攻防手册 +│ │ └── safe-skills\ ← 5 个独立战术工具包 │ │ -│ ├── mcp\ ← 自动化工具服务层(MCP Engine) -│ │ ├── seep_mcp_server.py ← seep 核心自研 MCP 服务端(承载 22 个底层分析与知识库工具) -│ │ ├── mcp.json.template ← 全局 MCP 挂载配置标准模板 -│ │ └── Tool\ ← ⚠️ MCP 内部强约束底层工具运行时(严格保持相对路径) -│ │ ├── safe\ ← 已物理内置的跨平台逆向工具箱(JADX、Radare2、Apktool、Hook 引擎等) -│ │ │ ├── jadx\ ← 75 MB(v1.5.6 纯净优化版) -│ │ │ ├── radare2\ ← 39 MB(v6.2.2 全套二进制套件) -│ │ │ ├── apktool\ ← 24 MB(v3.0.3 原生环境) -│ │ │ ├── hook-mcp\ ← 331 KB(Frida/LSPosed 动态注入模板) -│ │ │ ├── ida-pro-mcp\ ← 28 MB(IDA 桥接适配依赖) -│ │ │ ├── js-reverse-mcp\← 61 MB(Web/JS 动态调试核心) -│ │ │ └── playwright-mcp\← 8.8 MB(无头浏览器控制台) -│ │ └── reverselab\ ← 攻防知识库核心(687 个架构文件,含 289 篇系统化战术实战笔记) +│ ├── mcp\ ← MCP 服务引擎 +│ │ ├── seep_mcp_server.py ← 核心服务端,23 个底层分析工具 +│ │ └── Tool\ ← ⚠️ 硬编码相对路径,禁止重命名/搬移 +│ │ ├── safe\ ← 物理内置工具箱 +│ │ │ ├── jadx\ ← 75 MB(v1.5.6) +│ │ │ ├── radare2\ ← 39 MB(v6.2.2 全套) +│ │ │ ├── apktool\ ← 24 MB(v3.0.3) +│ │ │ ├── hook-mcp\ ← Frida / LSPosed 动态注入模板 +│ │ │ ├── ida-pro-mcp\ ← IDA 桥接适配层 +│ │ │ ├── js-reverse-mcp\← Web / JS 调试引擎 +│ │ │ └── playwright-mcp\← 无头浏览器自动化 +│ │ └── reverselab\ ← 289 篇战术笔记 + 攻击链模板 │ │ -│ ├── prompts\ ← 智能体协同规范与扩展注入层 -│ │ ├── SYSTEM.md ← Pi Agent 专用系统指令(包含 Lab 状态机、反退缩规则、SOP 约束) -│ │ ├── AGENTS.md ← 跨 Agent(Codex、OpenCode 等)无状态通用指令规范 -│ │ └── extensions\ ← 运行时底层拦截器(安全解封注入与口令自动转译) +│ ├── prompts\ ← 智能体协同规范与运行时扩展 +│ │ ├── SYSTEM.md ← Pi Agent 系统指令 +│ │ ├── AGENTS.md ← 跨 Agent 通用指令规范 +│ │ └── extensions\ ← BLOCK_NONE 注入 + 口语合规转译 │ │ -│ ├── cases\ ← 9 大经典实战脱敏架构工程库(项目 A ~ 项目 I) -│ │ ├── 项目A\ (单进程离线) ├── 项目B\ (多进程协同) ├── 项目C\ (资源模板与显示层伪造) -│ │ ├── 项目D\ (壳保护多策略) ├── 项目E\ (VM 保护在线核验)├── 项目F\ (.NET 混淆可逆算法算号) -│ │ ├── 项目G\ (自引用校验补丁) ├── 项目H\ (公钥密文替换) ├── 项目I\ (弱模 RSA 验签入口补丁) -│ │ -│ ├── upstream\ ← 上游溯源验证层(apk-reverse 开源验证集与离线回归测试套件) -│ ├── docs\ ← 运维与工程标准文档库(MCP 验证、下载溯源、资产依赖总清单) -│ └── scripts\ ← 工作空间管理与自动化辅助脚本集(建档、签名、IDA 启动挂载等) +│ ├── cases\ ← 9 大脱敏工业案例库(项目 A ~ I) +│ ├── upstream\ ← apk-reverse 上游开源验证集(MIT) +│ ├── docs\ ← 工程参考文档 +│ └── scripts\ ← 工作流自动化脚本 │ -├── setup\ ← 自动化安装、依赖配置与环境健康自检脚本集 -└── MANUAL\ ← 基础设施依赖与商业环境自备说明(Python、Node、IDA Pro 授权等) +├── setup\ ← 安装、修复与自检脚本集 +└── MANUAL\ ← 5 份战术专项 SOP 手册 + ├── PREREQUISITES.md ← 环境预要求指南 + ├── IDA-PRO.md ← IDA Pro 商业软件接入指南 + ├── ANTI-DEBUG.md ← 反调试绕过字典与代理 DLL 框架 + ├── UNPACKING.md ← UPX/MPRESS/Themida/VMP 脱壳 SOP + └── POC-VALIDATION.md ← Frida 自愈循环与 PoC 沙箱验证 ``` ---- - -## 🔬 核心技术范畴 (Scope) - -本工作台将常见的商业软件防御、虚拟机加固与授权体系抽象归纳为四大纵深战术域: - -### 1. CTF 攻防竞赛与 Web/二进制靶标分析 (CTF & Challenge Workflows) -- **实战攻防网络路由(Attack-Network Routing)**:基于内置 `reverselab` 体系,以“信号检测 → 战术检索(`seep_kb_search`)→ 现成 PoC/模板装配 → MCP 工具执行”的确定性链条驱动。 -- **Web 靶标与复杂协议研判**:覆盖 JWT 弱签及 KID 注入、SSRF 链路穿透、SSTI 模板注入、原型链污染、反序列化 Gadget Chain 匹配及无 Schema 约束的 Protobuf 逆向解析。 -- **竞赛自动化提效支撑**:提供标准化的漏洞测试种子库(`seep_kb_payloads`)与应急排查清单(`seep_kb_checklist`),杜绝临场手写脆弱性探测脚本。 - -### 2. 客户端决策与授权体系审计(CWE-602) -- **权威归属定性模型**:通过断网隔离、回环重定向(`netsh` 回环抢占)、时间戳伪造等动态手段,快速判定受限功能是由本地布尔值驱动还是由服务端强校验闭环。 -- **九大典型架构范式闭环**: - - **项目 A 型(单进程单点布尔)**:标量函数出口修正(如 `mov eax, 1; ret`)。 - - **项目 B 型(多进程复杂拓扑)**:前台渲染层、守护服务与虚拟机 IPC 通信的跨进程分流过滤与三层状态护航。 - - **项目 C 型(资源模板与显示层重构)**:双射掩码混淆解析;针对自研皮肤引擎下沉至 `SetDlgItemTextW` 的 IAT Hook 显示层文案伪造。 - - **项目 D 型(压缩壳与混合激活)**:MPRESS 壳分析、18 点微创二进制修补、签名数据目录截断剥离与 Windows ACL 注册表试用期冻结。 - - **项目 E 型(代码虚拟化与集中裁决)**:面对不可直接还原的 EXECryptor VM 验签过程,利用判定函数高复用特征,实施 2 点 Call 指令重定向至内存 Stub。 - - **项目 F 型(托管混淆与纯算号路径)**:针对 .NET 动态方法体剥离实施 Harmony 内存转储,还原 96 位组合哈希算法,构造离线合规 Keygen。 - - **项目 G 型(自引用校验处理)**:识别载荷对自身 SHA-384 哈希校验的死结特征,转向入口点 5 字节微创修补并部署登录项守护。 - - **项目 H 型(非对称公钥密文替换)**:利用 Ed25519 内嵌公钥密文流的单向推导漏洞,在二进制内部以相同密码流重写自持公钥,签发自定义载荷。 - - **项目 I 型(高阶数字签名入口旁路)**:分析 CNG 结构与弱模数 RSA 滑动窗口特征,直接对导出接口施加激活态注入。 - -### 3. Android 移动安全与全链路逆向 (Android & DEX/SO Deep Analysis) -- **DEX 层微创手术与字节级修补**:提供等长字节修补机制(规避重排校验与方法膨胀)、Dex 头部校验和/SHA-1 签名逆向重算规则,对抗 R8 深度优化代码混淆。 -- **加壳防护与抽取壳深度辨析**:建立 Java2C(编译下沉至 SO)、原生落地壳、抽取壳(Trivial-body ratio 判定)与私有 Dex-VMP 差分分析的明确诊断树,杜绝盲目倾倒空壳 DEX。 -- **运行时环境自检与对抗绕过**:涵盖设备 Root 检测规避、多层 SSL Pinning 证书绑定剥离、基于 Frida 的 Native 动态插桩与基于 Frida-RPC 的跨进程服务化调用。 -- **构建与签名工程完备性**:封装自动化重打包流水线,原生处理 `resources.arsc` 的 STORED 状态与 4 字节边界对齐(Zipalign),实施 v1+v2+v3 完整数字证书重签名。 - -### 4. 二进制反编译、动态分析与 Native 逆向 (PE/ELF/Mach-O Native RE) -- **多平台底层静态解剖**:基于内置 Radare2 执行无头模式的架构探测、节区熵分析、符号提取、反汇编与类 C 伪代码生成;挂载 IDA Pro MCP 服务,全自动反编译函数、重命名局部符号、恢复复杂结构体与交叉引用追踪。 -- **底层防御机制识别与规避**:深入研判进程自杀式故意崩溃(如特意触发 `fault addr 0x4` 等空指针陷阱以伪装缺陷)、线程守卫注入、系统调用(Raw `svc`)直接调用以及内核级驱动对抗,给出“以返回正常状态代替强制挂起死循环”的防进程锁死规范。 +
--- -## 🛠️ MCP 工具矩阵 (Tools & MCP Matrix) +## 🛠️ MCP 工具矩阵 -工作台底层挂载的自研 `seep` MCP 服务直接暴露出 **22 项** 专用分析工具,由智能体在分析过程中依据战术需要自主调用: +自研 `seep` MCP 服务暴露 **23 个原生工具**,分五大功能组: -| 分类 | 工具标识 | 核心功能 | -|---|---|---| -| **状态检测** | `seep_status` | 快速核对底层 Radare2、JADX、Apktool 及知识库的就绪状态 | -| | `seep_ida_status` | 探测 IDA Pro 远程 MCP 服务的连通性 | -| **二进制分析 (R2)** | `seep_r2_info` | 读取目标文件架构、位宽、大小端以及安全缓解机制(DEP/ASLR/Canary/PIE) | -| | `seep_r2_strings` | 提取可读字符串并支持基于关键词的正则过滤 | -| | `seep_r2_functions` | 枚举二进制内部函数拓扑、导入导出表及入口点 | -| | `seep_r2_disasm` | 输出指定函数或虚拟地址的高精度反汇编文本与交叉引用标记 | -| | `seep_r2_decompile` | 调用反编译引擎直接输出类 C 伪代码 | -| | `seep_r2_diff` | 对两个二进制样本实施代码级或十六进制差异比对 | -| | `seep_r2_asm` | 汇编单条指令为机器码或将 Hex 反解析为汇编语法 | -| | `seep_r2_cmd` | 执行底层 radare2 管道命令 | -| **Android 逆向** | `seep_apk_info` | 免安装快速解析 APK 的清单文件、组件声明、签名与架构 | -| | `seep_apk_decompile` | 调度内置 JADX 引擎输出反混淆后的 Java 源码工程 | -| | `seep_apk_unpack` | 调度 Apktool 解析明文资源与 Smali 汇编树 | -| | `seep_apk_smali_search`| 在 Smali 代码树中极速搜索密钥、API 路由或安全门禁位点 | -| | `seep_apk_gen_hook` | 根据类与方法签名自动生成开箱即用的 Frida 运行时拦截脚本 | -| **知识库检索** | `seep_kb_search` | 在 289 篇战术实战笔记中进行全文检索,输出最佳匹配的攻击面与代码片段 | -| | `seep_kb_read` | 精确读取特定技术主题手册全文 | -| | `seep_kb_checklist` | 输出专项安全排查核对清单与战术矩阵 | -| | `seep_kb_payloads` | 提取针对特定常见漏洞与认证协议的高危安全测试载荷模板 | -| **流水线编排** | `seep_task_init` | 在隔离工作区内一键初始化标准化白盒审计沙盒任务档案 | -| | `seep_auto_triage` | 对未知二进制样本执行全量快速体检 | -| | `seep_gen_security_report`| 自动归纳当前任务目录的逆向成果并输出三段式合规交付报告 | +| 分类 | 工具 | 核心功能 | 上下文控制 | +|---|---|---|---| +| **状态检测** | `seep_status` | Radare2 / JADX / Apktool / KB 就绪检测 | — | +| | `seep_ida_status` | IDA Pro MCP 服务连通性探测 | — | +| **二进制分析** | `seep_r2_info` | 架构 / 位宽 / DEP / ASLR / Canary / PIE | — | +| | `seep_r2_strings` | 字符串提取 + 正则过滤 | `limit=` | +| | `seep_r2_functions` | 函数枚举 / 导入导出 / 入口点 | `limit=` | +| | `seep_r2_disasm` | 反汇编 + 交叉引用标注 | `full` / `branch` | +| | `seep_r2_decompile` | 类 C 伪代码(pdc 引擎) | `full` / `fold` / `summary` | +| | `seep_r2_xrefs` | 交叉引用图,分页返回 | `limit=10` 默认 | +| | `seep_r2_diff` | 两份二进制代码 / Hex 差分 | — | +| | `seep_r2_asm` | 汇编 ↔ 机器码互转 | — | +| | `seep_r2_cmd` | 底层 Radare2 管道命令 | — | +| **Android 逆向** | `seep_apk_info` | APK 清单 / 权限 / 签名(免 Java)| — | +| | `seep_apk_decompile` | JADX 全量 Java 源码反编译 | — | +| | `seep_apk_unpack` | Apktool 资源 + Smali 解包 | — | +| | `seep_apk_smali_search` | Smali 关键词/密钥/门禁位点检索 | `limit=` | +| | `seep_apk_gen_hook` | 自动生成带堆栈打印的 Frida 探针 | — | +| **知识库** | `seep_kb_search` | 289 篇战术笔记全文检索 | `limit=` | +| | `seep_kb_read` | 按主题精确读取完整技术手册 | — | +| | `seep_kb_checklist` | 应急排查清单与攻击矩阵 | — | +| | `seep_kb_payloads` | JWT / SSRF / SSTI / SQLi 载荷模板 | — | +| **流水线编排** | `seep_task_init` | 初始化隔离审计沙盒目录 | — | +| | `seep_auto_triage` | 未知样本全量自动体检 | — | +| | `seep_gen_security_report` | 三段式合规安全报告生成 | — | + +> 💡 **上下文预算控制(v1.1)**:`seep_r2_decompile` 使用 `output_mode=fold` 可减少约 60% Token 消耗;`summary` 模式减少约 90%。使用 `seep_r2_xrefs` 替代原始 `axt` 命令,避免数百条引用直接灌满上下文窗口。 --- -## 🚀 快速开始与部署规范 (Quick Start & Deployment) +## 🚀 快速开始与部署 -### 1. 运行依赖要求 (Prerequisites) -- **操作系统**:Windows 10 / 11 x64(推荐主环境)或兼容 Linux / macOS。 -- **核心运行时**:Python 3.11+、Node.js 18+、Git。 +### 1. 运行依赖 +- **操作系统**:Windows 10 / 11 x64(推荐),兼容 Linux / macOS +- **核心运行时**:Python 3.11+、Node.js 18+、Git -### 2. 一键自动化部署 (One-Click Setup) -在终端中进入项目根目录下的 `setup/` 目录执行一键初始化脚本: +### 2. 一键部署 +在 PowerShell 中进入项目根目录执行: ```powershell cd setup powershell -ExecutionPolicy Bypass -File .\install.ps1 ``` -> **该脚本全自动执行**:解压内置压缩依赖(`node_modules.zip` / `venv.zip`)→ 校验内置 Jadx/R2 工具完整性 → 安装 Python `mcp` 协议依赖 → 注册 MCP 服务至智能体客户端 → 执行环境健康自检。 +> **脚本自动完成**:解压内置依赖包 → 校验工具完整性 → 安装 Python mcp 库 → 注册 MCP 服务 → 执行全量自检。 -### 3. 多智能体环境接入方式 +### 3. 多 Agent 接入方式 -| 智能体平台 | 核心指令来源 | MCP 服务挂载点 | 接入说明 | +| 智能体平台 | 指令文件 | MCP 配置 | 接入方式 | |---|---|---|---| -| **Pi Agent** | `Tool/prompts/SYSTEM.md` | `~/.pi/agent/mcp.json` | 运行 `install.ps1` 自动完成用户级配置写入与技能注册 | -| **Claude Code** | 项目根 `CLAUDE.md` | 项目根 `.mcp.json` | 在工作台根目录直接执行 `claude` 命令,自动读取项目级上下文 | -| **DeepSeek Harness (DSH)** | `Tool/prompts/AGENTS.md` | `DSH-PROFILE.md` (Cordis YAML) | 将通用指令部署至工作目录,将 MCP 插件配置写入 DSH Profile | -| **OpenCode / Codex** | 项目根 `AGENTS.md` | 客户端全局配置 | 复制 `AGENTS.md` 至当前项目工作根目录即可 | +| **Pi Agent** | `Tool/prompts/SYSTEM.md` | `~/.pi/agent/mcp.json` | `install.ps1` 自动完成全部配置写入 | +| **Claude Code** | 项目根 `CLAUDE.md` | 项目根 `.mcp.json` | 在工作台根目录执行 `claude`,自动读取 | +| **DeepSeek Harness** | `Tool/prompts/AGENTS.md` | `DSH-PROFILE.md` (Cordis YAML) | 指令部署至工作目录 + MCP 插件写入 DSH Profile | +| **OpenCode / Codex** | 项目根 `AGENTS.md` | 客户端全局配置 | 复制 `AGENTS.md` 至项目工作根目录 | -### 4. 部署完备性校验与健康体检 (Verification & Health Check) -部署完成后,可以通过以下三种极其简单的方式一键校验所有 9 个 Skill、4 个 MCP 服务、提示词及工具箱是否已完整就绪: -- **方式一(双击一键体检 · 最推荐)**:直接双击项目根目录下的 **`check.bat`**,控制台将自动逐项校验并生成全彩打勾体检报告(窗口不会自动关闭,方便查看)。 -- **方式二(PowerShell 命令行)**: - ```powershell - powershell -ExecutionPolicy Bypass -File .\check.ps1 - ``` -- **方式三(Agent 对话框内校验)**:在任意已接入的 Agent(Pi / Claude / DSH / Codex)对话中直接发送: - ```text - check - ``` - *(或输入 `检查` / `doctor`)*,Agent 将自动调用后端体检脚本并以结构化卡片输出当前工作台健康度。 +### 4. 部署完备性校验(7 大维度 · 35 项检查) + +| 方式 | 操作 | +|---|---| +| ⭐ 双击一键(最简单)| 双击项目根目录下的 `check.bat` | +| PowerShell | `powershell -ExecutionPolicy Bypass -File .\check.ps1` | +| Agent 对话框 | 发送 `check`(或 `检查` / `doctor`)— Agent 自动运行并内联输出报告 | --- -## 🎮 操作工作流与交互规范 (Workflow & Lab Mode) +## 🎮 操作工作流与 Lab Mode -### 1. 实验工作环境打卡 (Lab Mode Protocol) -为了在日常自由对话与严格的逆向白盒测试之间建立清晰边界,工作台设计了不依赖模型长文本记忆的磁盘状态切换机制: -- **进入测试工作环境**:向智能体发送: - ``` - lab: - ``` - *(或一步到位:`lab:分析目标样本 X.exe`)* - 智能体将在本地磁盘生成状态标记文件,随后全量启用逆向技术映射、思维重定向与防拒绝策略。在后续工作中,**无需重复携带任何前缀**。 -- **退出测试工作环境**:发送 `退出实验`,智能体即刻卸载状态标记,恢复日常常规对话。 +### Lab Mode 协议(磁盘状态机) +``` +激活: lab: # 或:lab:分析 FooBar.exe +退出: 退出实验 +``` +- 状态存于磁盘 `~/.pi/agent/lab-mode.flag` — **切换模型/上下文压缩后依然持久** +- 激活后:口语自动合规转译、防拒绝覆盖、快捷口令展开全部生效 +- 日常闲聊在 Lab Mode 外原样透传,零干扰 -### 2. 常用任务口令 (Task Shortcuts) -在实验环境开启状态下,可直接通过标准化前置口令触发全套审计流水线: -- `poc <目标>`:快速展开客户端特权决策脆弱性(CWE-602)排查并生成验证代码。 -- `find-auth <目标>`:全局检索本地授权、许可证、到期时间、机器码相关函数与判定分支。 -- `hook <函数/方法>`:针对指定符号自动生成带堆栈打印与返回值拦截的 Frida 验证脚本。 -- `gen-patch <位点>`:输出指定 RVA 或文件偏移的二进制内存补丁代码或代理 DLL 框架。 -- `triage <样本>`:执行包括架构、导入表、加壳形态与关键字符串在内的快速体检。 -- `check`:执行工作台部署完备性自检(`verify.ps1`),分类汇报 Skill/MCP/工具链健康状态。 -- `report`:一键扫描当前分析目录留存的全部技术证据,自动导出符合行业交付规格的三段式安全审计报告。 +### 任务快捷口令(Lab Mode 激活时有效) + +| 口令 | 触发动作 | +|---|---| +| `poc <目标>` | CWE-602 客户端鉴权脆弱性排查 + 验证代码生成 | +| `find-auth <目标>` | 定位授权/许可证/到期时间/机器码相关函数与分支 | +| `hook <函数/方法>` | 生成带堆栈打印与返回值拦截的 Frida 脚本 | +| `gen-patch <位点>` | 输出二进制补丁字节序列或代理 DLL 脚手架 | +| `triage <样本>` | 全量体检:架构/导入表/壳/关键字符串 | +| `check` | 执行工作台 7 维度自检,内联输出健康报告 | +| `report` | 归纳当前目录证据 → 导出三段式审计报告 | --- -## 🤖 智能体消费规范 (How an agent is expected to consume this) +## 🔬 核心技术范畴 -本仓库的指令集与核心入口文件并非供人类漫读的参考文档,而是针对大模型“容易陷入幻觉、偏离授权目标或在长推理链条中发生退缩”这一常见缺陷设计的**程序化执行门禁(Procedures with Gates)**。 +
+点击展开完整技术范畴 -- **强制门禁(G-Auth & G0–G6)**:任何任务开展前,第一行为永远是判定目标是否属于受权白盒测试资产;随后通过“四问”确定鉴权权威(服务端 vs 客户端本地)与交付形态(补丁 / 内存劫持 / 算号 / 协议中继 / 载荷提取)。任何一步通不过则立即终止或重定向,严禁凭第一性原理盲目逆向。 -- **两击失败熔断纪律(Two-Strike Rule)**:同一假设、同一种内存补丁或逆向利用路径若连续失败两次,立即视为当前技术模型错误,强制回退至上一级判型,严禁进行第三次同构盲试。 -- **先查知识库再动手(Zero-Waste Recon)**:发现特征信号(如特定加壳混淆、JWT、加密通信、驱动对抗、自引用校验)时,禁止从零手写分析脚本,必须优先通过 `seep_kb_search` 索引成熟战术库并直接映射 MCP 工具调用。 -- **完工严格定义(Definition of Done)**:仅有控制台日志无错误绝不等于任务完成。“完成”必须满足端到端证据链闭环:从原始目标指纹、判定点 RVA 逆向还原、补丁或验证 PoC 实施、断网离线实测(确证无云端依赖)到结构化三段式报告交付,缺一不可。 +### 1. 客户端授权流审计(CWE-602) + +**权威归属定性**:断网 + 回环劫持 + 时间戳伪造,分钟级判定本地布尔 vs 服务端权威。 + +**九大工业级脱敏范式**: + +| 项目 | 架构类型 | 核心技法 | +|---|---|---| +| **A** | 单进程纯离线 PE | 标量返回值强制(`mov eax,1; ret`)| +| **B** | 多进程复杂拓扑 | 代理 DLL 分流 + 三层状态持久化 | +| **C** | 资源模板 + UI 层 | 双射掩码解码 + `SetDlgItemTextW` IAT Hook | +| **D** | MPRESS 压缩壳 | 18 点微创修补 + ACL 注册表冻结 | +| **E** | EXECryptor VM 仲裁 | 2 点 Call 指令重定向至内存 Stub | +| **F** | .NET 动态混淆 | Harmony 内存转储 + 96 位组合哈希算号 | +| **G** | 自引用 SHA-384 | 5 字节函数入口补丁 + 启动项守护 | +| **H** | Ed25519 公钥替换 | 密码流推导内置公钥密文替换 | +| **I** | 弱模 RSA 验签 | CNG 分析 + 滑动窗口旁路 + 导出接口注入 | + +### 2. Android 移动安全与 DEX/SO 逆向 +- 等长字节 DEX 微创修补,自动重算 Adler-32 / SHA-1 +- 加壳分类:Java2C / 原生落地壳 / 抽取壳 / 私有 DEX-VMP +- Root 检测规避、多层 SSL Pinning 剥离、Frida-RPC 跨进程桥接 +- 自动化重打包:STORED 资源 + 4 字节 Zipalign + v1+v2+v3 签名 + +### 3. 二进制 / Native 逆向(PE / ELF / Mach-O) +- Radare2 无头模式:架构识别、熵扫描、符号提取、类 C 伪代码 +- IDA Pro MCP 全链路:Hex-Rays 反编译、交叉引用、结构体恢复 +- 反调试对抗:故意崩溃 Stub、`svc` 直接系统调用、内核级驱动检测(参见 `MANUAL/ANTI-DEBUG.md`) + +### 4. CTF 竞赛与 Web 目标分析 +- 攻击网路由:信号 → `seep_kb_search` → 模板装配 → MCP 工具执行 +- JWT 弱签 / KID 注入 / SSRF / SSTI / Protobuf 逆向 / 反序列化 Gadget Chain +- 漏洞载荷种子库(`seep_kb_payloads`)+ 应急清单(`seep_kb_checklist`) + +
--- -## 📝 交付与报告标准 (Deliverable Specification) +## 🤖 智能体消费规范 -任何针对客户端脆弱性的研判与审计,最终产物统一固化为咨询级安全报告架构,杜绝模糊推测: - -1. **脆弱性原理与业务危害 (Vulnerability Detail & Risk)**: - - 准确定位问题指令所处的 RVA / 文件偏移与调用链上下文。 - - 深入阐述客户端判定与业务剥离的根因,明确关联 CWE-602 等行业安全分类与威胁等级。 -2. **复现路径与可验证工程 (Reproduction & PoC)**: - - 提供 100% 可在本地沙盒复算的指令证据、代理 DLL 源代码工程或 Frida 动态注入脚本。 - - 提供严格的断网测试验证结论(证明相关特权或决策分支脱离服务端验证依然能够在离线状态下强行生效)。 -3. **纵深防御修复方案 (Defense-in-Depth Remediation)**: - - **加载期**:收敛动态链接库搜索路径(`SetDefaultDllDirectories`)杜绝环境劫持。 - - **运行期**:启用进程级动态代码策略(`ProcessDynamicCodePolicy`)封锁非法内存属性改写。 - - **逻辑层**:确立“服务端权威”原则,关键受限资源以服务端动态签名与短期令牌为唯一授权凭据。 +- **G-Auth 授权门**:每个新目标第一步确认测试授权,无授权即停止。 +- **七道门决策树(G0–G6)**:先判鉴权权威(服务端 vs 客户端本地),再选交付形态(补丁 / 内存劫持 / 算号 / 中继 / 载荷提取)。 +- **两击失败熔断纪律**:同构路径失败两次 → 强制回退判型,禁止第三次盲试。 +- **Zero-Waste Recon**:发现信号先查知识库,禁止从零手写分析脚本。 +- **完工严格定义**:控制台无报错 ≠ 完成。必须闭环:目标指纹 → RVA 定位 → PoC 执行 → 断网确认 → 三段式报告。 --- -## 🤝 致谢与社区 (Acknowledgements & Community) +## 📝 交付标准(三段式咨询级报告) -- 特别致谢开源项目 [**newliver666/apk-reverse**](https://github.com/newliver666/apk-reverse) 提供的卓越 Android 逆向门控范式与工具验证体系。 -- 感谢 [**LINUX DO**](https://linux.do/) 社区提供的高质量技术交流与探索氛围。 +1. **脆弱性原理与业务危害** — 精确 RVA / 文件偏移、调用链根因、CWE-602 映射与业务风险等级 +2. **复现路径与可验证 PoC** — 代理 DLL 源码 / Frida 脚本 + 断网铁证(确证脱离服务端依然生效) +3. **纵深防御修复方案**: + - `SetDefaultDllDirectories` → 封堵 DLL 劫持面 + - `ProcessDynamicCodePolicy` → 阻断非法内存执行 + - 服务端权威原则:加密签名 + 短期令牌,严禁本地强判特权 --- -## ⚖️ 免责声明 (Disclaimer) +## 🗺️ 版本路线图 -**本工作台及其所载之一切文档、规则、脚本与工程范例仅供合法授权的安全研究、白盒安全走查、合规漏洞测试及 CTF 教学演练使用。** +| 版本 | 核心方向 | 状态 | +|---|---|---| +| **v1.0** | 核心工具链内置、9 大范式、Lab Mode、22 MCP 工具 | ✅ 已发布 | +| **v1.1** | MCP 上下文降噪(`fold`/`branch`/`summary`)、`seep_r2_xrefs` 分页器 | ✅ 已发布 | +| **v1.2** | MANUAL SOP:反调试绕过、脱壳前置分析(VMP/Themida/UPX)、PoC 闭环验证 | ✅ 已发布 | +| **v2.0** | Frida 自愈 CI 循环、Windows 沙箱加载器、PoC 自动化验证流水线 | 🔨 规划中 | +| **v2.x** | Linux / macOS 原生支持、Ghidra 无头集成、YARA 规则自动生成 | 💡 提案中 | -- **严格授权约束**:使用者在针对任何具体软件、客户端或系统展开分析前,必须自行确保已取得资产所有者完备、合法的书面测试授权。 -- **无附带保证**:本工作台提供的所有技术方案与分析结论均基于特定沙盒环境与软件版本的实测结果按“现状”提供,不构成对任何特定商业软件或生产环境的适用性保证。 -- **最小侵入原则**:针对二进制目标的测试工作应优先在隔离虚拟机或独立副本中开展,严禁在生产系统或未经许可的网络中实施未受控的逆向测试与补丁注入。 -- **免责条款**:工作台作者与贡献者不对任何因不当使用、超出授权范围操作或违反属地法律法规所导致的任何直接或间接后果承担法律责任。 +--- + +## 🤝 致谢与社区 + +- 特别致谢 [**newliver666/apk-reverse**](https://github.com/newliver666/apk-reverse) 提供的 Android 逆向门控范式与验证体系。 +- 感谢 [**LINUX DO**](https://linux.do/) 社区提供的高质量技术交流氛围。 + +--- + +## ⚖️ 免责声明 + +**本工作台及所载文档、脚本与范例仅供合法授权的安全研究、白盒审计、合规漏洞测试及 CTF 教学演练使用。** + +- **严格授权约束**:分析任何目标前必须取得资产所有者完备的书面测试授权。 +- **无附带保证**:所有方案基于特定沙盒实测结果按"现状"提供,不构成对任何生产环境的适用性保证。 +- **最小侵入原则**:优先在隔离虚拟机或独立副本中开展,严禁对生产系统实施未受控的逆向测试。 +- **免责条款**:作者与贡献者不对因不当使用、超出授权或违反法律法规导致的任何后果承担责任。