Sql Injection

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • iswar
    New Member
    • Jan 2008
    • 9

    Sql Injection

    How to write a fuction to prevent attack from sql injection? Im using Sql server2000 & asp.net.. please reply faster that how to validate server side input values...

    thank u for the support
  • dip_developer
    Recognized Expert Contributor
    • Aug 2006
    • 648

    #2
    Originally posted by iswar
    How to write a fuction to prevent attack from sql injection? Im using Sql server2000 & asp.net.. please reply faster that how to validate server side input values...

    thank u for the support
    it is not possible to write here the function to prevent sql-injection...... rather you should know in-depth what is a sql-injection and how it can be prevented.....p lenty of possibilities there which could cause your sql to crash......you have to identify those cases and write your own function accordingly.... .....
    read here........... ...


    secondly what do u mean by server side input values????

    Comment

    • Frinavale
      Recognized Expert Expert
      • Oct 2006
      • 9749

      #3
      Originally posted by iswar
      How to write a fuction to prevent attack from sql injection? Im using Sql server2000 & asp.net.. please reply faster that how to validate server side input values...

      thank u for the support
      A few quick things
      • Make sure to validate all information coming from the browser.
      • Use stored proceedures: they are precompiled so that you don't have to create query strings based on the users input (which are compiled along with your sql queries).
      • Remove double quotes (") from user's input
      • Use parameters to indicate that the user's information should be handled as a Parameter instead of part of your sql statement...


      Seeing as these are just a few things mentioned quickly off the top of my head, I strongly recommend checking out the link that dip_developer has posted and doing research on the topic to guard yourself against this type of attack.

      -Frinny

      Comment

      Working...