GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - Aymwvn/AI-Assisted-Pentest-Co-Pilot: AI-assisted pentest methodology co-pilot — parses recon tool output and suggests ranked next steps using Claude + PTES/OWASP methodology

BranchesTags
Open more actions menu

Latest commit

 

History

11 Commits
11 Commits

Folders and files

NameName
Last commit message
Last commit date
scanner
scanner
 
 
tests
tests
 
 
.gitignore
.gitignore
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
cli.py
cli.py
 
 
git
git
 
 
pytest.ini
pytest.ini
 
 
requirements-dev.txt
requirements-dev.txt
 
 
requirements.txt
requirements.txt
 
 

Repository files navigation

AI Scanner

AI-Assisted Pentest Co-Pilot

Feed it real recon output. It correlates findings, pulls real CVE/CVSS data, and tells you what to test next.

Tests Python License


AI_SCANNER.mp4

What it does

You run the real tools — nmap, gobuster, whatweb, ffuf, nikto. This tool:

  1. Correlates findings across all of them instead of listing each tool's output in isolation
  2. Enriches every finding with real CVE/CVSS data from the NVD and MITRE ATT&CK mapping
  3. Reasons over the result with an AI advisor (Claude, Groq, or a fully offline local model) to rank what to test next
  4. 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).

Contents

  • Features
  • Setup
  • Usage
  • Testing
  • Architecture
  • Design notes
  • Extending it

Features

🔍 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

Setup

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.

Free alternatives for the AI advisor

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 groq

Get 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.

Usage

1 · Start a session

python cli.py session start --name juice-shop-test --target http://localhost:3000

2 · Feed it recon data as you go

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).

3 · View the correlated attack surface

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.json for a week per service+version — repeated calls won't re-query NVD for the same version.

4 · Ask what to do next

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).

5 · Log evidence as you confirm findings

# 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.

6 · Log confirmed findings

python cli.py session log-finding --name juice-shop-test \
  --desc "SQLi confirmed on /login via error-based payload" \
  --severity high

7 · Generate the report

python 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.md

Format 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.

Other commands

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

Testing

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.

Architecture

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

Why this design (for your report/CV writeup)

  • 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.

Extending it

  • More parsers: wpscan, sslscan, Burp Suite XML export
  • session next --focus web to 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

License

MIT — see LICENSE.

About

AI-assisted pentest methodology co-pilot — parses recon tool output and suggests ranked next steps using Claude + PTES/OWASP methodology

Topics

aicli-toolcybersecurityowasppentestingpentesting-toolspythonsecurity-automation

Resources

Readme
MIT license
Activity

Stars

3 stars

Watchers

0 watching

Forks

0 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.