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
fail2ban-log4j — fail2ban filter that catches attacks againts log4j CVE-2021-44228 | Kitploit
Tools/GitHubGitHub/atnetws/fail2ban-log4j
Vulnerability ScannersIDS/IPS EvasionWeb SecurityIntrusion DetectionMisconfigurationLog Analysis
GitHubatnetws/fail2ban-log4j

fail2ban-log4j

fail2ban filter that catches attacks againts log4j CVE-2021-44228

View Repository
82454 years agoNot yet reviewed
Share

fail2ban-log4j

fail2ban filter that catches attacks against log4j CVE-2021-44228

Installation

Copy this file to your fail2ban filter.d directory, which is usually something like
/etc/fail2ban/filter.d
or similar.

Add an apache-jndi section to your jail.local or jail.conf:

[apache-jndi]
enabled = true
filter = apache-jndi
port = http,https
logpath = /var/log/apache2/access.log
bantime = 86400
maxretry = 1

In case you need to monitor multiple sites, wildcards may help:

[apache-jndi]
enabled = true
filter = apache-jndi
port = http,https
logpath = /var/www/*/logs/access.log
bantime = 86400
maxretry = 1

Logpath for LAMP servers managed by ispConfig:

logpath = /var/www/clients/client*/web*/log/access.log

These are examples assuming

  • A single try reveals that they're a bad guy
  • You only want to block further http(s) traffic. Of course, you might as well block any other ports, too.

Effectiveness

As of now, this regex catches jndi:ldap requests that contain "jndi:ldap" and one obfuscated version using "lower".
I'll add more as soon as I find them, but feel free to submit suggestions.

Does it work?

Yes and no. From a technical point of view, it does what it is supposed to to. It detects known formats of log4shell attempts and should at least keep those who don't put too much effort in their scans blocked from your machines. Unfortunately, the possibilities of masking / obfuscating these requests are unlimited, so keeping up with all possible RegEx variants might appear like a cat-and-mouse game.

Like this?

If this saved you some time, why not Buy me a coffee? ;)

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.

    524
  • 2

    ghostlock-app

    yukonga/ghostlock-app

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

    478
  • 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.

    357
  • 4

    redforge

    cybersecurity91/redforge

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

    317
  • 5

    estorides

    grisuno/estorides

    Aggregates 99+ free OSINT sources in parallel, resolves entities into a knowledge graph, and exports STIX 2.1, MISP, or GraphML with LLM-assisted analysis.

    305
  • 6

    opencti

    opencti-platform/opencti

    Open Cyber Threat Intelligence Platform

    275

Explore all tools

Browse our collection of tools

View all tools →