Search Exploit

Cisco Prime Infrastructure Unauthenticated Remote Code Execution

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 Metasploit module exploits these vulnerabilities to achieve unauthenticated remote code execution as root on the CPI default installation. This Metasploit module has been tested with CPI 3.2.0.0.258 and 3.4.0.0.348. Earlier and later versions might also be affected, although 3.4.0.0.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.

if res.code == 404 && res.body.length == 0 # at the moment this is the best way to detect # a 404 in swimtemp only returns the error code with a body length of 0, # while a 404 to another webapp or to the root returns code plus a body with content return CheckCode::Detected end

# we land in /opt/CSCOlumos, so we don't know the apache directory # as it changes between versions... so leave this commented for now # ... and try to find a good way to clean it later print_warning "#{jsp_name} must be manually removed from the Apache in /opt/CSCOlumos" # register_files_for_cleanup(jsp_name)