// AI-Powered Security Testing Toolkit - Professional penetration testing tools with intelligent agent-empowering capabilities
| name | pentest-toolkit |
| description | AI-Powered Security Testing Toolkit - Professional penetration testing tools with intelligent agent-empowering capabilities |
A sophisticated, context-aware penetration testing skill that provides intelligent security assessment capabilities with agent-empowering tools. This toolkit combines traditional vulnerability detection with LLM-optimized utilities that enable security agents to dynamically understand applications and generate context-aware tests.
tools/discover_structure.py) - Blindly discovers API structure, data models, and business logictools/analyze_responses.py) - Extracts patterns and relationships from HTTP responsestools/generate_context_tests.py) - Creates targeted tests based on discovered patternspatterns/business_logic.json) - Comprehensive vulnerability patterns for business logic flawspatterns/data_relationships.json) - Common data relationship patterns and security implicationsTraditional (Human-centric):
./pentest-toolkit --target https://example.com --mode comprehensive
# Fixed vulnerability testing with predefined payloads
Agent-Empowered (LLM-driven):
# Step 1: Agent discovers application structure
structure = run_tool("discover_structure", target)
# Returns: endpoints, data models, business entities, auth patterns
# Step 2: Agent analyzes patterns using LLM + pattern libraries
vulnerabilities = agent.analyze(structure, business_logic_patterns)
# Step 3: Agent generates targeted tests
custom_tests = run_tool("generate_context_tests", structure)
# Returns: context-aware test code and scenarios
# Step 4: Agent executes and adapts tests
results = agent.execute_and_learn(custom_tests, structure)
# MUST USE astral uv for all script execution
# Setup uv environment (required)
./pentest-toolkit --setup
# Quick security scan
./pentest-toolkit --target https://example.com --mode quick
# Comprehensive penetration test
./pentest-toolkit --target https://example.com --mode comprehensive
# API security testing
./pentest-toolkit --target https://api.example.com --mode api
# Multi-target scanning
./pentest-toolkit --targets targets.txt --parallel 3
# Generate report from previous scan
./pentest-toolkit --report /path/to/results.json
โ ๏ธ IMPERATIVE: ALL script executions MUST use uv run python to ensure proper dependency management. Never use plain python.
# MUST USE: uv run python (required for dependency management)
uv run python tools/discover_structure.py https://target.com > structure.json
# Returns JSON with:
# {
# "discovered_endpoints": [...],
# "data_models": {...},
# "business_entities": [...],
# "authentication_patterns": {...}
# }
# MUST USE: uv run python (required for dependency management)
uv run python tools/analyze_responses.py responses.json > analysis.json
# Returns JSON with:
# {
# "data_patterns": {...},
# "security_indicators": [...],
# "relationship_patterns": [...],
# "vulnerability_indicators": [...]
# }
# MUST USE: uv run python (required for dependency management)
uv run python tools/generate_context_tests.py structure.json tests.json
# Returns JSON with:
# {
# "test_scenarios": [...],
# "test_code": {...},
# "targeted_vulnerabilities": [...],
# "execution_plan": [...]
# }
# Access business logic patterns
with open('patterns/business_logic.json') as f:
patterns = json.load(f)
# Use patterns to guide testing
for pattern in patterns['patterns']:
test_scenario = agent.generate_test(pattern, app_structure)
pentest-toolkit/
โโโ scripts/ # Existing: Human-executable security scripts
โโโ tools/ # ๐ Agent-callable discovery & analysis utilities
โ โโโ discover_structure.py # Blind API structure discovery
โ โโโ analyze_responses.py # Response pattern analysis
โ โโโ generate_context_tests.py # Context-aware test generation
โโโ patterns/ # ๐ Knowledge libraries for agent use
โ โโโ business_logic.json # Business vulnerability patterns
โ โโโ data_relationships.json # Data relationship patterns
โโโ templates/ # ๐ Test generation templates
Agents can leverage comprehensive pattern libraries:
# Agent learns from one application and applies knowledge to others
def adaptive_testing(app_structure):
# Identify application type
app_type = classify_application(app_structure)
# Apply learned patterns from similar applications
relevant_patterns = get_similar_app_patterns(app_type)
# Generate custom tests based on discovered structure
custom_tests = generate_adaptive_tests(app_structure, relevant_patterns)
return custom_tests
# Agent builds knowledge base across multiple applications
knowledge_base = {}
def learn_from_application(app_structure, test_results):
app_type = classify_application(app_structure)
if app_type not in knowledge_base:
knowledge_base[app_type] = {
'common_vulnerabilities': [],
'effective_techniques': [],
'pattern_matches': []
}
# Store discovered patterns and effective test techniques
knowledge_base[app_type]['common_vulnerabilities'].extend(test_results)
Payloads adapt to discovered data models:
{
"user_id": "other_user_id",
"role": "admin",
"status": "approved",
"parent_id": "unauthorized_parent",
"team_id": "target_team_id"
}
def comprehensive_assessment(target):
# Discover application structure (MUST use uv run python)
structure = run_shell_command(f"uv run python tools/discover_structure.py {target}")
# Analyze responses for patterns (MUST use uv run python)
analysis = run_shell_command(f"uv run python tools/analyze_responses.py responses.json")
# Generate targeted tests (MUST use uv run python)
tests = run_shell_command(f"uv run python tools/generate_context_tests.py structure.json tests.json")
# Execute and analyze results
results = execute_tests(tests)
return comprehensive_report(structure, analysis, results)
def test_by_application_type(target):
# MUST use uv run python for all script executions
structure = run_shell_command(f"uv run python tools/discover_structure.py {target}")
app_type = classify_application(structure)
if app_type == 'ecommerce':
return test_ecommerce_vulnerabilities(structure)
elif app_type == 'social_media':
return test_social_media_vulnerabilities(structure)
# ... more application types
def continuous_learning(targets):
knowledge_base = {}
for target in targets:
# MUST use uv run python for all script executions
structure = run_shell_command(f"uv run python tools/discover_structure.py {target}")
patterns = run_shell_command("uv run python tools/analyze_responses.py responses.json")
tests = run_shell_command("uv run python tools/generate_context_tests.py structure.json tests.json")
results = execute_tests(tests)
# Learn from results
update_knowledge_base(knowledge_base, structure, results)
return knowledge_base
โ ๏ธ CRITICAL: This toolkit is for authorized security testing ONLY.
โ ๏ธ CRITICAL REQUIREMENT: ALL script executions MUST use uv run python for proper dependency management.
uv run python tools/discover_structure.py to understand applicationuv run python tools/analyze_responses.py to extract security-relevant patternsuv run python tools/generate_context_tests.py to create targeted tests{
"base_url": "https://example.com",
"discovered_endpoints": [
{
"url": "/api/users",
"status": 200,
"methods": ["GET", "POST"],
"content_type": "application/json"
}
],
"data_models": {
"user": {
"type": "object",
"fields": {
"id": {"type": "string"},
"email": {"type": "string"},
"role": {"type": "string"}
},
"relationships": [
{"field": "team_id", "pattern": "_id$"}
]
}
},
"business_entities": ["user", "team", "project"],
"authentication_patterns": {
"login_endpoints": ["/auth/login"],
"token_based": true
}
}
{
"test_scenarios": [
{
"pattern_name": "authorization_bypass",
"test_name": "authorization_bypass_test",
"risk_level": "HIGH",
"target_endpoints": ["/api/users/{id}", "/api/posts/{id}"],
"test_cases": [
{
"description": "Test user resource access with different user_id",
"payloads": [
{"user_id": "other_user_id"},
{"owner_id": "unauthorized_id"}
]
}
]
}
],
"execution_plan": [
{
"test_name": "authorization_bypass_test",
"risk_level": "HIGH",
"estimated_duration": "MEDIUM (2-5 minutes)"
}
]
}
This enhanced toolkit transforms from a traditional penetration testing tool into an intelligent security assistant that empowers AI agents to perform sophisticated, context-aware security assessments while maintaining all existing human-centric capabilities.