
Un ambiente di test basato su Docker per validare i template Nuclei di CVE-2024-23113 contro istanze FortiOS vulnerabili simulate.
Questo ambiente simula interfacce HTTP FortiOS vulnerabili per testare le capacità di rilevamento dei template Nuclei di CVE-2024-23113. Fornisce risposte FortiOS realistiche, incluse pagine di login, endpoint API e informazioni di versione corrette.
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
| Variabile | Descrizione | Predefinito |
|---|---|---|
FORTIOS_VERSION | Versione FortiOS da simulare | 7.2.5 |
PORT | Porta interna del container | 8080 |
# Run specific version
docker run -p 8080:8080 -e FORTIOS_VERSION=7.4.2 cve-2024-23113-test
Il FortiOS simulato fornisce questi endpoint:
{
"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
Questo ambiente può simulare una qualsiasi di queste versioni vulnerabili:
# 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
Modifica server.py per modificare:
Questo è solo un ambiente di test:
Per problemi con questo ambiente di test:
Ricorda: Questo ambiente è esclusivamente per test di sicurezza autorizzati. Assicurati sempre di avere il permesso prima di testare qualsiasi sistema.
| Endpoint | Descrizione | Content-Type |
|---|
/ | Pagina di login principale | text/html |
/login | Modulo di login | text/html |
/remote/login | Portale di accesso remoto | text/html |
/api/v2/monitor/system/status | API di stato del sistema | application/json |
/api/v2/cmdb/system/global | API di configurazione globale | application/json |