
Damn Small SQLi Scanner
Damn Small SQLi Scanner (DSSS) è uno scanner di vulnerabilità SQL injection completamente funzionante (supporta parametri GET e POST) scritto in meno di 100 righe di codice.
Tra le impostazioni opzionali supporta proxy HTTP insieme ai valori degli header HTTP User-Agent, Referer e Cookie.
$ python3 dsss.py -h
Damn Small SQLi Scanner (DSSS) < 100 LoC (Lines of Code) #v0.4b
by: Miroslav Stampar (@stamparm)
Usage: dsss.py [options]
Options:
--version show program's version number and exit
-h, --help show this help message and exit
-u URL, --url=URL Target URL (e.g. "http://www.target.com/page.php?id=1")
--data=DATA POST data (e.g. "query=test")
--cookie=COOKIE HTTP Cookie header value
--user-agent=UA HTTP User-Agent header value
--referer=REFERER HTTP Referer header value
--proxy=PROXY HTTP proxy address (e.g. "http://127.0.0.1:8080")
$ python3 dsss.py -u "https://sekumart.sekuripy.hr/product.php?id=1"
Damn Small SQLi Scanner (DSSS) < 100 LoC (Lines of Code) #v0.4b
by: Miroslav Stampar (@stamparm)
* scanning GET parameter 'id'
(i) GET parameter 'id' appears to be blind SQLi vulnerable (e.g.: 'https://sekumart.sekuripy.hr/product.php?id=1%20AND%2069%3D69')
scan results: possible vulnerabilities found
Per eseguire questo programma è richiesta la versione 3.x di Python.
La directory tests contiene una suite di regressione basata solo sulla libreria standard. Tutti i target sono locali: un
fixture HTTP incluso serve pagine costruite da un vero database sqlite3 le cui query sono
interpolate come stringhe, quindi le injection trovate sono reali e non è necessario alcun accesso a Internet:
$ python3 -m unittest discover -s tests -v
Gli stessi casi contro un vero MySQL vengono saltati a meno che Docker
e l'immagine non siano disponibili, mentre python3 tests/mutations.py ripristina ogni versione
pre-fix di dsss.py e verifica che la suite se ne accorga.