关联漏洞
标题:
Jenkins 安全漏洞
(CVE-2024-23897)
描述:Jenkins是Jenkins开源的一个应用软件。一个开源自动化服务器Jenkins提供了数百个插件来支持构建,部署和自动化任何项目。 Jenkins 2.441及之前版本、LTS 2.426.2及之前版本存在安全漏洞,该漏洞源于允许未经身份验证的攻击者读取Jenkins控制器文件系统。
描述
This is an exploit script for CVE-2024-23897, a vulnerability affecting certain systems. The script is intended for educational and testing purposes only. Ensure that you have the necessary permissions before using it.
介绍
## Jenkins CVE-2024-23897 Exploit Script
### Description:
This exploit script is designed to target Jenkins instances with versions `<= 2.441 & <= LTS 2.426.2` affected by the CVE-2024-23897 vulnerability. The vulnerability originates from the args4j library used by Jenkins to parse command arguments and options during the processing of CLI commands on the Jenkins controller.
The script leverages the `expandAtFiles` feature of the command parser, which, when enabled, replaces an `@` character followed by a file path in an argument with the file’s contents. This feature is enabled by default, making Jenkins vulnerable to arbitrary file reads leading to Remote Code Execution (RCE).
Attackers can exploit this vulnerability to read arbitrary files on the Jenkins controller file system, using the default character encoding of the Jenkins controller process. The script provides the flexibility to target a single URL or a list of target URLs, enabling the upload of a file to the specified server and subsequent download of the response.
For more details on the CVE-2024-23897 vulnerability, refer to the official Jenkins security advisory: [Jenkins Security Advisory 2024-01-24](https://www.jenkins.io/security/advisory/2024-01-24/)

### Usage:
#### Single Target URL:
```bash
./exploit_script.rb -u http://example.com -f /etc/passwd
```
#### List of Target URLs:
```bash
./exploit_script.rb -l host_list.txt -f /etc/passwd
```
Replace `http://example.com`, `host_list.txt`, and `/etc/passwd` with your actual target URL, list of target hosts, and file path.
**Disclaimer:** This script is provided for educational and testing purposes only. Use it responsibly and with proper authorization. The author is not responsible for any misuse or damage caused by the script.
- **Author:** Alexander Hagenah
- **GitHub Repository:** [CVE-2024-23897 PoC and scanner](https://github.com/xaitax/CVE-2024-23897)
- [URL](https://primepage.de)
- [Twitter](https://twitter.com/xaitax)
### Contributing:
Contributions are welcome. Feel free to fork, modify, and make pull requests or report issues.
文件快照
[4.0K] /data/pocs/3b36e03619999938146ce51dc72131f914505c6b
├── [2.4K] CVE-2024-23897.rb
├── [277K] image.jpg
└── [2.1K] README.md
0 directories, 3 files
备注
1. 建议优先通过来源进行访问。
2. 如果因为来源失效或无法访问,请发送邮箱到 f.jinxu#gmail.com 索取本地快照(把 # 换成 @)。
3. 神龙已为您对POC代码进行快照,为了长期维护,请考虑为本地POC付费,感谢您的支持。