Cisco Prime Infrastructure CVE-2018-15379 Arbitrary File Upload Vulnerability
A vulnerability in which the HTTP web server for Cisco Prime Infrastructure (PI) has unrestricted directory permissions could allow an unauthenticated, remote attacker to upload an arbitrary file. This file could allow the attacker to execute commands at the privilege level of the user prime. This user does not have administrative or root privileges. The vulnerability is due to an incorrect permission setting for important system directories. An attacker could exploit this vulnerability by uploading a malicious file by using TFTP, which can be accessed via the web-interface GUI. A successful exploit could allow the attacker to run commands on the targeted application without authentication.
Cisco Prime Infrastructure could allow a remote attacker to execute arbitrary commands on the system, caused by an incorrect permission setting for important system directories. By uploading a malicious file by using TFTP, an attacker could exploit this vulnerability to execute commands at the privilege level of the user prime.
Cisco Prime Infrastructure (CPI) contains two basic flaws that when exploited allow an unauthenticated attacker to achieve remote code execution. The first flaw is a file upload vulnerability that allows the attacker to upload and execute files as the Apache Tomcat user; the second is a privilege escalation to root by bypassing execution restrictions in a SUID binary. This module exploits these vulnerabilities to achieve unauthenticated remote code execution as root on the CPI default installation. This module has been tested with CPI 220.127.116.11.258 and 18.104.22.168.348. Earlier and later versions might also be affected, although 22.214.171.124.348 is the latest at the time of writing. The file upload vulnerability should have been fixed in versions 3.4.1 and 3.3.1 Update 02.
msf > use exploit/linux/http/cisco_prime_inf_rce msf exploit(cisco_prime_inf_rce) > show targets ...targets... msf exploit(cisco_prime_inf_rce) > set TARGET <target-id> msf exploit(cisco_prime_inf_rce) > show options ...show and set options... msf exploit(cisco_prime_inf_rce) > exploit