(Nov 19, 2012 08:47 AM)The Alchemist16 Wrote: Oh. Sorry mate, I misunderstood you.
The script that I made only checks for GET UNION based SQLi Vulnerability..
For checking blind SQLi vulnerability, this script won't work... And I don't think it'll be easy to make a script that checks for blind SQLi because you need to manually type things like this 0'or'0'='0 and click the submit button..
In my script, if the URL ending with ' does not return an error, the URL is not vulnerable to UNION based GET SQLi....
It can still be vulnerable to Union Based SQL Injection even though the app doesn't give you an error.
Very often the indication if a webapp is vulnerable could be something like that images or text dissapears or you can even get redirected.
A test you could do in addition to checking for SQL Errors could be something like the following (Pseudo-code):
PHP Code
<?php
url-source = getsource("http://target.com/index.php?id=1")
url-source-true = getsource("http://target.com/index.php?id=1" + "+and+1=1--")
url-source-false = getsource("http://target.com/index.php?id=1" + "+and+1=2--")
if(url-source == url-source-true){
if(url-source-true != url-source-false)
output "Target is vulnerable"
}
Ofcourse this test would not be accurate if the website dynamically changes, in that case you could use something like pattern matching to determine if website content disappears or changes.
