Exploit databaseDownload repository ZIP
GH-a3d0db9bad9aad6eca3a3c960ab2ffa3
alexandreheroux/fix-cve-2021-44228
Sources for CVE-2021-44228
465 sourcesPreferred order: Exploit-DB, Metasploit, then GitHub repositories by stars. Open preferred source
Repository files1
alexandreheroux/fix-cve-2021-44228Revision 3d060208de4d
Files from this repository share one source choice. Supporting files may cover other vulnerabilities.
src/main/java/com/infinisolution/fix/cve202144228/FixCVE202144228.java
Java · 1,034 bytespackage com.infinisolution.fix.cve202144228;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.IOException;
import com.infinisolution.fix.BaseFix;
/**
* Fix for CVE-2021-44228 <br/>
* See https://logging.apache.org/log4j/2.x/ for more informations <br/>
* the mitigation is to remove the JndiLookup class from the classpath: zip -q
* -d log4j-core-*.jar org/apache/logging/log4j/core/lookup/JndiLookup.class.
*
* @author InfiniSolution
*
*/
public class FixCVE202144228 extends BaseFix {
public static final String[] MALICIOUS_FILES = { "org/apache/logging/log4j/core/lookup/JndiLookup.class", "org/apache/log4j/net/JMSAppender.class" };
public static void main(String[] args) throws FileNotFoundException, IOException {
if (args.length != 1)
throw new IllegalArgumentException("Need to have the location as first parameter");
new FixCVE202144228().run(new File(args[0]));
}
@Override
public String[] getMaliciousFile() {
return MALICIOUS_FILES;
}
}