Home Upgrade Search Memberlist Extras Hacker Tools Award Goals Help Wiki Contact

PHP 

The Alchemist's SQLi Vulnerability Scanner

(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"
} 
This would be an indication that the target is vulnerable to either Union, Error or Blind SQL Injection.
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.


Possibly Related Threads...
Thread / Author Replies Views Last Post
[PHP] by -zERAiTMar 29, 2015 03:12 PM 4 274 Mar 29, 2015 03:12 PM
Last Post: notM9
[PHP] by SaxyMadaFakaMay 15, 2014 02:08 AM 3 451 May 15, 2014 02:08 AM
Last Post: #RockY
[PHP] by RieqyNS13Aug 5, 2013 10:47 AM 2 283 Aug 5, 2013 10:47 AM
Last Post: RieqyNS13