Skip to content
RCE Write-up Intermediate

Crossing the Log4j Horizon - A Vulnerability With No Return

The Log4j vulnerability in VMware Horizon allows unauthenticated remote code execution via the Accept-Language header. Attackers can execute arbitrary code and install a backdoor on affected instances.

sprocketsecurity.com

Published on sprocketsecurity.com

External Testing Testing Lab Technical

The author, on sprocketsecurity.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 Log4j library in VMware Horizon does not properly sanitise user input, allowing JNDI injection.

Impact

An attacker could execute arbitrary code as SYSTEM, leading to complete takeover of the Windows host and potentially the internal Active Directory domain.

What the attacker needed

VMware Horizon instance vulnerable to CVE-2021-44228; Network access to the Horizon server; Attacker-controlled LDAP server

The fix

The vulnerability should be fixed by patching VMware Horizon according to VMware advisory VMSA-2021-0028.8.

How it was found

  1. Send a request to /portal/info.jsp with a JNDI payload in the Accept-Language header to test for DNS callback.
  2. Set up a malicious LDAP server using rogue-jndi to serve a payload.
  3. Craft a reverse shell command using node.exe and encode it in Base64.
  4. Use rogue-jndi to deliver the command via LDAP.
  5. Trigger the exploit by sending the JNDI payload pointing to the rogue-jndi server.
  6. Receive a reverse shell as SYSTEM.

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 logging library that can be tricked into running harmful code if it logs a specially crafted string. In VMware Horizon, an attacker can send such a string in a header, and the server runs the attacker's code, giving them control of the machine.

What is RCE?

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

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.