Log4Shell
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

29 lines
702 B

import org.apache.logging.log4j.Logger
import org.apache.logging.log4j.LogManager
// Get the logger to use for output
val logger: Logger = LogManager.getLogger()
fun main() {
logger.info(
"LDAP Trust: {}",
System.getProperty("com.sun.jndi.ldap.object.trustURLCodebase"),
)
// Get the payload to log
val payload: String? = System.getProperty("victim-payload")
// Check for null
if(payload == null) {
logger.error("Payload to trace is null")
return
}
// Log the payload infinitely
// Sleep for a second between each one
while(true) {
logger.trace("Attempted injection: {}", payload)
Thread.sleep(1000)
}
}