944,174 Members | Top Members by Rank

Ad:
  • ASP Discussion Thread
  • Unsolved
  • Views: 3286
  • ASP RSS
Oct 27th, 2007
0

SQl Injection through ASP and MS SQl 2000

Expand Post »
Hello,


I have heard a lot about SQL Injection. I was wondering how does an injector come to know about the table/column name when they cannot see the asp codes in a website?

Can someone explain plz?



Thanx
Similar Threads
Reputation Points: 58
Solved Threads: 1
Posting Whiz in Training
cancer10 is offline Offline
234 posts
since Dec 2004
Oct 27th, 2007
0

Re: SQl Injection through ASP and MS SQl 2000

You do not need to know the column names. If you pull information from an open source, like a querystring, and directly insert it into your sql statement, like below, they can add bad stuff to it... like below:
ASP Syntax (Toggle Plain Text)
  1. <%
  2. strRequest = Request.QueryString("query")
  3. strSQL = "SELECT column FROM table WHERE column2='" & strRequest & "'"
  4.  
  5. 'This is why it is bad below:
  6. strRequest = "stories from';DROP...;"
  7. 'Imaging with me, when they insert this and get it right, they deleted your entire table and all your data. Names are not as hard to guess as most would think.
  8. 'Try running the code to remove certain words like "drop" ";" "alter" "create" etc, if you have to pull from a querystring.
Reputation Points: 43
Solved Threads: 68
Veteran Poster
SheSaidImaPregy is offline Offline
1,080 posts
since Sep 2007
Nov 9th, 2007
0

Re: SQl Injection through ASP and MS SQl 2000

If you are interested in reading a good piece on SQL Injection that tells you how to hack into sites that don't protect themselves against such attacks and (what is more important) how to protect your site against such attacts, let me share a URL with you:

http://ocliteracy.com/techtips/sql-injection.html

This article is easy to read. It takes you on a step by step journey through the hacker's thought process and how he can succeed in creating havoc. It also tells you what you can do to defend you site against such attacks.

Hope this helps.

Hoppy
Reputation Points: 53
Solved Threads: 13
Junior Poster
hopalongcassidy is offline Offline
148 posts
since Oct 2007

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in ASP Forum Timeline: parameter passing thru on click for different buttons
Next Thread in ASP Forum Timeline: Provide downloads after authentication





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC