type
status
date
slug
summary
tags
category
icon
password
按照注入点类型分类
- 数字型(整型)注入
- 字符型注入
- 搜索型注入
数字型(整型)注入
- 输入的参数为整数,如ID,年龄,页码等。如果存在注入型漏洞,则为数字型(整型)注入
http://url/user.php?id=8
实际查询代码原型如:select ... from ... where id = $id ..
- 数字型注入测试方法
http://url/user.php?id=8’ | 返回错误,未对单引号做处理 |
http://url/user.php?id=8 and 1=1 | 运行正常 |
http://url/user.php?id=8 and 1=2 | 运行异常 |
字符型注入
- 输入的参数为字符串
- 与数字型注入的区别在于:字符型注入一般要使用单引号来闭合
http://url/test.php?user=admin
实际查询代码原型如:select ... from ... where id = ‘$id’ ...
- 字符型注入测试方法
http://url/user.php?user=admin’ | 返回错误 |
http://url/user.php?user=admin’ and ‘1’ = ‘1 | 运行正常 |
http://url/user.php?user=admin’ and ‘1’ = ‘2 | 运行异常 |
搜索型注入
- 这类注入主要是指在进行数据搜索时没过滤搜索参数,一般在链接地址中有”keyword=关键字“,有的不显示链接地址,而是直接通过搜索框表单提交。
- 此类注入点提交的SQL语句,其原型为:select * from 表明 where 字段 like ’%关键字%‘
- 当我们提交注入参数为keyword=’and[查询条件] and ’%’=‘,则向数据库提交的SQL语句为:select * from 表名 where 字段 like ‘%’ and [查询条件] and ‘%’=’%’
按照注入技术(执行效果)分类
基于布尔的盲注
可以根据返回页面判断条件真假的注入
基于时间的盲注
不能根据页面返回内容判断任何信息,用条件语句查看时间延迟语句是否执行(即页面返回时间是否增加)来判断
基于报错注入
即页面会返回错误信息,或者把注入的语句的结果直接返回在页面中
联合查询注入
可以使用union的情况下的注入
堆查询注入
同时执行多条语句的注入
- Author:KingCode
- URL:https://kingcode.dpdns.org/article/dea337fc-adf6-484f-bd7c-d3ab931e38e2
- Copyright:All articles in this blog, except for special statements, adopt BY-NC-SA agreement. Please indicate the source!









