Forum Thread: All About Sql Injection..

All About Sql Injection..

How to defend yourself from SQL injection. All I know is that the attacker upload a PHP script from application form or any form from where you can upload a photo/video/ppt/etc . And then relocate the location of the PHP script by typing the name and location of the file in URL. The PHP script then run and may delete or stole your complete website . According to me the one solution is to put the uploading file in the folders like (62gHgU29hs) . So that the attacker cannot find the location but sometime our website itself start that PHP file so in that condition what can I do.?

7 Responses

Wheres the SQL injection? Sounds like they were able to upload and execute php script. Could you explain a little more details?

Here I am clicking this and hoping for a nice article on SQL injection..

Hey guys its not the tutorial !! I want ur help to defence my website against SQL injection !!

That's why - I am wondering why u guys not giving me replay.

Sorry for that but its not a tutorial..

What you are describing is not a SQL injection. That's XSS (cross site scripting) as far as I know.

For some reason SQL deals with a query like a string and if you put some raw user input into this query you can break it.

i.e. SELECT * FROM tblUser WHERE name = '[userinput]';

So if i enter for [userinput] something like " ' OR '1'='1' -- ", i would ignore the original WHERE statement and make a true statement followed by a commend.

You can do nearly everything you want now, i.e. make own query's.

Sry don't know much about XSS myself

if you use PHP you can make your page safe by using the PDO object. Just google "PHP PDO"

Share Your Thoughts

  • Hot
  • Active