
SonicWall-Sicherheitsaudit-Toolkit mit verwundbarem CTF-Labor (CVE-2021-20038, CVE-2024-53704)
Automatisiertes Framework zur Sicherheitsbewertung für SonicWall-Geräte. Nur für autorisierte Penetrationstest-Aufträge.
# Install dependencies
pip install -r requirements.txt
# Run all modules against a target
python3 sonicwall_audit.py --target 192.168.1.1 --port 8443
# Run specific modules
python3 sonicwall_audit.py -t 192.168.1.1 -p 8443 -m ssl,cve
# Verbose output
python3 sonicwall_audit.py -t 192.168.1.1 -p 8443 -v
# JSON-only output
python3 sonicwall_audit.py -t 192.168.1.1 -p 8443 --format json
| Modul | Beschreibung | Risikostufe |
|---|---|---|
ssl | SSL/TLS-Konfiguration: Zertifikate, Protokolle, Cipher, HSTS | Passiv |
cve | Erkennung bekannter CVEs per Fingerprinting | Passiv |
auth | Standard-Anmeldedaten, Sitzungssicherheit, Rate-Limiting | Aktiv (niedrig) |
web | Header, Informationsoffenlegung, API-Exposition, Methoden | Passiv/Aktiv |
ssl)cve)auth)web)Berichte werden unter reports/ gespeichert (konfigurierbar mit --output-dir):
sonicwall_audit_YYYYMMDD_HHMMSS.json — Maschinenlesbarsonicwall_audit_YYYYMMDD_HHMMSS.txt — Menschenlesbar mit Schweregrad-Einstufungen| Code | Bedeutung |
|---|---|
| 0 | Keine kritischen oder hohen Befunde |
| 1 | Befunde mit hohem Schweregrad |
| 2 | Kritische Befunde |
Ein Docker-basiertes Übungslabor mit real ausnutzbaren Schwachstellen, das zwei kritische SonicWall-CVEs simuliert. Beide Container reproduzieren reale SonicWall-Antwortmuster, sodass das Audit-Toolkit gegen sie getestet werden kann.
cd lab && docker-compose up --build -d
| Container | Port | CVE | Challenge |
|---|---|---|---|
sonicwall-sma100 | 8443 | CVE-2021-20038 | Stack-Pufferüberlauf in CGI-Binärdatei → RCE |
sonicwall-sslvpn |
Exploit-Gerüste befinden sich in lab/exploits/, funktionierende Lösungen in lab/solutions/.
Vollständiger Walkthrough: lab/WALKTHROUGH.md
sonicwall/
├── sonicwall_audit.py # Main entry point / orchestrator
├── validate_cves.py # Standalone CVE validator
├── requirements.txt
├── configs/
│ └── default.json # Default configuration
├── modules/
│ ├── base.py # Shared base class + HTTP utilities
│ ├── ssl_audit.py # SSL/TLS auditor
│ ├── cve_scanner.py # Known CVE scanner
│ ├── auth_tester.py # Authentication tester
│ ├── web_interface.py # Web interface auditor
│ ├── report_generator.py # JSON + text report output
│ ├── cve_2021_20038_validator.py # CVE-2021-20038 deep validator
│ └── cve_2024_53704_validator.py # CVE-2024-53704 deep validator
├── lab/ # Vulnerable practice lab (Docker)
│ ├── docker-compose.yml
│ ├── WALKTHROUGH.md
│ ├── cve-2021-20038/ # Buffer overflow container
│ ├── cve-2024-53704/ # Auth bypass container
│ ├── exploits/ # Skeleton exploits (fill in the blanks)
│ └── solutions/ # Working exploits (spoilers)
└── reports/ # Generated reports
# Returns non-zero exit code on critical/high findings
python3 sonicwall_audit.py -t $TARGET -p 8443 --format json -m ssl,cve,web
echo $? # 0=pass, 1=high, 2=critical
Bearbeiten Sie modules/cve_scanner.py und fügen Sie Einträge zu SONICWALL_CVES hinzu:
{
"cve": "CVE-YYYY-NNNNN",
"cvss": 9.8,
"severity": "CRITICAL",
"title": "Description",
"description": "Full description",
"check": "_check_cve_yyyy_nnnnn", # method name
"remediation": "Update to version X.",
"affected_products": ["SonicOS"],
}
Implementieren Sie anschließend die entsprechende Methode _check_cve_yyyy_nnnnn(self, cve_info).
| 4433 |
| CVE-2024-53704 |
| SSLVPN-Authentifizierungsumgehung per Cookie-Fälschung |