点击上方蓝字“Ots安全”一起玩耍
Spring4Shell 概念证明/信息
今天一大早,多个消息来源得知流行的 java 框架 spring 中可能存在 RCE 漏洞。
这个漏洞的命名是基于与臭名昭著的 Log4j LOG4Shell 的相似性。暂时没有共享POC
细节
https://www.cyberkendra.com/2022/03/springshell-rce-0-day-vulnerability.html
https://bugalert.org/content/notices/2022-03-29-spring.html
https://websecured.io/blog/624411cf775ad17d72274d16/spring4shell-poc
https://www.springcloud.io/post/2022-03/spring-0day-vulnerability
CVE
尚未分配 cve
缓解措施
!!(以下缓解措施只是理论上的,因为没有得到任何证实)!!
JDK版本低于9
Cyberkendra 告知 JDK 版本低于 JDK 9
您可以通过运行轻松检查
java -version
这将显示与此类似的内容
openjdk version "17.0.2" 2022-01-18
OpenJDK Runtime Environment (build 17.0.2+8-Ubuntu-120.04)
OpenJDK 64-Bit Server VM (build 17.0.2+8-Ubuntu-120.04, mixed mode, sharing)
如果您的 JDK 版本低于 8,您可能是安全的,但尚未确认
下面的文章会更新
检查你是否使用了spring框架
在“spring-beans- .jar ”和“ spring.jar”之后进行全局搜索
find . -name spring-beans*.jar
POC:
在这里找到有趣的 poc:https ://github.com/craig/SpringCore0day/blob/main/exp.py & https://twitter.com/vxunderground/status/1509170582469943303
-
从https://spring.io/guides/gs/handling-form-submission/克隆示例 repo
-
您可以直接跳到 gs-handling-form-submission/complete 目录,无需遵循教程
-
修改它,以便您可以构建一个战争文件(https://www.baeldung.com/spring-boot-war-tomcat-deploy)。建立战争文件:)
-
安装tomcat9 + java 11(我是通过apt-get在ubuntu 20.04上安装的)
-
部署战争文件
-
更新 PoC ( https://share.vx-underground.org/ ) 以将 tomcatwar.jsp 文件写入 webapps/handling-form-submission 而不是 webapps/ROOT
-
运行 PoC(忽略它为 webshell 提供的 URL):python3 exp.py --url http://your.ip.here:8080/handling-form-submission-complete/greeting
-
您现在应该在 webapps/handling-form-submission 中看到“tomcatwar.jsp”文件
-
点击http://your.ip.here:8080/handling-form-submission/tomcatwar.jsp?pwd=j&cmd=id 查看结果在制品 :=)
原文始发于微信公众号(Ots安全):Spring4Shell 概念证明/信息
- 左青龙
- 微信扫一扫
-
- 右白虎
- 微信扫一扫
-
评论