I have a question I'm hoping you could help with?
I am looking to filter/grep a very long list of spidered url's from my site to only get the url's that could possibly be vulnerable to sql injection.
My question: Is it true to say that any urls that could potentially be vulnerable to sql injection always contain an 'equals' (=) symbol in the url?
Therefore, if I was to grep for all the url's that contain an '=' symbol in the url, would I miss any other url's that do not contain an '=' symbol that could still be vulnerable?
For example these all contain an '=' symbol and could potentially be vulnerable to sql injection.
http://[website]/index.php?itemid=10
http://www.[yoursite].org/site/page.asp?CID=72&DID=
http://www.[mysite].com/site/page.asp?=
Are there any instances where url's do not contain an '=' and are still vulnerable to sql injection?
-------EDIT-------
I am ONLY interested in altering/injecting the URL in my browsers URL bar to see if any URLS in my list are potentially vulnerable to sql injection (i.e not interested in injecting forms or POST requests and so on yet).
I have a list of URLS in a txt file
FILE.txt
http://www.[site].com/index.php?itemid=10
http://www.[site].com/
http://www.[site].com/site/page.asp?CID=72&DID=
http://www.[site].com/animals/pictures
http://www.[site].com/pictures
http://www.[site].com/index.php?itemid=7
http://www.[site].com/faq
I want to filter/grep this txt file so I only get the URLS that contain an '=' symbol as shown below:
FILTEREDFILE.txt
http://www.[site].com/index.php?itemid=10
http://www.[site].com/site/page.asp?CID=72&DID=
http://www.[site].com/index.php?itemid=7
http://www.[site].com/site/page.asp?CID=72&DID=
Using these URLS in the FILTEREDFILE.txt I will then use a foreach
loop to add an apostrophe to the end of each one to see if it is vulnerable to sql injection by looking at the response content lengths to see if there is a change/difference.
I know that even on the URLS and do not contain an '=' that there still may be sql injection vulnerabilities in the forms and POST requests and so on, but I am not interested in those at the moment.
IMPORTANT:
I am only interested in vulnerabilities that can be determined by changing/altering the URL itself (i.e by adding an apostrophe to the end of http://www.[site].com/index.php?itemid=7 and so on).
What I want to know is whether by greping the txt file for URLS that contain an '=' symbol will I miss any URLS that could still be vulnerable that do not contain an '=' symbol. (excluding forms, POSTS, url rewrites, just manipulating the URL in the URL bar)
Hope this better explains my question,
thanks for your help
$_GET
,$_POST
or (often forgotten)$_SERVER
to construct SQL query strings is a potential vulnerability. Also if you read from any files (local or remote). Any data that your scripts use that is not hard coded is potentially subvertable. There are so many ways to get information into a web application.http://www.[site].com/index.php?itemid=10
this will be much preferred.$_GET
variable, and all permutations, as weird combinations could trigger a vulnerability when just trying each variable in turn might not.or
,and
,order by
strings that it will iterate through against each url and then analyse the response content lengths, i just need to know the best method to filter these urls done so i dont have so many, but still keep the ones that may potentially be vulnerbale