deonmenezes/mantishack
Mantis Hack
What it solves
Mantishack is an autonomous vulnerability-discovery agent designed for offensive security and ethical hacking. It aims to move beyond simple detection (which it considers a commodity) to high-precision validation, ensuring that surfaced vulnerabilities are actually reachable and exploitable rather than just being false positives.
How it works
The project uses a staged pipeline that moves findings through a strict lifecycle: candidate $\rightarrow$ confirmed $\rightarrow$ exploited $\rightarrow$ fixed $\rightarrow$ verified.
- Detection: Uses a combination of SAST/SCA/secrets scanners (like Semgrep, CodeQL, Trivy) and LLM reasoning to find candidates.
- Validation: Acts as an attacker-simulation to verify if a pattern is real, reachable, and exploitable. A candidate only becomes "confirmed" if reachability evidence is provided; otherwise, it is rejected with a cited roadblock.
- Analysis: Integrates Z3 SMT solver for formal reachability checks by constructing path conditions as SMT-LIB2 scripts to prove if an attacker-controlled assignment can reach a sink.
- Architecture: Built on top of the OpenAI Codex CLI (Rust) as the harness, using the Model Context Protocol (MCP) for its capability layer (tools), TOML files for agent roles (prompts), and Markdown files for skills (knowledge).
Who it’s for
Security researchers, ethical hackers, and AppSec teams who need an AI-driven approach to automate the vulnerability discovery and validation pipeline.
Highlights
- Strict Validation Pipeline: Rejects findings without proof of reachability, reducing noise and false positives.
- ** uma MCP-based Tooling:** Wraps multiple industry-standard scanners (Semgrep, CodeQL, OSV-Scanner, TruffleHog, etc.) as MCP servers.
- Z3 SMT Integration: Uses formal methods to mathematically prove reachability of vulnerabilities.
- Multi-Agent Orchestration: Employs specialized roles (recon, detector, validator, exploiter, fixer) to handle different stages of the pipeline.
- Prompt Injection Defense: Includes "canary" decoy tools to detect if the agent is being manipulated via prompt injection.