Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.
Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.
Path: blob/master/documentation/modules/exploit/linux/http/cisco_rv340_lan.md
Views: 11788
Vulnerable Application
This module exploits two vulnerabilities, an authentication bypass (CVE-2022-20705) and a command injection vulnerability (CVE-2022-20707), to execute code on Cisco RV160, RV260, RV340, and RV345 Small Business Routers prior to 1.0.03.26 as the www-data
user. The command injection occurs in the upload.cgi
script, where user input in the data
POST parameter is passed to curl
without any sanitization. Additionally, the sessionid
session cookie can be abused for a path traversal vulnerability, which can be used to bypass authentication by setting sessionid
to the path to a valid file on the target.
This module has been tested against an RV340 device running firmware version 1.0.03.24. Firmware version 1.0.03.26 patches these vulnerabilities.
Installation
Firmware version 1.0.03.24, which is vulnerable to CVE-2022-20705 and CVE-2022-20707, can be downloaded from https://software.cisco.com/download/home/286287791/type/282465789/release/1.0.03.24
To install this firmware, follow the following directions:
Log into the modem. The default IP address is 192.168.1.1 and the default credentials are
cisco
for the username and password.The
administration
option on the left side of the web page will take you to a form with aManual Upgrade
section.Leave
File Type:
on the defaultFirmware Image
option.Change
Upgrade From:
option toPC
.Press the
Upgrade
button.Press
Yes
on the message box askingAre you sure you want to upgrade the firmware right now?
.Wait for router reboot to complete.
Verification Steps
Install the vulnerable firmware
Start
msfconsole
Do:
use modules/exploits/linux/http/cisco_rv340_lan
Do:
set lhost <listening ip>
Do:
set rhost <target ip>
Do:
exploit
Verify: You see the message
Exploit successfully executed
confirming the exploit completedVerify: You are the
www-data
user using theid
command