CVE-2019-19470: Rumble in the Pipe
TinyWall's named pipe server deserialised untrusted data using BinaryFormatter after an authentication check that compared the client's MainModule.FileName to the server's binary path. An attacker could fake that path via the PEB and send a malicious serialised object to execute code as SYSTEM.
Published on codewhitesec.blogspot.com
The original lives on codewhitesec.blogspot.com
We do not hold its text, 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
Impact
A local authenticated user without special privileges could execute arbitrary code as SYSTEM.
What the attacker needed
Local authenticated user; no special privileges required
The fix
The vulnerability was fixed in version 2.1.13.
How it was found
- Start the TinyWall binary under a debugger so the MainModule.FileName check passes.
- Set a breakpoint before the client writes to the pipe and replace the serialised object with a malicious one.
- Release the breakpoint and observe code execution as SYSTEM.
- To avoid the debugger, fake the client's MainModule.FileName by modifying PEB entries with a PowerShell script.
- Connect to the TinyWallController named pipe and send the malicious serialised object.
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.
A named pipe is a way for programs on the same computer to send messages to each other. TinyWall's background service, which runs with high privileges, accepted messages and turned them back into objects without properly checking who sent them. By pretending to be the legitimate TinyWall program, an attacker could make the service run their code with the highest privileges.
What is RCE?
Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.