
SleuthQL is a Python 3-based tool used to batch crawl site URLs that may contain SQL injection. It can also be combined with Burp + sqlmap for batch injection. Compared to the manual, single-threaded, one-by-one identification of injection points with sqlmap, it is much more convenient.
SleuthQL 是一个 python3 脚本,用于识别包含类 SQL 语法的参数和值。一旦识别出来,SleuthQL 会在每个识别出类 SQL 变量的参数中插入 SQLMap 标识符 (*)。
SleuthQL 需要 Burp 的代理历史记录导出文件。要获得此导出,只需导航到您的代理历史记录选项卡,高亮所有项并点击“Save Items”。确保每个请求都是使用 base64 编码保存的。当 SleuthQL 扫描代理历史记录文件时,除了常规的 URL 参数外,它还能识别来自以下请求内容类型的易受攻击参数:
application/jsonapplication/x-www-form-urlencodedmultipart/form-data在某些情况下,该工具会失效。也就是说,如果存在嵌套的内容类型(例如 JSON 数据中的 base64 编码参数),它将无法识别这些参数。它也不涵盖 Cookies,因为像 CloudFlare 这样的东西经常会标记我们不感兴趣的参数。
Burp Pro 的扫描器很棒,但不如 SQLMap 功能完整。因此,如果我们能够以批量方式确定向 SQLMap 输入的请求优先级,并以这种方式查找结果,就可以提高 SQL 注入的检测率。
Usage:
.:/+ssyyyyyyso+/:.
-/s s/.
.+| SleuthQL |y+.
-s| SQL Injection Discovery Tool |s-
.shh| |ohs.
+hhhho+shhhhhhhhhhhs/hhhhhhhhhhhhhhhh.-hh/
`shhhhhhy:./yo/:---:/:`hhhhhhhhhhhhhhhs``ohho
shhhhhhhhh-`-//::+os: +hhhhhhhhh+shhhh.o-/hhho
+hhhhhhhhh:+y/.:shy/ /hhhhhhhhh/`ohhh-/h-/hhhh/
.hhhhhhhhhsss`.yhhs` .shhhhhhhh+-o-hhh-/hh`ohhhhh`
+hhhhhhhhhhhhyoshh+. `shhhhhs/-oh:ohs.ohh+`hhhhhh/
shhhhhhhhhhhhhhhhhhh/ -//::+yhy:oy::yhhy`+hhhhhho
yhhhhhhhhhhhhhhhhhhh:-:. `+y+-/:/yhhhy.-hhhhhhhs
shhhhhhhhhhhhhhhhhhh+ :/o+:.`` -hhhhhs`.hhhhhhhho
+hhhhhhhhhs/hhhhhhhhhhy::/:/yhhhy: .+yy/ :hhhhhhhhh/
.hhhhhhh:.hhhhhhhhhhhhhhhhhhhhhhs/- -shhhhhhhhhh`
+hhhhhh+ /hhhhhhhhhhhhhhhhhhhhho/:`+hhhhhhhhhhh/
shhhhy+ -shhhhhhhhhhhhhhhhhhh.// yhhhhhhhhhho
`ohh+://+/.`-/++ooooooooooyhhhhy.`hhhhhhhhhho
/hhhhhhhhhso++//+++oooo+:`sh+`-yhhhhhhhhh/
.s s.
-s Rhino Security Labs s-
.+y Dwight Hohnstein y+.
./s s/.
.:/+osyyyyyyso+/-.
sleuthql.py -d example.com -f burpproxy.xml
SleuthQL is a script for automating the discovery of requests matching
SQL-like parameter names and values. When discovered, it will display
any matching parameters and paths that may be vulnerable to SQL injection.
It will also create a directory with SQLMap ready request files.
Options:
-h, --help show this help message and exit
-d DOMAINS, --domains=DOMAINS
Comma separated list of domains to analyze. i.e.:
google.com,mozilla.com,rhinosecuritylabs.com
-f PROXY_XML, --xml=PROXY_XML
Burp proxy history xml export to parse. Must be base64
encoded.
-v, --verbose Show verbose errors that occur during parsing of the
input XML.
对于每个可能易受攻击的请求,SQLMap 参数化请求将以文本文件形式保存在 $(pwd)/$domain/ 下。
此代码根据 BSD 3-Clause Clear License 许可,该许可限制了此代码的责任、保证和专利使用。有关更多详细信息,请参阅 license.txt。