您的位置:首页 > 文旅 > 美景 > Sqlmap中文使用手册 - Detection模块参数使用

Sqlmap中文使用手册 - Detection模块参数使用

2024/10/6 10:36:53 来源:https://blog.csdn.net/weixin_39762423/article/details/140535134  浏览:    关键词:Sqlmap中文使用手册 - Detection模块参数使用

目录

  • 1. Detection模块的帮助文档
  • 2. 各个参数的介绍
    • 2.1 --level=LEVEL
    • 2.2 --risk=RISK
    • 2.3 页面对比




1. Detection模块的帮助文档


Detection:These options can be used to customize the detection phase--level=LEVEL       Level of tests to perform (1-5, default 1)--risk=RISK         Risk of tests to perform (1-3, default 1)--string=STRING     String to match when query is evaluated to True--not-string=NOT..  String to match when query is evaluated to False--regexp=REGEXP     Regexp to match when query is evaluated to True--code=CODE         HTTP code to match when query is evaluated to True--smart             Perform thorough tests only if positive heuristic(s)--text-only         Compare pages based only on the textual content--titles            Compare pages based only on their titles


2. 各个参数的介绍


2.1 --level=LEVEL


参数:–level=LEVEL

背景:Level of tests to perform (1-5, default 1)。检测级别。该参数用来指定要执行的测试级别。有1-5五个级别,默认级别为1,级别越高将对更多的payload和边界进行测试。此选项不仅会影响payload,还会影响注入点。

sqlmap使用的payload在xml/payloads.xml文件中指定,如果sqlmap错过了一次注入,也可以添加自己的payload来进行测试。

值:任何级别都会测试GET和POST参数。

作用
–level=1默认为1
–level=2大于等于级别2时测试HTTP Cookie标头值
–level=3大于等于3级时测试HTTP User-Agent / Referer头的值
–level=4
–level=5检测 HOST 头。5级包含的payload最多,会自动破解出cookie、XFF等头部注入,相对应他的速度也比较慢。

检测SQL注入越困难,–level必须设置的越高,建议在无法检测到某个注入点时将此值提高。



2.2 --risk=RISK


参数:–risk=RISK

作用:Risk of tests to perform (1-3, default 1)。风险级别。该参数用于指定测试执行的风险,有三个风险值。

值:

作用
1默认值是1,这对大多数SQL注入点无害。
2风险值2添加了大量基于时间盲注的检测。
3风险值3增加了基于OR的盲注测试。


2.3 页面对比


背景:默认情况下,sqlmap判断true还是false的方法是比较注入的请求页面内容与原始未注入页面内容。但是这个方法并不总是有效,因为有的页面只要刷新就会发生变化,即使你没有注入任何payload,比如页面中含有动态广告。遇到这样的情况,slqmap会尽力判断响应体的片段并处理。但是sqlmap有时并不能正确处理。

参数:

参数作用
–string=STRINGString to match when query is evaluated to True。
使用该参数参数提供一个字符串,该字符串存在于ture页面中,而不在false页面中。
–not-string=NOTString to match when query is evaluated to False。使用该参数可以指定一个字符串,该字符串只存在于false页面中。
–regexp=REGEXPRegexp to match when query is evaluated to True。使用该参数指定一个正则表达式而不是字符串。
–code=CODEHTTP code to match when query is evaluated to True。如果知道ture和false的http状态码不同,还可以使用该参数指定一个状态码。
–titlesCompare pages based only on their titles。如果知道ture和false的页面标题存在不同,还可以使用该参数指定一个title。



版权声明:

本网仅为发布的内容提供存储空间,不对发表、转载的内容提供任何形式的保证。凡本网注明“来源:XXX网络”的作品,均转载自其它媒体,著作权归作者所有,商业转载请联系作者获得授权,非商业转载请注明出处。

我们尊重并感谢每一位作者,均已注明文章来源和作者。如因作品内容、版权或其它问题,请及时与我们联系,联系邮箱:809451989@qq.com,投稿邮箱:809451989@qq.com