Vulnerabilities > CVE-2019-1652 - Improper Input Validation vulnerability in Cisco Rv320 Firmware and Rv325 Firmware
Summary
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.
Vulnerable Configurations
Part | Description | Count |
---|---|---|
OS | 2 | |
Hardware | 2 |
Common Weakness Enumeration (CWE)
Common Attack Pattern Enumeration and Classification (CAPEC)
- Buffer Overflow via Environment Variables This attack pattern involves causing a buffer overflow through manipulation of environment variables. Once the attacker finds that they can modify an environment variable, they may try to overflow associated buffers. This attack leverages implicit trust often placed in environment variables.
- Server Side Include (SSI) Injection An attacker can use Server Side Include (SSI) Injection to send code to a web application that then gets executed by the web server. Doing so enables the attacker to achieve similar results to Cross Site Scripting, viz., arbitrary code execution and information disclosure, albeit on a more limited scale, since the SSI directives are nowhere near as powerful as a full-fledged scripting language. Nonetheless, the attacker can conveniently gain access to sensitive files, such as password files, and execute shell commands.
- Cross Zone Scripting An attacker is able to cause a victim to load content into their web-browser that bypasses security zone controls and gain access to increased privileges to execute scripting code or other web objects such as unsigned ActiveX controls or applets. This is a privilege elevation attack targeted at zone-based web-browser security. In a zone-based model, pages belong to one of a set of zones corresponding to the level of privilege assigned to that page. Pages in an untrusted zone would have a lesser level of access to the system and/or be restricted in the types of executable content it was allowed to invoke. In a cross-zone scripting attack, a page that should be assigned to a less privileged zone is granted the privileges of a more trusted zone. This can be accomplished by exploiting bugs in the browser, exploiting incorrect configuration in the zone controls, through a cross-site scripting attack that causes the attackers' content to be treated as coming from a more trusted page, or by leveraging some piece of system functionality that is accessible from both the trusted and less trusted zone. This attack differs from "Restful Privilege Escalation" in that the latter correlates to the inadequate securing of RESTful access methods (such as HTTP DELETE) on the server, while cross-zone scripting attacks the concept of security zones as implemented by a browser.
- Cross Site Scripting through Log Files An attacker may leverage a system weakness where logs are susceptible to log injection to insert scripts into the system's logs. If these logs are later viewed by an administrator through a thin administrative interface and the log data is not properly HTML encoded before being written to the page, the attackers' scripts stored in the log will be executed in the administrative interface with potentially serious consequences. This attack pattern is really a combination of two other attack patterns: log injection and stored cross site scripting.
- Command Line Execution through SQL Injection An attacker uses standard SQL injection methods to inject data into the command line for execution. This could be done directly through misuse of directives such as MSSQL_xp_cmdshell or indirectly through injection of data into the database that would be interpreted as shell commands. Sometime later, an unscrupulous backend application (or could be part of the functionality of the same application) fetches the injected data stored in the database and uses this data as command line arguments without performing proper validation. The malicious data escapes that data plane by spawning new commands to be executed on the host.
Exploit-Db
file exploits/hardware/remote/46655.rb id EDB-ID:46655 last seen 2019-04-03 modified 2019-04-03 platform hardware port published 2019-04-03 reporter Exploit-DB source https://www.exploit-db.com/download/46655 title Cisco RV320 and RV325 - Unauthenticated Remote Code Execution (Metasploit) type remote file exploits/hardware/webapps/46243.txt id EDB-ID:46243 last seen 2019-01-25 modified 2019-01-25 platform hardware port published 2019-01-25 reporter Exploit-DB source https://www.exploit-db.com/download/46243 title Cisco RV320 Dual Gigabit WAN VPN Router 1.4.2.15 - Command Injection type webapps
Metasploit
description | 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. |
id | MSF:EXPLOIT/LINUX/HTTP/CISCO_RV32X_RCE |
last seen | 2020-06-14 |
modified | 2019-03-20 |
published | 2019-01-31 |
references |
|
reporter | Rapid7 |
source | https://github.com/rapid7/metasploit-framework/blob/master//modules/exploits/linux/http/cisco_rv32x_rce.rb |
title | Cisco RV320 and RV325 Unauthenticated Remote Code Execution |
Nessus
NASL family CGI abuses NASL id CISCO-SA-20190123-RV-INFO_DIRECT.NASL description The remote Cisco Small Business router is affected by a remote information disclosure vulnerability. A remote, unauthenticated attacker can exploit this, via a simple HTTP GET or POST request, to obtain the configuration of the router. This configuration includes device credentials in the form of a plaintext username and an MD5 hashed password that is trivial to crack. These credentials could then be used to authenticate to the router and can be leveraged with a command injection vulnerability (CVE-2019-1652) to allow an attacker to execute arbitrary commands. last seen 2020-06-01 modified 2020-06-02 plugin id 121395 published 2019-01-25 reporter This script is Copyright (C) 2019 and is owned by Tenable, Inc. or an Affiliate thereof. source https://www.tenable.com/plugins/nessus/121395 title Cisco Small Business RV320 and RV325 Routers Information Disclosure Vulnerability (cisco-sa-20190123-rv-info) (remote check) code # # (C) Tenable Network Security, Inc. # include("compat.inc"); if (description) { script_id(121395); script_version("1.9"); script_cvs_date("Date: 2019/11/01 9:24:56"); script_cve_id("CVE-2019-1653"); script_bugtraq_id(106732); script_xref(name:"CISCO-SA", value:"cisco-sa-20190123-rv-info"); script_xref(name:"CISCO-BUG-ID", value:"CSCvg85922"); script_xref(name:"IAVA", value:"2019-A-0356"); script_xref(name:"IAVA", value:"0001-A-0009"); script_name(english:"Cisco Small Business RV320 and RV325 Routers Information Disclosure Vulnerability (cisco-sa-20190123-rv-info) (remote check)"); script_summary(english:"Attempts to obtain the router configuration."); script_set_attribute(attribute:"synopsis", value: "The remote device is affected by an information disclosure vulnerability."); script_set_attribute(attribute:"description", value: "The remote Cisco Small Business router is affected by a remote information disclosure vulnerability. A remote, unauthenticated attacker can exploit this, via a simple HTTP GET or POST request, to obtain the configuration of the router. This configuration includes device credentials in the form of a plaintext username and an MD5 hashed password that is trivial to crack. These credentials could then be used to authenticate to the router and can be leveraged with a command injection vulnerability (CVE-2019-1652) to allow an attacker to execute arbitrary commands."); # https://tools.cisco.com/security/center/content/CiscoSecurityAdvisory/cisco-sa-20190123-rv-info script_set_attribute(attribute:"see_also", value:"http://www.nessus.org/u?2764da3f"); # https://www.redteam-pentesting.de/en/advisories/rt-sa-2018-002/-cisco-rv320-unauthenticated-configuration-export script_set_attribute(attribute:"see_also", value:"http://www.nessus.org/u?f0f4af0a"); script_set_attribute(attribute:"see_also", value:"https://seclists.org/fulldisclosure/2019/Mar/59"); script_set_attribute(attribute:"see_also", value:"https://github.com/0x27/CiscoRV320Dump"); script_set_attribute(attribute:"solution", value: "Refer to Cisco bug ID CSCvg85922 for any available patches, or contact the vendor for a fix."); script_set_cvss_base_vector("CVSS2#AV:N/AC:L/Au:N/C:P/I:N/A:N"); 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:N/UI:N/S:U/C:H/I:N/A:N"); script_set_cvss3_temporal_vector("CVSS:3.0/E:F/RL:O/RC:C"); script_set_attribute(attribute:"cvss_score_source", value:"CVE-2019-1653"); 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:'Cisco RV320 and RV325 Unauthenticated Remote Code Execution'); script_set_attribute(attribute:"exploit_framework_metasploit", value:"true"); script_set_attribute(attribute:"exploited_by_nessus", value:"true"); script_set_attribute(attribute:"in_the_news", value:"true"); script_set_attribute(attribute:"vuln_publication_date", value:"2019/01/23"); script_set_attribute(attribute:"patch_publication_date", value:"2019/01/23"); script_set_attribute(attribute:"plugin_publication_date", value:"2019/01/25"); script_set_attribute(attribute:"plugin_type", value:"remote"); script_set_attribute(attribute:"cpe", value:"cpe:/h:cisco:rv320_dual_gigabit_wan_vpn_router"); script_set_attribute(attribute:"cpe", value:"cpe:/h:cisco:rv320_dual_gigabit_wan_wf_vpn_router"); script_set_attribute(attribute:"cpe", value:"cpe:/h:cisco:rv325_dual_gigabit_wan_vpn_router"); script_set_attribute(attribute:"cpe", value:"cpe:/h:cisco:rv325_dual_gigabit_wan_wf_vpn_router"); script_set_attribute(attribute:"stig_severity", value:"I"); script_end_attributes(); script_category(ACT_ATTACK); script_family(english:"CGI abuses"); script_copyright(english:"This script is Copyright (C) 2019 and is owned by Tenable, Inc. or an Affiliate thereof."); script_dependencies("http_version.nasl"); script_exclude_keys("Settings/disable_cgi_scanning"); script_require_ports("Services/www", 443, 8000, 8007, 8081, 8443); exit(0); } include("global_settings.inc"); include("misc_func.inc"); include("http.inc"); include("webapp_func.inc"); include("audit.inc"); include("data_protection.inc"); app = "Cisco Small Business RV320 Series Router"; port = get_http_port(default:443); # sanity check this is likely to be RV320/RV325 res = http_get_cache(item:'/', port:port, exit_on_fail:TRUE); if ('<form name="form_contents" method="post" action="/cgi-bin/userLogin.cgi">' >!< res || '<input type="hidden" name="portalname" value="CommonPortal">' >!< res || '<input type="hidden" name="auth_key"' >!< res) { audit(AUDIT_WEB_FILES_NOT, app, port); } item = '/cgi-bin/config.exp'; res = http_send_recv3(method:'GET', item:item, port:port); if (isnull(res) || '####sysconfig####' >!< res[2] || 'MODEL=' >!< res[2] || 'PASSWD=' >!< res[2]) { res = http_send_recv3(method:'POST', item:item, data:'submitbkconfig=0', port:port); if (isnull(res) || '####sysconfig####' >!< res[2] || 'MODEL=' >!< res[2] || 'PASSWD=' >!< res[2]) { audit(AUDIT_LISTEN_NOT_VULN, app, port); } else method = 'POST'; } else method = 'GET'; output = data_protection::sanitize_user_full_redaction(output:res[2]); trailer = 'Which returns the following page via a ' + method + ' request:\n\n' + output; report = get_vuln_report(items:item, port:port, trailer:trailer); security_report_v4(severity:SECURITY_WARNING, port:port, extra:report);
NASL family CISCO NASL id CISCO-SA-20190123-RV-INJECT.NASL description According to its self-reported version, this Cisco Small Business RV Series router is affected by multiple vulnerabilities: - 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. (CVE-2019-1652) - A vulnerability in the web-based management interface of Cisco Small Business RV320 and RV325 Dual Gigabit WAN VPN Routers could allow an unauthenticated, remote attacker to retrieve sensitive information.The vulnerability is due to improper access controls for URLs. An attacker could exploit this vulnerability by connecting to an affected device via HTTP or HTTPS and requesting specific URLs. A successful exploit could allow the attacker to download the router configuration or detailed diagnostic information. (CVE-2019-1653) Please see the included Cisco BIDs and Cisco Security Advisory for more information last seen 2020-06-01 modified 2020-06-02 plugin id 124060 published 2019-04-15 reporter This script is Copyright (C) 2019 and is owned by Tenable, Inc. or an Affiliate thereof. source https://www.tenable.com/plugins/nessus/124060 title Cisco Small Business RV320 and RV325 Routers Multiple Vulnerabilities (cisco-sa-20190123-rv-inject, cisco-sa-20190123-rv-info)
Packetstorm
data source https://packetstormsecurity.com/files/download/152262/rt-sa-2019-005.txt id PACKETSTORM:152262 last seen 2019-03-28 published 2019-03-27 reporter redteam-pentesting.de source https://packetstormsecurity.com/files/152262/Cisco-RV320-Command-Injection.html title Cisco RV320 Command Injection data source https://packetstormsecurity.com/files/download/152305/cisco_rv32x_rce.rb.txt id PACKETSTORM:152305 last seen 2019-03-30 published 2019-03-30 reporter Philip Huppert source https://packetstormsecurity.com/files/152305/Cisco-RV320-RV325-Unauthenticated-Remote-Code-Execution.html title Cisco RV320 / RV325 Unauthenticated Remote Code Execution data source https://packetstormsecurity.com/files/download/151313/rt-sa-2018-004.txt id PACKETSTORM:151313 last seen 2019-01-29 published 2019-01-24 reporter redteam-pentesting.de source https://packetstormsecurity.com/files/151313/Cisco-RV320-Command-Injection.html title Cisco RV320 Command Injection
The Hacker News
id | THN:F4C5F017FE55E40DF427E75D001F7D91 |
last seen | 2019-01-28 |
modified | 2019-01-28 |
published | 2019-01-28 |
reporter | The Hacker News |
source | https://thehackernews.com/2019/01/hacking-cisco-routers.html |
title | New Exploit Threatens Over 9,000 Hackable Cisco RV320/RV325 Routers Worldwide |
Related news
References
- http://packetstormsecurity.com/files/152262/Cisco-RV320-Command-Injection.html
- http://packetstormsecurity.com/files/152305/Cisco-RV320-RV325-Unauthenticated-Remote-Code-Execution.html
- http://seclists.org/fulldisclosure/2019/Mar/61
- http://www.securityfocus.com/bid/106728
- https://seclists.org/bugtraq/2019/Mar/55
- https://tools.cisco.com/security/center/content/CiscoSecurityAdvisory/cisco-sa-20190123-rv-inject
- https://www.exploit-db.com/exploits/46243/
- https://www.exploit-db.com/exploits/46655/