
Docker-basierte Testumgebung zur Validierung von Nuclei-Templates für CVE-2024-23113 gegen simulierte verwundbare FortiOS-Instanzen, die mehrere Versionen und API-Endpunkte unterstützt.
Eine Docker-basierte Testumgebung zur Validierung von CVE-2024-23113 Nuclei-Vorlagen gegen simulierte verwundbare FortiOS-Instanzen.
Diese Umgebung simuliert verwundbare FortiOS-HTTP-Schnittstellen, um die Erkennungsfähigkeiten von CVE-2024-23113 Nuclei-Vorlagen zu testen. Sie liefert realistische FortiOS-Antworten, einschließlich Anmeldeseiten, API-Endpunkte und korrekte Versionsinformationen.
git clone <this-repository>
cd cve-2024-23113-test-env
docker-compose up -d
curl http://localhost:8080/
# Test against vulnerable instance
nuclei -t CVE-2024-23113.yaml -u http://localhost:8080 -v
# Test with debug output
nuclei -t CVE-2024-23113.yaml -u http://localhost:8080 -debug
fortios-vulnerable8080http://localhost:8080# Start patched version for comparison
docker-compose --profile patched up -d
# Start multiple vulnerable versions
docker-compose --profile multiple up -d
| Variable | Beschreibung | Standard |
|---|---|---|
FORTIOS_VERSION | Zu simulierende FortiOS-Version | 7.2.5 |
PORT | Interner Container-Port | 8080 |
# Run specific version
docker run -p 8080:8080 -e FORTIOS_VERSION=7.4.2 cve-2024-23113-test
Die simulierte FortiOS stellt diese Endpunkte bereit:
{
"version": "v7.2.5",
"hostname": "TEST-FORTIGATE",
"serial": "FGTVM1234567890",
"build": 1396,
"model": "FortiGate-VM64"
}
# Test vulnerable versions
nuclei -t CVE-2024-23113.yaml -u http://localhost:8080 # v7.2.5
nuclei -t CVE-2024-23113.yaml -u http://localhost:8082 # v7.4.1
nuclei -t CVE-2024-23113.yaml -u http://localhost:8083 # v7.0.10
# Test patched version (should not detect)
nuclei -t CVE-2024-23113.yaml -u http://localhost:8081 # v7.2.7
# Test all instances
echo -e "http://localhost:8080\nhttp://localhost:8081\nhttp://localhost:8082\nhttp://localhost:8083" | nuclei -t CVE-2024-23113.yaml -l /dev/stdin
# Basic connectivity
curl -v http://localhost:8080/
# API endpoint
curl -s http://localhost:8080/api/v2/monitor/system/status | jq .
# Check headers
curl -I http://localhost:8080/
FortiOS v7.2.5FortiGate-HTTP/v7.2.5"version": "v7.2.5"# Check what's using the port
netstat -tlnp | grep 8080
# Use different port
docker-compose up -d --scale fortios-vulnerable=0
docker run -p 8090:8080 cve-2024-23113-test
# Check logs
docker-compose logs fortios-vulnerable
# Rebuild image
docker-compose build --no-cache
# Check container health
docker ps
docker exec cve-2024-23113-vulnerable curl -f http://localhost:8080/
# View real-time logs
docker-compose logs -f
# Interactive shell
docker exec -it cve-2024-23113-vulnerable /bin/bash
# Test from inside container
docker exec cve-2024-23113-vulnerable curl localhost:8080
Diese Umgebung kann jede dieser verwundbaren Versionen simulieren:
# Test different vulnerable versions
docker run -p 8080:8080 -e FORTIOS_VERSION=7.4.0 cve-2024-23113-test
docker run -p 8081:8080 -e FORTIOS_VERSION=7.0.13 cve-2024-23113-test
# Build image
docker build -t cve-2024-23113-test .
# Run manually
docker run -p 8080:8080 cve-2024-23113-test
Bearbeiten Sie server.py, um Folgendes zu ändern:
Dies ist ausschließlich eine Testumgebung:
Bei Problemen mit dieser Testumgebung:
Denken Sie daran: Diese Umgebung ist nur für autorisierte Sicherheitstests. Stellen Sie immer sicher, dass Sie die Erlaubnis haben, bevor Sie Systeme testen.
| Endpunkt | Beschreibung | Content-Type |
|---|
/ | Hauptanmeldeseite | text/html |
/login | Anmeldeformular | text/html |
/remote/login | Remotezugriffsportal | text/html |
/api/v2/monitor/system/status | Systemstatus-API | application/json |
/api/v2/cmdb/system/global | Globale Konfigurations-API | application/json |