Skip to content
KitploitKITPLOIT
工具博客
提交
工具博客
提交

黑客、渗透测试和网络安全工具,武装您的安全武器库!

Kitploit 是一个黑客、网络安全和渗透测试工具的目录。发现最新的项目更新,查找漏洞、分析系统、自动化测试并加强你的安全。

··订阅源·联系·隐私·© 2026 Kitploit

工具目录

分类

查看所有分类
Loading categories
cve-2024-38819-lab — 动手实验,演示CVE-2024-38819 Spring Framework路径遍历漏洞,包含易受攻击和已修补的Spring Boot部署,用于安全教育。 | Kitploit
工具/GitHubGitHub/trevorputbrese/cve-2024-38819-lab
漏洞分析Web应用程序漏洞利用Web安全错误配置学习与教育实验室与实践
GitHubtrevorputbrese/cve-2024-38819-lab

cve-2024-38819-lab

动手实验,演示CVE-2024-38819 Spring Framework路径遍历漏洞,包含易受攻击和已修补的Spring Boot部署,用于安全教育。

查看仓库
32个月前尚未审核

最受欢迎

查看全部 →

发现我们社区最常用的工具。

探索所有工具

浏览我们的工具集合

查看所有工具 →
分享

CVE-2024-38819 客户文档保险库实验室

这是一个针对 CVE-2024-38819 的 Cloud Foundry 就绪 Spring Boot 演示项目,该漏洞是 Spring Framework 功能式静态资源处理中的路径遍历漏洞。

修复了什么?

CVE-2024-38819 在 Spring Framework 中被修复,而不是直接在 Spring Boot 中。

Spring Boot 在演示中仍然很重要,因为它管理应用程序使用的 Spring Framework 依赖版本。换句话说,Spring Boot 的维护版本可以为你引入修复后的 Framework 版本,但漏洞代码路径和安全修复位于 Spring Framework 的 WebFlux/WebMvc 功能式静态资源处理中。

该应用展示了一个小型客户文档保险库 UI。公共文档通过 WebFlux.fn 的 RouterFunctions.resources(...) 使用 FileSystemResource 从 /files/** 提供,这符合 Spring 公告中的漏洞条件。启动时,应用会创建:

  • 一个公共文档目录
  • 该公共目录外的一个假秘密文件
  • 一个用于证明请求以演示遍历的符号链接

该秘密由应用生成,不包含真实凭据。

版本

本实验室有意在两种模式下都将 Spring Boot 保持在 3.3.4,仅更改管理的 Spring Framework 版本:

模式Spring BootSpring Framework构建产物
易受攻击3.3.46.1.13target/cve-2024-38819-vulnerable.jar
已修复3.3.46.1.14target/cve-2024-38819-patched.jar

patched Maven profile 设置了:

root@kitploit:~
<spring-framework.version>6.1.14</spring-framework.version>

没有该 profile 时,Spring Boot 3.3.4 管理 Spring Framework 6.1.13,这是演示中使用的易受攻击版本。

构建产物

构建两个演示产物:

root@kitploit:~
scripts/build-artifacts.sh

这将创建两个不同的可部署 jar 文件:

root@kitploit:~
target/cve-2024-38819-vulnerable.jar
target/cve-2024-38819-patched.jar

本地运行

root@kitploit:~
mvn spring-boot:run

打开:

root@kitploit:~
http://127.0.0.1:8080

运行受限证明:

root@kitploit:~
python3 scripts/prove-secret-exposure.py --expect vulnerable

预期易受攻击的结果:

root@kitploit:~
RESULT: vulnerable behavior confirmed. The fake secret was served from outside the public file root.

运行已修复模式:

root@kitploit:~
mvn -Ppatched spring-boot:run

然后:

root@kitploit:~
python3 scripts/prove-secret-exposure.py --expect patched

Cloud Foundry

推送易受攻击版本:

root@kitploit:~
scripts/cf-push-vulnerable.sh

这会将 target/cve-2024-38819-vulnerable.jar 部署为 patch-your-spring-vulnerable。

针对你的应用路由运行证明:

root@kitploit:~
python3 scripts/prove-secret-exposure.py \
  --target https://YOUR-VULNERABLE-ROUTE \
  --allow-remote-demo \
  --expect vulnerable

推送已修复版本:

root@kitploit:~
scripts/cf-push-patched.sh

这会将 target/cve-2024-38819-patched.jar 部署为 patch-your-spring-patched。

运行相同的证明:

root@kitploit:~
python3 scripts/prove-secret-exposure.py \
  --target https://YOUR-PATCHED-ROUTE \
  --allow-remote-demo \
  --expect patched

清理:

root@kitploit:~
cf delete patch-your-spring-vulnerable -f -r
cf delete patch-your-spring-patched -f -r

参考资料

  • Spring 公告:https://spring.io/security/cve-2024-38819/
  • 公开 PoC 形态:https://github.com/masa42/CVE-2024-38819-POC
  • GitHub 公告:https://github.com/advisories/GHSA-g5vr-rgqm-vf78
下载工具