Waraxe IT Security Portal  
  Login or Register
::  Home  ::  Search  ::  Your Account  ::  Forums  ::   Waraxe Advisories  ::  Tools  ::
March 29, 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: 9145

People Online:
Visitors: 841
Members: 0
Total: 841
PacketStorm News
·301 Moved Permanently

read more...
Log in Register Forum FAQ Memberlist Search
IT Security and Insecurity Portal

www.waraxe.us Forum Index -> Sql injection -> UNION SELECT possible?
Post new topic  Reply to topic View previous topic :: View next topic 
UNION SELECT possible?
PostPosted: Tue May 25, 2010 11:58 am Reply with quote
tommy
Beginner
Beginner
 
Joined: May 25, 2010
Posts: 2




Hi there,

I discovered an exploitable site.

The URL looks like this: http://www.site.com/list.php?search=asdf

This query gets executed:
SELECT * FROM sometable WHERE somecolumn LIKE '%asdf%';

I tried to use a UNION SELECT (I know the column-count of "sometable"), but the PHP script splits the input by commas (probably using explode() ).

So if I enter search=a,b,c, this query is executed:

SELECT * FROM sometable WHERE somecolumn LIKE '%a%' AND somecolumn LIKE '%b%' AND somecolumn LIKE '%c%';

Can anybody please help me how to use a UNION SELECT here?

Thanks in advance,

tommy
View user's profile Send private message
PostPosted: Tue May 25, 2010 8:01 pm Reply with quote
waraxe
Site admin
Site admin
 
Joined: May 11, 2004
Posts: 2407
Location: Estonia, Tartu




Seems to be complicated case. You can:

1. try to search other sql injections in same website
2. use subselects and blind injection, so that instead of

Code:
zzz' UNION ALL SELECT 1,2,3 4,5


use something like:

Code:
commonword' AND(SELECT COUNT(*)FROM members)>1#


In case of "true" search will return some result, in other case no results.
Basically you will have communication channel with database with bandwith 1 bit per http request Smile
View user's profile Send private message Send e-mail Visit poster's website
UNION SELECT possible?
  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 topic  Reply 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-2020 Janek Vind "waraxe"
Page Generation: 0.121 Seconds