POC详情: dde452673e98c7ac6f561fccdfa0a71d773ac3c3

来源
关联漏洞
标题: Unicode 安全漏洞 (CVE-2021-42694)
描述:Unicode(通用字符集)是美国统一码联盟(Unicode Consortium)组织的一种通用字符编码标准。用于为世界上每种语言的每个字符和符号分配一个代码。 Unicode Specification 14.0 版本及之前版本存在安全漏洞,该漏洞源于该规范允许攻击者使用在视觉上与目标标识符相同的同形文字生成源代码标识符,例如函数名称。 攻击者可以利用这一点,通过在下游软件中欺骗性地调用的上游软件依赖项中的对抗标识符定义来注入代码。
描述
Generate malicious files using recently published homoglyphic-attack (CVE-2021-42694)
介绍
# CVE-2021-42694
Generate malicious files using recently published homoglyph-attack vulnerability, which was discovered at least in C, C++, C#, Go, Python, Rust, JS, ...

Cite from [cve.mitre.org](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-42694)
> An issue was discovered in the character definitions of the Unicode Specification through 14.0. The specification allows an adversary to produce source code identifiers such as function names using homoglyphs that render visually identical to a target identifier. Adversaries can leverage this to inject code via adversarial identifier definitions in upstream software dependencies invoked deceptively in downstream software.

Raw data for homoglyphs (`homoglyphs.txt`) taken from [here](https://github.com/codebox/homoglyph) and cleaned data to sort out italic and dissimilar characters.

See the original source from Camebridge University:<br>
https://www.trojansource.codes/trojan-source.pdf

## Usage
`python3 codegen.py [-h] [-i INFILE] [-o OUTFILE] [-r] [-a]`
| arg | long arg | param | descrption |
|-----|----------|-------|------------|
| -h | --help | none | show this help message and exit |
| -i | --infile | INFILE | Input file containing homoglyph placeholders |
| -o | --outfile | OUTFILE | Output file to store the final code |
| -r | --random | none | SET flag to choose random homoglyph; take first one if not set |
| -a | --about | none | Print about text |

## Examples
Examples were created by me or are takem from the referenced PDF. To run these examples, execute `codegen.py` with the required arguments:

`python3 codegen.py -i infile.xyz -o outfile.xyz` and run/compile `outfile.xyz`.

## Create own template
Currently are only digits [0-9], as well as lower- and uppercase characters [a-zA-Z] supported. To replace a supported char within your template with a (random) homoglyph, simply enclose the char with dollar signs `$`. See the examples to have a first impression on how a template could look like.
文件快照

[4.0K] /data/pocs/dde452673e98c7ac6f561fccdfa0a71d773ac3c3 ├── [2.7K] codegen.py ├── [4.0K] examples │   ├── [ 201] hello_world.cpp │   └── [ 119] hello_world.py ├── [1.5K] homoglyphs.txt ├── [1.2K] LICENSE └── [1.9K] README.md 1 directory, 6 files
神龙机器人已为您缓存
备注
    1. 建议优先通过来源进行访问。
    2. 如果因为来源失效或无法访问,请发送邮箱到 f.jinxu#gmail.com 索取本地快照(把 # 换成 @)。
    3. 神龙已为您对POC代码进行快照,为了长期维护,请考虑为本地POC付费,感谢您的支持。