Exploitation of Remote WCF Vulnerabilities
A remote WCF endpoint in SolarWinds Orion NPM exposed a method that deserialised attacker-supplied configuration and executed an external program without validating credentials, allowing an unauthenticated attacker to run code as SYSTEM.
versprite.com
Published on versprite.com
In 2018, VerSprite’s research team invested a significant amount of time into abusing insecure Windows Communication Foundation (WCF) endpoints.
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 InvokeActionMethod method deserialised attacker-controlled args into an ExecuteExternalProgramConfiguration object and, when Credentials were null, passed ProgramPath directly to a shell execution method without validating access.
Impact
An attacker could execute arbitrary code with SYSTEM privileges on the server, leading to full compromise.
What the attacker needed
Network access to port 17777; SolarWinds Orion NPM 12.3 or earlier
The fix
The issue was fixed in SolarWinds Orion NPM 12.4 by making it no longer trivial for arbitrary clients to authenticate to the service and call remote methods.
How it was found
- Discover a remote WCF endpoint by searching for the error message 'there is no endpoint listening at net.tcp'.
- Install SolarWinds Orion NPM and identify the OrionModuleEngine service using NetTcpPortSharing and running as LocalSystem.
- Decompile SolarWinds.BusinessLayerHost.exe and review the service contract ICoreBusinessLayer, focusing on InvokeActionMethod.
- Analyse the ExecuteExternalProgramInvoker class to learn the required actionTypeID, methodName, and args values.
- Connect to the endpoint using credentials derived from the username and handle the DNS identity error by parsing the expected identity.
- Call InvokeActionMethod with actionTypeID 'ExecuteExternalProgram', methodName 'ValidateAccess', and a serialised configuration object containing a PowerShell reverse shell command and null credentials.
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.
Windows Communication Foundation (WCF) is a framework for building service-oriented applications. A service exposed a method that could be called remotely; it took a configuration object and ran a program specified in that object. Because the service ran with high privileges and did not properly check who was calling, an attacker could make it run their own program with those high privileges.
What is RCE?
Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.