Kali Linux

Log4J-Detect : Script To Detect The “Log4j” Java Library Vulnerability For A List Of URLs With Multithreading

Log4J-Detect is a script “log4j-detect.py” developed in Python 3 is responsible for detecting whether a list of URLs are vulnerable to CVE-2021-44228.

To do so, it sends a GET request using threads (higher performance) to each of the URLs in the specified list. The GET request contains a payload that on success returns a DNS request to Burp Collaborator / interactsh. This payload is sent in a test parameter and in the “User-Agent” / “Referer” / “X-Forwarded-For” / “Authentication” headers. Finally, if a host is vulnerable, an identification number will appear in the subdomain prefix of the Burp Collaborator / interactsh payload and in the output of the script, allowing to know which host has responded via DNS.

It should be noted that this script only handles DNS detection of the vulnerability and does not test remote command execution.

Downloading log4j-detect.py

wget https://github.com/takito1812/log4j-detect/raw/main/log4j-detect.py

Running log4j-detect.py

python3 log4j-detect.py

R K

Recent Posts

xargs Command in Linux: Build and Execute Commands from Input

The xargs command in Linux reads items from standard input and passes them as arguments to another…

5 hours ago

locate Command in Linux: Find Files Fast with a Database Search

The locate command in Linux searches for files and directories by name. It queries a pre-built database…

5 hours ago

Listing Linux Services with systemctl: A Complete Guide

Most modern Linux distributions use systemd as the default service manager. Knowing how to list…

5 hours ago

How to Truncate Files in Linux: Empty Files Without Deleting

Truncating a file in Linux means removing its contents while leaving the file itself in…

5 hours ago

ss Command in Linux: Display Socket Statistics and Connections

The ss command in Linux lists open sockets and active network connections. It replaced the deprecated netstat command and…

1 day ago

ftp Command in Linux: Connect to Servers and Transfer Files

The ftp command in Linux connects to a remote FTP server and transfers files. FTP transmits everything…

1 day ago