Skip to content
RCE Write-up Advanced

Izi Izi, Pwn2Own ICS Miami

A Rockwell FactoryTalk diagnostics service exposed a .NET Remoting endpoint over HTTP configured with full type filtering, so it deserialised attacker-supplied objects. An attacker could send a crafted serialised gadget to run arbitrary code as the SYSTEM account on the HMI workstation.

synacktiv.com

Published on synacktiv.com

Rédigé par Lucas Georges - 28/07/2020 - dans Challenges, Exploit - Téléchargement

The author, on synacktiv.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

The service used .NET Remoting over HTTP with TypeFilterLevel set to Full, so it deserialised untrusted request objects without restricting which types were allowed.

Impact

An unauthenticated attacker who can reach the port could execute arbitrary code as NT AUTHORITY\SYSTEM on the HMI workstation.

What the attacker needed

Network access to port 8082; no authentication required

The fix

It was fixed by a Rockwell patch that restricts connections to the local port, with disabling the Remote Diagnostics Service or blocking the port in the firewall as workarounds; more broadly, .NET Remoting should be replaced with WCF.

How it was found

  1. Enumerate listening ports on a host with the Rockwell software installed
  2. Request the diagnostics service port and observe a .NET Remoting deserialisation error
  3. Confirm the binary is configured with full type filtering
  4. Build a serialised gadget carrying a PowerShell command and post it to the service endpoint
  5. Receive a reverse shell running 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.

Some Windows software lets a program on another machine send it a packaged object, and the receiving program rebuilds that object in memory. If the receiver trusts whatever object arrives, an attacker can package a harmful object that makes the program run their commands. Here the service did exactly that, so anyone who could reach the port could run code on 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.