Irish SEO,  Marketing & Webmaster Discussion

 

SQL Injections

This is a discussion on SQL Injections within the Coding Help forums, part of the Webmaster Help category; I'm looking for a query that will show, say the tables in the database to a site just to test ...


Go Back   Irish SEO, Marketing & Webmaster Discussion > Webmaster Help > Coding Help

Register Forum Rules FAQDonate Calendar Search Today's Posts Mark Forums Read

  #1 (permalink)  
Old 16-10-2008, 09:26 PM
ziycon's Avatar
Wannabe Geek
 
Join Date: Jan 2007
Location: Dublin
Posts: 427
Nominated 0 Times in 0 Posts
TOTW/F/M Award(s): 0
ziycon will become famous soon enough
Send a message via MSN to ziycon
Default SQL Injections

I'm looking for a query that will show, say the tables in the database to a site just to test my own sites against SQL injection attacks.

If you wouldn't mind pm'ing me the actual reply as i know its not the type of information you should just throw out there!

Thanks in advance.
__________________
Irish Gaming Network
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #2 (permalink)  
Old 16-10-2008, 11:25 PM
blacknight's Avatar
Web Slave
 
Join Date: Jan 2006
Location: Ireland
Posts: 7,241
blacknight will become famous soon enoughblacknight will become famous soon enoughblacknight will become famous soon enoughblacknight will become famous soon enoughblacknight will become famous soon enoughblacknight will become famous soon enoughblacknight will become famous soon enoughblacknight will become famous soon enough
Default

You want a query to show you the tables or you want a query that will show you more?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #3 (permalink)  
Old 16-10-2008, 11:26 PM
ziycon's Avatar
Wannabe Geek
 
Join Date: Jan 2007
Location: Dublin
Posts: 427
Nominated 0 Times in 0 Posts
TOTW/F/M Award(s): 0
ziycon will become famous soon enough
Send a message via MSN to ziycon
Default

Quote:
Originally Posted by blacknight View Post
You want a query to show you the tables or you want a query that will show you more?
Well basically a query that will show if SQL injection attack will work on my site or not if you get me!? I need to see what people can see and change.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #4 (permalink)  
Old 22-10-2008, 10:48 AM
cal cal is offline
Frontpage User
 
Join Date: Oct 2008
Posts: 16
Nominated 0 Times in 0 Posts
TOTW/F/M Award(s): 0
cal will become famous soon enough
Default

It depends on the database you are using. I presume that you are using parameters on your urls? If you are using stored procs this would not be an issue. If you are building sql string then it may be.

Injection attacks take the form of appending pieces of SQL which are always true onto your param i.e. OR 1=1, so you sql becomes something like select * from mytable where custid=3232 or 1=1 which brings back all customers.

To get a list of tables you would need to try and append a UNION query to the string. select * from mytable where custid=3232 UNION select tablename from sysobjects where xtype = 'U'. Doubt this would work as the columns would not match. Maybe if you could work out the columns that the customer query brought back and aliased the second query column to the same name/numbers. It would be messy and unlikely to work.

Also, the user that you run your sql should have as little permissions as possible - not the admin!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Reply

Tags
injections, sql

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



Sponsored links

Pepperjam Network
Paid On Results www.zanox.com


All times are GMT +1. The time now is 06:43 PM.


Powered by: vBulletin Version 3.8.2, Copyright ©2000 - 2009, Jelsoft Enterprises Limited.
Hosted in Ireland by Blacknight - Test your ISP |Irish Hosting Directory| Armchair.ie|Logo by Eden Web Design|Avatars by Afterglow |Latest Blog Entries | VPS HostingAd Management by RedTyger

Search Engine Friendly URLs by vBSEO 3.3.0

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51