Skip to content
KitploitKITPLOIT
ToolsExploitsBlog
Log in
Submit
ToolsExploitsBlog
Submit

Hacking, PenTest, and Cybersecurity Tools for Your Security Arsenal!

Kitploit is a directory of hacking, cybersecurity, and pentesting tools. Discover the latest project updates to find vulnerabilities, analyze systems, automate testing, and strengthen your security.

FeedsContactPrivacy© 2026 Kitploit

Tool Directory

Categories

View all categories
Loading categories
Block-Spring4Shell — POC firewall with rules designed to detect and block Spring4Shell vulnerability (CVE-2022-22965) exploit | Kitploit
Tools/GitHubGitHub/aur3ns/block-spring4shell
Defensive ToolsVulnerability ScannersIDS/IPS EvasionWeb SecurityPenetration TestingLearning & Education
GitHubaur3ns/block-spring4shell

Block-Spring4Shell

POC firewall with rules designed to detect and block Spring4Shell vulnerability (CVE-2022-22965) exploit

View Repository
371 year agoNot yet reviewed
Share

Project Spring4Shell (CVE-2022-22965 ) Blocker

Firewall Server Handler -

This project is a proof-of-concept (POC) firewall server designed to detect and block attacks exploiting the CVE-2022-22965 vulnerability, commonly known as Spring4Shell. The server inspects incoming HTTP requests and blocks any that match known malicious patterns associated with this vulnerability.

Overview

The Firewall Server Handler is a simple Python-based HTTP server, built using the http.server library. It monitors incoming HTTP POST requests, looking for specific headers and payload patterns associated with the Spring4Shell vulnerability. If a request matches these patterns, it is blocked, and the server responds with a 403 Forbidden status.

Requirements

  • Python 3.x

Setup and Usage

  1. Clone the Repository

    git clone https://github.com/BlackBird63030/Block-Spring4Shell
    cd Block-Spring4Shell
    
  2. Run the Server

    python frs.py
    

    By default, the server will run on localhost at port 8000.

  3. Test the Firewall Rule

    • To test, you can send use the tnt.py script that simulates the attack by doig 5 connections.

Blocking Rules

This POC uses two main rules to detect and block CVE-2022-22965 exploit attempts:

  1. Rule 1: Blocking Payload Pattern

    • Detects requests containing the payload pattern class.module.classLoader.resources.context.parent.pipeline.first, which is used in Spring4Shell exploits to inject malicious Java code.
  2. Rule 2: Blocking Suspicious Headers

    • Blocks requests with specific headers characteristic of Spring4Shell attack payloads:
      • suffix: %>//
      • C1: Runtime
      • C2: <%
      • DNT: 1
      • Content-Type: application/x-www-form-urlencoded

If either rule matches, the server responds with a 403 Forbidden status and returns a JSON message: {"error": "Forbidden Access"}

If no conditions are met, the server responds with 200 OK and: {"message": "Request received"}

Code Structure

  • ServerHandler: The main class handling HTTP requests.
    • block_request(): Sends a 403 response when a request is blocked.
    • rule_1(): Checks the payload for patterns associated with CVE-2022-22965.
    • rule_2(): Checks for specific headers known to be part of Spring4Shell exploits.
    • do_GET() and do_POST(): Process incoming GET and POST requests, applying the firewall rules.

Example

To test the firewall, use the tnt.py script. It gonna send 5 POST requests to the firewall script

python tnt.py

The server will respond with: {"error": "Forbidden Access"}

Purpose

This POC is intended for educational and testing purposes to demonstrate a basic firewall rule that blocks specific attack vectors targeting the Spring4Shell vulnerability. It is not a substitute for a comprehensive firewall solution in production environments.

License

MIT License

Download Tool

Most Popular

View all →

Discover the most used tools by our community.

  • 1

    OsintHunter

    letox4/osinthunter

    🎯 The ultimate OSINT toolkit: investigation graph, confidence scoring, alias families, map, timeline and reports. 49 modules, 400+ sites, no API keys required.

    795
  • 2

    ghostlock-app

    yukonga/ghostlock-app

    GhostLock One-Tap Execution App (CVE-2026-43499)

    520
  • 3

    ARTEX

    baarai/artex

    LLM multi-agent autonomous penetration testing platform with planner/worker agents, asset and exploration graphs, MITM traffic recording, and vulnerability retesting.

    439
  • 4

    redforge

    cybersecurity91/redforge

    Browser-side red team toolkit with 102 offline tools for recon, payload generation, credential attacks, crypto, encoding and engagement reporting.

    346
  • 5

    looking-glass

    anonghosty/looking-glass

    CSIRT platform that ingests Shadowserver reports into MongoDB and replays them as interactive maps, analysis, findings, advisories and executive dashboards.

    267
  • 6

    CyberStrikeAI

    ed1s0nz/cyberstrikeai

    The system of action for AI-native cybersecurity—where intent becomes governed execution, evidence becomes operational memory, and every operation improves the next.

    264

Explore all tools

Browse our collection of tools

View all tools →