This module exploits command injection vulnerabilities and an insecure default sudo configuration on VyOS versions 1.0.0 <= 1.1.8 to execute arbitrary system commands as root. VyOS features a `restricted-shell` system shell intended for use by low privilege users with operator privileges. This module exploits a vulnerability in the `telnet` command to break out of the restricted shell, then uses sudo to exploit a command injection vulnerability in `/opt/vyatta/bin/sudo-users/vyatta-show-lldp.pl` to execute commands with root privileges. This module has been tested successfully on VyOS 1.1.8 amd64 and VyOS 1.0.0 i386.
Exploit database
Vulnerability
CVE-2018-18556
Vulnerability details
- Score
- 9.9
- Severity
- critical
CVSS 3.1 · NVD
Vector string
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:HDescription
A privilege escalation issue was discovered in VyOS 1.1.8. The default configuration also allows operator users to execute the pppd binary with elevated (sudo) permissions. Certain input parameters are not properly validated. A malicious operator user can run the binary with elevated permissions and leverage its improper input validation condition to spawn an attacker-controlled shell with root privileges.
CVE ProgramExploit source choices
1 sourceVyOS restricted-shell Escape and Privilege Escalation
2018-11-05vyos_restricted_shell_privesc.rb