| name | vibe-pentest-ai-security-testing |
| description | AI-powered automated penetration testing tool using multi-agent architecture for web applications, APIs, and admin panels |
| triggers | ["run automated penetration test on web application","perform AI-based security testing with vibe-pentest","execute multi-agent black box security scan","scan web app for vulnerabilities using AI agents","conduct automated pentest with business logic testing","generate security assessment report with vibe-pentest","test web application security using AI automation","perform comprehensive web vulnerability scan"] |
vibe-pentest-ai-security-testing
Skill by ara.so — Security Skills collection.
Vibe Pentest is an AI Agent-based automated penetration testing tool that uses a multi-agent parallel execution architecture to perform comprehensive black-box penetration testing (including business logic vulnerability assessment) on web applications, APIs, and admin backends. It outputs stable and reliable security reports with actionable remediation recommendations.
Overview
Vibe Pentest orchestrates multiple AI agents to:
- Fingerprint web technologies and frameworks
- Crawl and map attack surfaces
- Execute parallel vulnerability testing across multiple categories
- Identify business logic flaws
- Generate comprehensive security reports in HTML and DOCX formats
Version: v1.0.7
License: AGPL-3.0
Primary Language: Python
Installation
Prerequisites
- Git (required for auto-update mechanism):
git clone https://gitee.com/ok-helloworld/vibe-pentest
cd vibe-pentest
git clone https://github.com/ok-helloworld/vibe-pentest
cd vibe-pentest
- Python 3.10+ and dependencies:
pip install playwright python-docx matplotlib requests urllib3 argparse httpx charset-normalizer chardet
playwright install chromium
- Katana Crawler (included for Windows, download for other OS):
- Windows version included in
tools/katana
- For other OS, see
tools/katana_downloads.json for download links
Automated Installation
You can also ask your AI coding agent to install everything:
Install vibe-pentest skill including all runtime dependencies from: https://gitee.com/ok-helloworld/vibe-pentest
Project Structure
vibe-pentest/
├── scripts/ # Core testing scripts
│ ├── run_katana.py # Crawler wrapper
│ ├── prepare_agent_findings.py # Multi-agent orchestration
│ ├── generate_report.py # Report generation
│ └── ...
├── tools/ # External tools (katana, etc.)
├── workspace/ # Test outputs (created during execution)
│ ├── sessions/ # Browser session data
│ ├── findings/ # Vulnerability findings
│ └── report_result/ # Final reports
└── prompts/ # AI prompt templates
Core Testing Workflow
Vibe Pentest follows a 7-phase workflow:
Phase 0: Fingerprinting
Identify web technologies, frameworks, and server information.
import subprocess
import json
result = subprocess.run(
["python", "scripts/fingerprint.py", "--url", "https://example.com"],
capture_output=True,
text=True
)
fingerprint = json.loads(result.stdout)
print(f"Detected: {fingerprint.get('framework')}, {fingerprint.get('server')}")
Phase 0.5: Backend Entry Scanning
Scan for admin panels and sensitive endpoints.
Phase 1: Authorization Confirmation
Verify written authorization before proceeding.
Phase 2: Browser Login & Credential Extraction
Launch browser for manual login, extract session cookies/tokens.
from playwright.sync_api import sync_playwright
def extract_session(target_url):
with sync_playwright() as p:
browser = p.chromium.launch(headless=False)
context = browser.new_context()
page = context.new_page()
page.goto(target_url)
input("Press Enter after logging in manually...")
cookies = context.cookies()
storage = page.evaluate("() => Object.assign({}, localStorage)")
browser.close()
return {"cookies": cookies, "storage": storage}
Phase 3: Katana Crawling
Use Katana crawler to discover all endpoints and parameters.
import subprocess
import time
proc = subprocess.Popen(
["python", "scripts/run_katana.py",
"--url", "https://example.com",
"--cookies", "session=abc123"],
stdout=subprocess.PIPE,
stderr=subprocess.PIPE
)
timeout = 1200
start_time = time.time()
while proc.poll() is None and (time.time() - start_time) < timeout:
time.sleep(10)
if proc.poll() is None:
proc.terminate()
time.sleep(5)
with open("workspace/crawl_summary.json") as f:
crawl_data = json.load(f)
Phase 4: Data Cleaning
Process crawler output, deduplicate URLs, extract parameters.
Phase 4.5: Attack Surface Mapping
Map discovered endpoints to vulnerability test categories.
Phase 5: Multi-Agent Parallel Testing
Distribute testing across 6 specialized agents using prepared skeleton files.
import subprocess
import json
subprocess.run([
"python", "scripts/prepare_agent_findings.py",
"--targets", "workspace/targets.txt",
"--fingerprint", "workspace/fingerprint.json",
"--output", "workspace/findings"
])
Phase 5.5: Attack Chain Analysis
Identify cross-agent attack chains and compound vulnerabilities.
Phase 5.6: Evidence Verification
Re-verify confirmed vulnerabilities with HTTP evidence.
import httpx
def verify_sqli(endpoint, payload, original_response_time):
url = f"{endpoint}?id={payload}"
start = time.time()
response = httpx.get(url, timeout=30)
elapsed = time.time() - start
if elapsed > original_response_time + 5:
return {
"verified": True,
"method": "GET",
"url": url,
"response_time": elapsed,
"status_code": response.status_code
}
return {"verified": False}
Phase 6: Report Generation
Generate comprehensive reports in multiple formats.
import subprocess
from datetime import datetime
timestamp = datetime.now().strftime("%Y%m%d_%H%M%S")
subprocess.run([
"python", "scripts/generate_report.py",
"--findings-dir", "workspace/findings",
"--fingerprint", "workspace/fingerprint.json",
"--output-json", f"workspace/report_{timestamp}.json",
"--output-html", f"workspace/report_{timestamp}.html",
"--output-docx", f"workspace/report_{timestamp}.docx"
])
Configuration
Environment Variables
export VIBE_WORKSPACE="/path/to/workspace"
export KATANA_TIMEOUT=1200
export MAX_AGENTS=6
export OPENAI_API_KEY=your_key_here
export ANTHROPIC_API_KEY=your_key_here
Testing Principles
Critical Rules:
- All sub-agents MUST actively investigate, not wait for prompts
- If Katana runs >20 minutes, terminate and collect results
- Test ALL discovered functionality, not just entry points
- Attempt 2-3 bypass techniques on failed tests
- Iron Law: May modify/delete own test data; NEVER modify production data
Common Usage Patterns
Standard Authorized Testing
"""
Complete penetration test workflow with single account
"""
import os
import subprocess
import json
def run_standard_pentest(target_url, auth_statement, account_info):
workspace = "workspace"
os.makedirs(workspace, exist_ok=True)
print("[Phase 0] Fingerprinting...")
subprocess.run(["python", "scripts/fingerprint.py",
"--url", target_url,
"--output", f"{workspace}/fingerprint.json"])
print("[Phase 0.5] Scanning for admin panels...")
subprocess.run(["python", "scripts/admin_scanner.py",
"--url", target_url,
"--output", f"{workspace}/admin_entries.json"])
print(f"[Phase 1] Authorization: {auth_statement}")
print("[Phase 2] Launch browser for manual login...")
session_data = extract_session(target_url)
with open(f"{workspace}/sessions/session.json", "w") as f:
json.dump(session_data, f)
print("[Phase 3] Running Katana crawler...")
run_katana(target_url, session_data)
()
subprocess.run([, ,
, ,
, ])
()
subprocess.run([, ,
, ,
, ,
, ])
()
subprocess.run([, ,
, ,
, ,
, ])
()
subprocess.run([, ,
, ,
, ])
()
subprocess.run([, ,
, ])
()
timestamp = datetime.now().strftime()
subprocess.run([, ,
, ,
, ,
, ,
, ])
()
run_standard_pentest(
target_url=,
auth_statement=,
account_info={: , : }
)
Multi-Account Privilege Escalation Testing
"""
Test for privilege escalation and horizontal authorization bypass
using multiple accounts with different permission levels
"""
def run_multiuser_pentest(target_url, accounts):
workspace = "workspace"
sessions = {}
for role, account in accounts.items():
print(f"[Phase 2.{role}] Login as {role}...")
sessions[role] = extract_session(target_url)
with open(f"{workspace}/sessions/{role}_session.json", "w") as f:
json.dump(sessions[role], f)
for role, session in sessions.items():
print(f"[Phase 3.{role}] Crawling as {role}...")
run_katana(target_url, session, output_prefix=role)
subprocess.run(["python", "scripts/merge_crawl_results.py",
"--inputs", f"{workspace}/*_crawled.jsonl",
"--output", f"{workspace}/targets.txt"])
run_multiuser_pentest(
target_url="https://example.com",
accounts={
"admin": {"username": , : },
: {: , : }
}
)
Report-Only Generation
"""
Generate reports from existing findings without re-scanning
Useful when you need to regenerate reports after manual review
"""
def generate_reports_only(workspace="workspace"):
from datetime import datetime
timestamp = datetime.now().strftime("%Y%m%d_%H%M%S")
subprocess.run(["python", "scripts/analyze_chains.py",
"--findings", f"{workspace}/findings",
"--output", f"{workspace}/attack_chains.json"])
subprocess.run(["python", "scripts/verify_findings.py",
"--findings", f"{workspace}/findings"])
subprocess.run(["python", "scripts/generate_report.py",
"--findings-dir", f"{workspace}/findings",
"--fingerprint", f"{workspace}/fingerprint.json",
"--output-json", f"{workspace}/report_{timestamp}.json",
"--output-html", f"{workspace}/report_{timestamp}.html",
"--output-docx", f"{workspace}/report_{timestamp}.docx"])
validate_reports(workspace, timestamp)
():
os
json_path =
html_path =
docx_path =
os.path.exists(json_path),
os.path.exists(html_path),
os.path.exists(docx_path),
(json_path) f:
report_data = json.load(f)
report_data
report_data
()
Troubleshooting
Katana Crawler Issues
Problem: Crawler returns empty results or finishes in <20 seconds
import json
with open("workspace/sessions/session.json") as f:
session = json.load(f)
for cookie in session["cookies"]:
if "expires" in cookie:
print(f"{cookie['name']}: expires {cookie['expires']}")
session = extract_session(target_url)
Problem: Crawler times out or hangs
python scripts/run_katana.py \
--url https://example.com \
--depth 3 \
--concurrency 5 \
--timeout 600
Multi-Agent Coordination
Problem: Agents not finding vulnerabilities
import os
findings_dir = "workspace/findings"
agents = ["auth", "injection", "logic", "upload", "api", "info"]
for agent in agents:
skeleton_path = f"{findings_dir}/{agent}_findings.json"
if not os.path.exists(skeleton_path):
print(f"Missing skeleton for {agent} agent")
subprocess.run(["python", "scripts/prepare_agent_findings.py",
"--targets", "workspace/targets.txt",
"--fingerprint", "workspace/fingerprint.json",
"--output", findings_dir])
break
Problem: Agents marking everything as "Potential" without confirmation
Reminder for AI agents:
- Must attempt actual exploitation, not just theory
- Require HTTP request/response evidence for "Confirmed" status
- Try 2-3 bypass techniques on WAF/validation failures
- Mark as "Potential" only if technical constraints prevent confirmation
Report Generation Failures
Problem: Report missing sections or malformed
def validate_findings_structure(findings_dir):
import glob
for finding_file in glob.glob(f"{findings_dir}/*_findings.json"):
with open(finding_file) as f:
data = json.load(f)
required_fields = ["agent_name", "findings", "summary"]
for field in required_fields:
assert field in data, f"Missing {field} in {finding_file}"
for finding in data["findings"]:
assert "title" in finding
assert "severity" in finding
assert "status" in finding
assert "evidence" in finding
print("✓ All findings files valid")
validate_findings_structure("workspace/findings")
Session Extraction Issues
Problem: Browser doesn't launch or session not captured
from playwright.sync_api import sync_playwright
def extract_session_robust(target_url):
with sync_playwright() as p:
browser = p.chromium.launch(
headless=False,
executable_path="/usr/bin/chromium",
args=["--disable-blink-features=AutomationControlled"]
)
context = browser.new_context(
viewport={"width": 1920, "height": 1080},
user_agent="Mozilla/5.0 (Windows NT 10.0; Win64; x64)..."
)
page = context.new_page()
page.goto(target_url)
print("Please log in manually. Press Enter when done...")
input()
cookies = context.cookies()
storage = page.evaluate("() => Object.assign({}, localStorage)")
session_storage = page.evaluate("() => Object.assign({}, sessionStorage)")
auth_headers = {}
def handle_response(response):
if "authorization" in response.request.headers:
auth_headers["Authorization"] = response.request.headers["authorization"]
page.on("response", handle_response)
page.reload()
page.wait_for_load_state("networkidle")
browser.close()
return {
"cookies": cookies,
: storage,
: session_storage,
: auth_headers
}
Best Practices
- Always use separate workspaces for different targets to avoid cross-contamination
- Verify authorization documentation before starting any test
- Test on staging/UAT environments when possible, not production
- Review findings manually before delivering reports to clients
- Keep vibe-pentest updated using
git pull to get latest detection techniques
- Use multiple accounts to thoroughly test authorization controls
- Document custom test data created during testing for cleanup
Additional Resources