Skip to content
RCE Write-up Intermediate

Detecting log4j Its Remediation

A zero-day vulnerability in Apache Log4j (CVE-2021-44228) allows remote code execution via JNDI injection in logged headers or parameters. Attackers can exploit this by sending crafted requests to vulnerable servers.

Security Lit Limited Follow

Published on infosecwriteups.com

This article is dedicated to log4j and how it’s being exploited in the wild by attackers.

Security Lit Limited, 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 the vulnerability arises because Log4j does not properly sanitise user-controlled input before performing JNDI lookups, allowing attackers to inject malicious JNDI references.

Impact

Attackers could execute arbitrary code remotely on the web server, potentially leading to full system compromise.

What the attacker needed

Vulnerable Log4j version; ability to send requests to the server

How it was found

  1. Examine log files to find an endpoint that expects a parameter.
  2. Identify that the /admin/cores endpoint expects a parameter and previously had an empty value.
  3. Supply a payload with a random parameter to the /admin/cores endpoint using JNDI with LDAP to call an attacker machine.

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. A serious flaw lets attackers sneak in special text that makes the program run their code. This means an attacker could take control of a server just by sending a request with the right text in a header or parameter.

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 Security Lit Limited

View all

5 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.