目标达成 感谢每一位支持者 — 我们达成了 100% 目标!

目标: 1000 元 · 已筹: 1336

100%

CVE-2022-34169 PoC — Apache Xalan 输入验证错误漏洞

来源
关联漏洞
标题: Apache Xalan 输入验证错误漏洞 (CVE-2022-34169)
Description:Apache Xalan是美国阿帕奇(Apache)基金会的开源软件库。 Apache Xalan Java XSLT库存在输入验证错误漏洞,该漏洞源于在处理恶意的XSLT样式表时,存在整数截断问题。这可以用来破坏由内部XSLTC编译器生成的Java类文件并执行任意的Java字节码。
Description
https://nvd.nist.gov/vuln/detail/CVE-2022-34169
介绍
# Description

Checks if CVE-2022-34169 is fixed on your machine. As far as I know, an exploit was found by a Google employee and not published. Since the fix is known, a small test routine was written with this to check whether the fix is available at runtime.

# Build yourself (optional)

Optional: This is only available, if you have JDK:

```
# Optional: To see if `javac` is available: `sudo updatedb && sudo locate /bin/javac`
javac Bcel.java
```

The six warnings can be ignored. The code that is flagged is used to include the Bcel library that is available in OpenJDK. If one were to include the Bcel library oneself, it would be a bit more complicated and the version would be predefined - which is not necessarily in the spirit of this exercise.

# Run

```
# `cd` into (built) folder where `Bcel.class` is, then:
java Bcel
```

# Check output


```
echo $?
```

Don't get confused with the error codes. They are the other way round. The Fix https://github.com/openjdk/jdk/commit/41ef2b249073450172e11163a4d05762364b1297?diff=unified#diff-3d2cb29a8f3fca8e2f3421d2898dce63255b850406456533cce91f26dbf8dbe2R217 throws an error with error code 1 and thus catches the security risk. If the fix is not present, the source code runs through without error with error code 0 - but too many elements are created in the object!

* Error code 1 is good! :)
* Error code 0 is bad! :(

# Results

* OpenJDK 1.8.0_72 - Bad :(
* Oracle 1.8.0_131 - Bad :(
* Oracle 1.8.0_202 - Bad :(
* Oracle 1.8.0_212 - Bad :(
* Oracle 1.8.0_341 - Good :)
* OpenJDK 1.8.0_342 - Good :)

文件快照

登录后查看神龙缓存的 POC 文件快照

登录查看
备注
    1. 建议优先通过来源进行访问。
    2. 本地 POC 快照面向订阅用户开放;当原始来源失效或无法访问时,本地镜像作为订阅权益的一部分提供。
    3. 持续抓取、验证、维护这份 POC 档案需要不少投入,因此本地快照已纳入付费订阅。您的订阅是让这份资料能继续走下去的关键,由衷感谢。 查看订阅方案 →