Buckets:
AnonymousSpottedToad/candidate_bucket / codebase /python /SHAdd0WTAka_Zen-Ai-Pentest /scripts /pentest_workflow.py
| #!/usr/bin/env python3 | |
| """ | |
| ╔══════════════════════════════════════════════════════════════════════════════╗ | |
| ║ 🗺️ PENTEST WORKFLOW ÜBERSICHT ║ | |
| ║ Wie Penetration Tester alle 72 Tools nutzen ║ | |
| ╚══════════════════════════════════════════════════════════════════════════════╝ | |
| Dieses Modul zeigt die komplette Workflow-Integration aller 72 Tools | |
| in einem strukturierten Pentest nach PTES (Penetration Testing Execution Standard). | |
| """ | |
| from typing import Dict, List | |
| class PentestWorkflow: | |
| """ | |
| 🎯 Kompletter Pentest Workflow mit allen 72 Tools | |
| Workflow: | |
| ┌─────────────────────────────────────────────────────────────────────────┐ | |
| │ PHASE 1: RECONNAISSANCE (OSINT & Discovery) │ | |
| │ ├─ Tools: Subfinder, Amass, Sherlock, TheHarvester │ | |
| │ ├─ System: whois, dig, nslookup │ | |
| │ └─ Output: Subdomain-Liste, IP-Ranges, Email-Kontakte │ | |
| ├─────────────────────────────────────────────────────────────────────────┤ | |
| │ PHASE 2: SCANNING (Network & Services) │ | |
| │ ├─ Tools: Nmap (Top 1000), Masscan, tcpdump │ | |
| │ ├─ Tools: WhatWeb, WAFW00F │ | |
| │ └─ Output: Offene Ports, Services, Technologien, WAF │ | |
| ├─────────────────────────────────────────────────────────────────────────┤ | |
| │ PHASE 3: WEB APPLICATION TESTING │ | |
| │ ├─ Tools: Nikto, Nuclei, FFuF, Gobuster │ | |
| │ ├─ Tools: SQLMap (SQLi), Burp Suite (Proxy) │ | |
| │ └─ Output: Web-Vulns, Hidden Paths, API Endpoints │ | |
| ├─────────────────────────────────────────────────────────────────────────┤ | |
| │ PHASE 4: AUTHENTICATION & BRUTE FORCE │ | |
| │ ├─ Tools: Hydra (Login Brute), John/Hashcat (Cracking) │ | |
| │ ├─ Tools: NetExec (SMB/WinRM) │ | |
| │ └─ Output: Credentials, Auth Bypass │ | |
| ├─────────────────────────────────────────────────────────────────────────┤ | |
| │ PHASE 5: ACTIVE DIRECTORY (falls Domain) │ | |
| │ ├─ Tools: NetExec, BloodHound, Responder │ | |
| │ ├─ Tools: ldapsearch, rpcclient, enum4linux │ | |
| │ └─ Output: AD Struktur, Privilege Escalation Paths │ | |
| ├─────────────────────────────────────────────────────────────────────────┤ | |
| │ PHASE 6: POST-EXPLOITATION & LATERAL MOVEMENT │ | |
| │ ├─ Tools: Metasploit (Exploits), SearchSploit │ | |
| │ ├─ Tools: Responder (Poisoning), ncat/socat (Pivot) │ | |
| │ └─ Output: Shell Access, Lateral Movement │ | |
| ├─────────────────────────────────────────────────────────────────────────┤ | |
| │ PHASE 7: CODE & CONTAINER ANALYSIS │ | |
| │ ├─ Tools: Semgrep (SAST), TruffleHog/Gitleaks (Secrets) │ | |
| │ ├─ Tools: Trivy (Container), Bandit (Python) │ | |
| │ └─ Output: Source Code Vulns, Secrets, Container Issues │ | |
| ├─────────────────────────────────────────────────────────────────────────┤ | |
| │ PHASE 8: WIRELESS (falls im Scope) │ | |
| │ ├─ Tools: Aircrack-ng Suite │ | |
| │ └─ Output: WPA Keys, Rogue APs │ | |
| ├─────────────────────────────────────────────────────────────────────────┤ | |
| │ PHASE 9: REPORTING │ | |
| │ ├─ Tools: Custom Report Generator │ | |
| │ └─ Output: PDF/HTML Report mit Findings & Remediation │ | |
| └─────────────────────────────────────────────────────────────────────────┘ | |
| """ | |
| # Tool-Kategorien mit allen 72 Tools | |
| TOOL_CATEGORIES = { | |
| "Network & Scanning": { | |
| "phase": [1, 2], | |
| "tools": [ | |
| ("nmap", "Port Scanner", "nmap -sV -sC target"), | |
| ( | |
| "masscan", | |
| "High-speed Scanner", | |
| "masscan -p1-65535 target --rate 1000", | |
| ), | |
| ( | |
| "scapy", | |
| "Packet Crafting", | |
| "Python API für benutzerdefinierte Pakete", | |
| ), | |
| ("tshark", "Protocol Analyzer", "tshark -r capture.pcap"), | |
| ( | |
| "tcpdump", | |
| "Packet Capture", | |
| "tcpdump -i eth0 -w capture.pcap", | |
| ), | |
| ( | |
| "netdiscover", | |
| "ARP Scanning", | |
| "netdiscover -r 192.168.1.0/24", | |
| ), | |
| ("arp-scan", "ARP Scanner", "arp-scan -l"), | |
| ("wireshark", "GUI Analyzer", "wireshark capture.pcap"), | |
| ], | |
| }, | |
| "Web Security": { | |
| "phase": [2, 3], | |
| "tools": [ | |
| ("burpsuite", "Web Proxy", "Burp Proxy für Manual Testing"), | |
| ( | |
| "sqlmap", | |
| "SQL Injection", | |
| "sqlmap -u 'target.com?id=1' --batch", | |
| ), | |
| ("nikto", "Web Scanner", "nikto -h target.com"), | |
| ("zaproxy", "OWASP ZAP", "zap.sh -daemon"), | |
| ( | |
| "ffuf", | |
| "Web Fuzzer", | |
| "ffuf -u target.com/FUZZ -w wordlist.txt", | |
| ), | |
| ( | |
| "gobuster", | |
| "Dir Buster", | |
| "gobuster dir -u target.com -w wordlist.txt", | |
| ), | |
| ("wafw00f", "WAF Detection", "wafw00f target.com"), | |
| ("whatweb", "Tech Detection", "whatweb target.com"), | |
| ("nuclei", "Vuln Scanner", "nuclei -u target.com -t cves/"), | |
| ("curl", "HTTP Client", "curl -I target.com"), | |
| ("wget", "Downloader", "wget --mirror target.com"), | |
| ], | |
| }, | |
| "Reconnaissance": { | |
| "phase": [1], | |
| "tools": [ | |
| ( | |
| "subfinder", | |
| "Subdomain Discovery", | |
| "subfinder -d target.com", | |
| ), | |
| ("amass", "Attack Surface", "amass enum -d target.com"), | |
| ("httpx", "HTTP Prober", "cat subdomains.txt | httpx"), | |
| ( | |
| "subdomain_enum", | |
| "Subdomain Enum", | |
| "python tools/subdomain_enum.py", | |
| ), | |
| ( | |
| "unified_recon", | |
| "All-in-One", | |
| "python tools/unified_recon.py", | |
| ), | |
| ], | |
| }, | |
| "OSINT": { | |
| "phase": [1], | |
| "tools": [ | |
| ("sherlock", "Username OSINT", "sherlock username"), | |
| ( | |
| "theharvester", | |
| "Email OSINT", | |
| "theharvester -d target.com -b all", | |
| ), | |
| ("scout", "OSINT Framework", "scout recon target"), | |
| ("ignorant", "Email Check", "ignorant email@target.com"), | |
| ], | |
| }, | |
| "Brute Force": { | |
| "phase": [4], | |
| "tools": [ | |
| ( | |
| "hydra", | |
| "Login Cracker", | |
| "hydra -l admin -P passwords.txt target ssh", | |
| ), | |
| ( | |
| "hashcat", | |
| "Password Cracker", | |
| "hashcat -m 0 hash.txt wordlist.txt", | |
| ), | |
| ( | |
| "john", | |
| "John the Ripper", | |
| "john --wordlist=passwords.txt hash.txt", | |
| ), | |
| ("ncrack", "Network Cracker", "ncrack -p 22 target"), | |
| ], | |
| }, | |
| "Active Directory": { | |
| "phase": [5], | |
| "tools": [ | |
| ("netexec", "AD Pentesting", "netexec smb 192.168.1.0/24"), | |
| ( | |
| "bloodhound-python", | |
| "AD Collector", | |
| "bloodhound-python -d domain.local -c All", | |
| ), | |
| ("responder", "LLMNR Poisoner", "responder -I eth0 -wrf"), | |
| ( | |
| "ldapsearch", | |
| "LDAP Query", | |
| "ldapsearch -x -H ldap://target -b ''", | |
| ), | |
| ("rpcclient", "RPC Client", "rpcclient -U '' target"), | |
| ("smbclient", "SMB Client", "smbclient -L //target"), | |
| ("enum4linux", "SMB Enum", "enum4linux -a target"), | |
| ], | |
| }, | |
| "Exploitation": { | |
| "phase": [6], | |
| "tools": [ | |
| ("msfconsole", "Metasploit", "msfconsole -q -r resource.rc"), | |
| ("searchsploit", "Exploit DB", "searchsploit apache 2.4"), | |
| ], | |
| }, | |
| "Wireless": { | |
| "phase": [8], | |
| "tools": [ | |
| ( | |
| "aircrack-ng", | |
| "WPA Cracking", | |
| "aircrack-ng capture.cap -w wordlist.txt", | |
| ), | |
| ("airmon-ng", "Monitor Mode", "airmon-ng start wlan0"), | |
| ("airodump-ng", "AP Discovery", "airodump-ng wlan0mon"), | |
| ( | |
| "aireplay-ng", | |
| "Deauth", | |
| "aireplay-ng -0 10 -a BSSID wlan0mon", | |
| ), | |
| ], | |
| }, | |
| "Code Analysis": { | |
| "phase": [7], | |
| "tools": [ | |
| ("semgrep", "SAST", "semgrep --config=auto ."), | |
| ("trufflehog", "Secrets", "trufflehog filesystem . --json"), | |
| ("gitleaks", "Git Secrets", "gitleaks detect -v"), | |
| ("bandit", "Python SAST", "bandit -r . -f json"), | |
| ], | |
| }, | |
| "Container & Cloud": { | |
| "phase": [7], | |
| "tools": [ | |
| ("trivy", "Container Scan", "trivy image nginx:latest"), | |
| ("docker", "Docker", "docker scan image:tag"), | |
| ("kubectl", "K8s", "kubectl get pods --all-namespaces"), | |
| ], | |
| }, | |
| "System Utilities": { | |
| "phase": [6, 9], | |
| "tools": [ | |
| ("nc", "Netcat", "nc -nvlp 4444"), | |
| ( | |
| "socat", | |
| "Socket Cat", | |
| "socat TCP-LISTEN:4444,fork TCP:target:80", | |
| ), | |
| ("openssl", "SSL", "openssl s_client -connect target:443"), | |
| ("proxychains", "Proxy", "proxychains nmap target"), | |
| ("tor", "Anonymity", "service tor start"), | |
| ], | |
| }, | |
| "AI & Core": { | |
| "phase": [1, 2, 3, 4, 5, 6, 7, 8, 9], | |
| "tools": [ | |
| ( | |
| "tool_registry", | |
| "Tool Management", | |
| "Central registry für alle Tools", | |
| ), | |
| ("tool_caller", "Execution", "Async tool execution engine"), | |
| ("kimi_cli", "AI Integration", "Kimi AI für Analyse"), | |
| ], | |
| }, | |
| } | |
| def get_tools_for_phase(cls, phase: int) -> Dict[str, List[str]]: | |
| """Gibt alle Tools für eine bestimmte Phase zurück""" | |
| tools = {} | |
| for category, data in cls.TOOL_CATEGORIES.items(): | |
| if phase in data["phase"]: | |
| tools[category] = [tool[0] for tool in data["tools"]] | |
| return tools | |
| def print_workflow(cls): | |
| """Druckt den kompletten Workflow""" | |
| print("\n" + "=" * 80) | |
| print("🗺️ PENTEST WORKFLOW - 72 TOOLS IN 9 PHASEN") | |
| print("=" * 80) | |
| phases = { | |
| 1: ("🕵️ RECONNAISSANCE", "OSINT & Discovery"), | |
| 2: ("🔍 SCANNING", "Network & Services"), | |
| 3: ("🕸️ WEB TESTING", "Web Applications"), | |
| 4: ("🔐 AUTHENTICATION", "Login & Brute Force"), | |
| 5: ("🏢 ACTIVE DIRECTORY", "Domain Testing"), | |
| 6: ("💥 EXPLOITATION", "Exploits & Shells"), | |
| 7: ("📝 CODE ANALYSIS", "SAST & Secrets"), | |
| 8: ("📡 WIRELESS", "WiFi Testing"), | |
| 9: ("📊 REPORTING", "Documentation"), | |
| } | |
| for phase_num, (phase_name, desc) in phases.items(): | |
| print(f"\n{'─' * 80}") | |
| print(f"PHASE {phase_num}: {phase_name} - {desc}") | |
| print("─" * 80) | |
| phase_tools = cls.get_tools_for_phase(phase_num) | |
| if phase_tools: | |
| for category, tools in phase_tools.items(): | |
| print(f"\n 📁 {category}") | |
| for tool in tools: | |
| print(f" • {tool}") | |
| else: | |
| print(" (Integration in Haupt-Framework)") | |
| print("\n" + "=" * 80) | |
| print("📊 GESAMT: 72 Tools in 12 Kategorien") | |
| print("=" * 80 + "\n") | |
| def main(): | |
| """Zeige kompletten Workflow""" | |
| PentestWorkflow.print_workflow() | |
| # Beispiel: Tools für Phase 1 | |
| print("\n📝 Beispiel: Tools für Phase 1 (Reconnaissance)") | |
| print("-" * 60) | |
| phase1_tools = PentestWorkflow.get_tools_for_phase(1) | |
| for cat, tools in phase1_tools.items(): | |
| print(f"\n{cat}:") | |
| for tool in tools: | |
| print(f" - {tool}") | |
| if __name__ == "__main__": | |
| main() | |
Xet Storage Details
- Size:
- 15.9 kB
- Xet hash:
- 9529e59d48d67c057cde582071b55843894f2c1ff15b5aa8552730a24ddd2e67
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.