关联漏洞
标题:
Spring Framework 代码注入漏洞
(CVE-2022-22965)
描述:Spring Framework是美国Spring团队的一套开源的Java、JavaEE应用程序框架。该框架可帮助开发人员构建高质量的应用。 Spring Framework 存在代码注入漏洞,该漏洞源于 JDK 9+ 上的数据绑定的 RCE。以下产品和版本受到影响:5.3.0 至 5.3.17、5.2.0 至 5.2.19、较旧的和不受支持的版本也会受到影响。
描述
Python-based simulated firewall to detect and block Spring4Shell (CVE-2022-22965) exploit attempts. This project filters HTTP requests by identifying malicious payload patterns using a custom firewall_server.py and tests them with test_requests.py.
介绍
# 🛡️ Spring4Shell Firewall Mitigation (Python Script)
This project simulates a firewall using Python's built-in `http.server` module to detect and block malicious requests exploiting the **Spring4Shell (CVE-2022-22965)** vulnerability.
## 🔍 About
Spring4Shell is a critical Remote Code Execution (RCE) vulnerability affecting Spring Core Framework. Attackers use malicious payloads to deploy web shells on servers. This repo demonstrates how to block these using a lightweight custom Python HTTP firewall.
## 🚀 Features
- Detects and blocks known Spring4Shell payloads
- Pattern matching against:
- Dangerous URL path: `/tomcatwar.jsp`
- Exploit parameters like `class.module.classLoader.resources.context.parent.pipeline`
- Encoded payloads: `%7Bc1%7D`, `%7Bc2%7D`
- Responds with `403 Forbidden` if malicious
文件快照
[4.0K] /data/pocs/997c944663b83d3fe1ab30d8f1d3f99120034578
├── [1.5K] firewall_server.py
└── [ 834] README.md
0 directories, 2 files
备注
1. 建议优先通过来源进行访问。
2. 如果因为来源失效或无法访问,请发送邮箱到 f.jinxu#gmail.com 索取本地快照(把 # 换成 @)。
3. 神龙已为您对POC代码进行快照,为了长期维护,请考虑为本地POC付费,感谢您的支持。