Feed it real recon output. It correlates findings, pulls real CVE/CVSS data, and tells you what to test next.
AI_SCANNER.mp4
You run the real tools — nmap, gobuster, whatweb, ffuf, nikto. This tool:
- Correlates findings across all of them instead of listing each tool's output in isolation
- Enriches every finding with real CVE/CVSS data from the NVD and MITRE ATT&CK mapping
- Reasons over the result with an AI advisor (Claude, Groq, or a fully offline local model) to rank what to test next
- Reports everything — recon, findings, evidence, AI guidance — into a DOCX, PDF, or Markdown file
Not an auto-attacker. This is a methodology advisor — it helps you think like a senior pentester about what your scan results mean and what to try next. Only run it against systems you're authorized to test (your own labs, DVWA, Juice Shop, CTF targets).
| 🔍 Multi-tool ingestion | nmap, gobuster, whatweb, ffuf, nikto |
| 🔗 Correlation engine | Cross-references findings across tools — e.g. a detected CMS + a discovered admin panel become one prioritized finding, not two disconnected lines |
| 🛡️ Real vulnerability intel | Live CVE lookups against the NVD, CVSS scoring (real or clearly-labeled estimates), confidence ratings, and MITRE ATT&CK mapping for every finding |
| 🤖 AI advisor | Reasons over the enriched attack surface with a strict JSON-constrained prompt — ranked next steps, not chatbot fluff. Works with Claude, Groq (free), or local Ollama (free, offline) — auto-detected |
| 📎 Evidence management | Screenshots, HTTP requests/responses, PoC scripts, notes — all tied to a session |
| 📄 Reports in 3 formats | DOCX, PDF, Markdown — same data, same structure, generated straight from the session log |
| 💾 Persistent sessions | SQLite-backed — an engagement builds up context across multiple tool runs over time, the way a real pentest actually works |
Prerequisites: Python 3.10+, and whichever recon tools you plan to feed it — nmap · gobuster · whatweb · ffuf · nikto
git clone https://github.com/Aymwvn/AI-Assisted-Pentest-Co-Pilot.git cd AI-Assisted-Pentest-Co-Pilot pip install -r requirements.txt export ANTHROPIC_API_KEY=your-key-here
Get a key at console.anthropic.com. Everything
except session next (the AI advisor) works with zero API key and zero
cost — parsing, correlation, CVE lookups, evidence, and reports all run
without one.
Groq — free tier, hosted, fast, no local compute needed
export GROQ_API_KEY=your-key-here
python cli.py session next --name juice-shop-test --provider groqGet a key at console.groq.com.
Ollama — fully local, offline, no account, zero cost forever
ollama serve # in a separate terminal ollama pull llama3.1 # or any model you prefer python cli.py session next --name juice-shop-test --provider ollama
--provider auto (default) tries Claude → Groq → Ollama, whichever is
configured. Force one explicitly with --provider claude|groq|ollama.
python cli.py session start --name juice-shop-test --target http://localhost:3000
nmap -sV localhost > nmap_out.txt python cli.py session add --name juice-shop-test --file nmap_out.txt --type nmap gobuster dir -u http://localhost:3000 -w wordlist.txt -o gobuster_out.txt python cli.py session add --name juice-shop-test --file gobuster_out.txt --type gobuster whatweb http://localhost:3000 > whatweb_out.txt python cli.py session add --name juice-shop-test --file whatweb_out.txt --type whatweb
Supported --type values: nmap · gobuster · whatweb · ffuf · nikto · raw
(raw = paste any text and skip parsing).
python cli.py session surface --name juice-shop-test
Cross-references everything collected so far — an open database port plus
an exposed .env file plus a discovered admin panel don't just sit as
three separate lines, they get correlated into ranked findings.
By default this also enriches each finding with:
- Real CVE matches from the NVD, when a service + version is available
- CVSS scores — real scores from matched CVEs, or a clearly-labeled estimate
- A confidence rating (
high/medium/low) - Reference links (HackTricks pages for the relevant service/category)
- MITRE ATT&CK technique mapping
Skip enrichment for a faster, fully offline pass:
python cli.py session surface --name juice-shop-test --no-enrich
NVD's public API has a low rate limit (5 req/30s without a key), so lookups are cached to
~/.ai-scanner/cve_cache.jsonfor a week per service+version — repeated calls won't re-query NVD for the same version.
python cli.py session next --name juice-shop-test
Reads everything collected so far and returns ranked next steps with risk context and testing approaches — not exploit code. Uses Claude by default (auto-falls back to Groq/Ollama — see Setup).
# A note python cli.py session log-evidence --name juice-shop-test --type note \ --text "Confirmed default creds work on admin panel" --desc "Auth bypass confirmation" # A screenshot python cli.py session log-evidence --name juice-shop-test --type screenshot \ --file login_success.png --desc "Logged in with admin/admin" --linked-finding "admin_panel_exposed" # A saved HTTP request/response python cli.py session log-evidence --name juice-shop-test --type http_request \ --file request.txt --desc "SQLi payload and response" # A PoC script python cli.py session log-evidence --name juice-shop-test --type poc \ --file exploit.py --desc "Script confirming the SQLi" python cli.py session list-evidence --name juice-shop-test
Evidence types: screenshot · http_request · poc · note. Use either
--file (copied into ~/.ai-scanner/evidence/<session>/) or --text
(stored inline) — not both.
python cli.py session log-finding --name juice-shop-test \
--desc "SQLi confirmed on /login via error-based payload" \
--severity highpython cli.py session report --name juice-shop-test --output final_report.docx # DOCX
python cli.py session report --name juice-shop-test --format pdf --output final_report.pdf
python cli.py session report --name juice-shop-test --format md --output final_report.mdFormat is inferred from the --output extension, or set explicitly with
--format docx|pdf|md. All three include the same sections: recon data,
correlated attack surface (CVE/CVSS/confidence/MITRE), confirmed findings,
evidence (screenshots embedded for docx/pdf), and AI advisor guidance.
Add --no-enrich to skip the NVD lookup for a faster, fully offline report.
python cli.py session list # list all sessions python cli.py session show --name X # dump raw session JSON python cli.py session delete --name X # delete a session
pip install -r requirements-dev.txt pytest tests/ -v
53 tests, all mocked externally (no live API keys or network access needed to run them) — all 5 parsers, the correlation engine (including the cross-tool finding-merge logic), CVSS estimation, CVE lookup (mocked NVD responses), session state, and a full ingestion-to-report integration test. Runs in under a second. Fires automatically on every push via GitHub Actions.
ai-scanner/
├── cli.py # CLI entry point (click)
├── scanner/
│ ├── session.py # SQLite-backed session state
│ ├── evidence.py # screenshots/requests/PoCs/notes per session
│ ├── parsers/ # raw tool output -> structured findings
│ │ ├── nmap_parser.py
│ │ ├── gobuster_parser.py
│ │ ├── whatweb_parser.py
│ │ ├── ffuf_parser.py
│ │ └── nikto_parser.py
│ ├── correlation.py # cross-references findings -> ranked attack surface
│ ├── intel/
│ │ ├── mitre_mapping.py # category -> MITRE ATT&CK techniques
│ │ ├── cve_lookup.py # NVD API, disk-cached
│ │ ├── cvss_estimate.py # conservative fallback when no CVE match
│ │ ├── references.py # curated HackTricks/docs links
│ │ └── enrichment.py # combines CVE + CVSS + confidence + refs
│ ├── knowledge/
│ │ └── methodology.py # PTES/OWASP context fed to the AI
│ ├── ai_advisor.py # Claude/Groq/Ollama, constrained JSON output
│ ├── report_data.py # shared context for all 3 report formats
│ ├── report_docx.py
│ ├── report_pdf.py
│ └── report_markdown.py
├── tests/ # pytest suite, 53 tests, fully mocked
└── .github/workflows/tests.yml # CI
- Parsers are deterministic, hand-written code — no AI involved in extracting structured data from tool output. This is the part that proves you understand the tools and their output formats.
- The AI's job is narrow and constrained — given structured findings + methodology context, output ranked next steps in a strict JSON schema. Reliable, not a chatty wrapper that hallucinates.
- Sessions persist to disk so an engagement builds context over multiple tool runs, the way a real pentest actually works.
- Reports reuse the whole session log — not a separate manual step, a natural byproduct of using the tool during the engagement.
- More parsers:
wpscan,sslscan, Burp Suite XML export session next --focus webto narrow advisor output to one category- A confidence/false-positive flag on AI suggestions based on repeated runs
- Wrapping this in a FastAPI + React platform instead of a single-user CLI
MIT — see LICENSE.