Skip to content
RCE Write-up Intermediate

Proof Of Concept Zero Day log4j Rce

The Log4j logging framework evaluates lookup expressions in logged strings, so an attacker who can get a crafted string logged can make the server fetch a remote Java class and execute it. This allows remote code execution on vulnerable versions.

Yuvarajan Follow

Published on infosecwriteups.com

Hello all, Today, we’ll look at how a specially crafted string can lead to remote code execution (RCE), and how this vulnerability affects the majority of the internet. Let’s dive into the topic.

Yuvarajan, on infosecwriteups.com

The full write-up lives on its author's site

It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

How it worked

Root cause

Likely, Log4j performs JNDI lookups on logged strings without restricting them, so attacker-controlled input can trigger a remote class load.

Impact

An attacker could achieve remote code execution on servers running vulnerable Log4j versions, potentially leading to full compromise.

What the attacker needed

Vulnerable Log4j version 2.10-2.14; attacker can control logged input; server can make outbound LDAP connections

The fix

The vulnerability was fixed in Log4j version 2.15, though it still requires Java 8; temporary mitigations were also suggested.

How it was found

  1. Clone the vulnerable app repository and enter the directory.
  2. Build a Docker image using the provided command.
  3. Run the Docker container.
  4. Start a Netcat listener in a new terminal.
  5. Send a curl request with a crafted User-Agent header.
  6. Observe the incoming connection on the Netcat listener.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

Log4j is a tool that Java programs use to write log messages. It treats certain text like ${...} as a command to look something up, and an attacker can put such text into something that gets logged, like a username or browser identifier. The server then contacts the attacker's server and runs code from it, giving the attacker control.

What is RCE?

Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.

More by Yuvarajan

View all

6 more disclosed reports, best first.

Similar reports

View all

Same bug class and techniques, clearest first.

Remote code execution

The lesson behind this report.

Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.