Skip to content
RCE Write-up Intermediate

Exploiting Rejetto HFS 2.3 and Kernel Token Duplication on Optimum

The Rejetto HTTP File Server 2.3 had a parser flaw in its search macro handling that allowed remote code execution as a low-privileged user. The unpatched Windows Server 2012 R2 host then allowed local privilege escalation to SYSTEM via a kernel exploit.

Emmanuel Wiseman Follow

Published on emmanuelwiseman.medium.com

The Optimum asset was found to be running the Rejetto HTTP File Server (HFS) v2.3 with no patches applied. Initial access was obtained by taking advantage of a remote code execution vulnerability in the search parsing parser component.

Emmanuel Wiseman, on emmanuelwiseman.medium.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 a null byte in the search parameter bypassed input boundaries in the macro parser, allowing arbitrary command execution.

Impact

An attacker could gain remote code execution as a low-privileged user and then escalate to full SYSTEM control because the host had no security updates.

What the attacker needed

Network access to port 80; target runs Rejetto HFS 2.3; target has no security updates

How it was found

  1. Scan the target and find port 80 running Rejetto HFS 2.3.
  2. Send a crafted search request with a null byte and macro to download and run a PowerShell reverse shell.
  3. Catch the reverse shell as user kostas.
  4. Check systeminfo and find no hotfixes installed.
  5. Use SysNative to run a 64-bit PowerShell and download a kernel exploit.
  6. Run the exploit to elevate to nt authority\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.

The file server software had a bug where a specially crafted web request could make it run commands on the machine. The attacker used this to get a basic user shell, then used a second bug in the unpatched Windows system to become the all-powerful administrator.

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 Emmanuel Wiseman

View all

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