Skip to content
KitploitKITPLOIT
ToolsBlog
Submit
ToolsBlog
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.

··Feeds·Contact·Privacy·© 2026 Kitploit

Tool Directory

Categories

View all categories
Loading categories
Tools/GitHubGitHub/qingtengyun/cve-2021-44228-qingteng-patch
Vulnerability AnalysisExploitationIncident Response
GitHubqingtengyun/cve-2021-44228-qingteng-patch

cve-2021-44228-qingteng-patch

Hotpatch tool for CVE-2021-44228 (Log4Shell) that uses JVM Instrumentation API to fix JndiLookup::lookup() in running Java processes without restart. Supports JDK 6–11 and Windows.

View Repository
9214 years agoNot yet reviewed

Most Popular

View all →

Discover the most used tools by our community.

Explore all tools

Browse our collection of tools

View all tools →
Share

Qingteng log4j2-patch

https://github.com/qingtengyun/cve-2021-44228-qingteng-patch

Fixes CVE-2021-44228 for log4j2, using the Instrumentation API provided by the JVM to modify existing bytecode loaded into the JVM.
Without restarting the Java process, it modifies the lookup method of org.apache.logging.log4j.core.lookup.JndiLookup class to always return Patched JndiLookup::lookup().

Simply referenced https://github.com/corretto/hotpatch-for-apache-log4j2 for modifications and enhancements, supports JDK versions 6, 7, 8, 9, 10, 11, supports Windows.
jattach and jattach.exe come from https://github.com/apangin/jattach, you can compare with GitHub.

If you are not confident about the downloaded built tool, you can download the source code and execute build.sh to repackage.
The build.sh output is located in the build/cve-2021-44228-qingteng-patch directory.

Usage

Linux:

root@kitploit:~
./attach.sh $pid
./attach.sh

./attach.sh without pid will use jps to list all Java processes on this machine, then enter the line number to select a process for injection and repair. Entering all will inject all listed Java processes. Multiple inputs are allowed, separated by spaces.

Windows:
Double-click attach.bat, then enter the Java process pid.
Or pass the pid on the cmd command line, e.g., attach.bat pid

Example

root@kitploit:~
$ ./attach.sh 438625
/data/qingteng/cve-2021-44228-qingteng-patch
will patch pid: 438625
/data/qingteng/cve-2021-44228-qingteng-patch/jattach 438625 load instrument false /data/qingteng/cve-2021-44228-qingteng-patch/qt-log4j-agent.jar=/data/qingteng/cve-2021-44228-qingteng-patch/qt-log4j-patch.jar
Connected to remote JVM
JVM response code = 0
0

The output ending with

root@kitploit:~
JVM response code = 0
0

indicates successful injection. Otherwise, it fails.

Notes

  1. If you encounter the following error
root@kitploit:~
Could not start attach mechanism: No such file or directory

Possible causes:

  1. The VM was started with the -XX:+DisableAttachMechanism parameter, meaning Attach has been disabled.

  2. The /tmp/.java_pid$pid socket file was created and then deleted, making Attach impossible – this method cannot be used.

  3. You need to be the same user as the Java process. If the running user is not allowed to log in, you can use root to execute su, paying attention to replace pid_username and pid

root@kitploit:~
su -l -s /bin/bash -c "$(pwd)/attach.sh pid" pid_username
Download Tool