The Truth Behind The 3rd Argument For Exploiting The Webexservice
The WebEx service (webexservice) accepts command-line arguments and, when the third argument equals the session ID of winlogon.exe, executes the fourth argument as a command with elevated privileges. An attacker who can start the service with crafted arguments could run arbitrary commands as SYSTEM.
Published on infosecwriteups.com
Reading the informative article by researchers @iagox86 and @jeffmcjunkin (https://www.skullsecurity.org/2018/technical-rundown-of-webexec), which is an excellent source of information, I was able to successfully exploit a vulnerability during a Red Team test exercise. However, I always had a doubt that I hope to…
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
Impact
An attacker who can start the service with crafted arguments could execute arbitrary commands with elevated privileges, potentially leading to full system compromise.
What the attacker needed
Ability to start the webexservice; knowledge of the session ID of winlogon.exe (typically 1)
How it was found
- Start the webexservice with four arguments: a name, 'software-update', the value 1, and the command to execute.
- The service calls CreateToolhelp32Snapshot to list processes and finds winlogon.exe.
- It calls ProcessIdToSessionId on winlogon.exe to get its session ID (which is 1).
- It compares the session ID with the third argument; if they match, it calls CreateProcessAsUserW with the fourth argument as the command line.
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 Windows service called webexservice can be started with extra arguments. If the third argument matches the session number of a core Windows process (winlogon.exe), the service runs the fourth argument as a command with high privileges. This means someone who can start the service could run any command as the system user.
What is RCE?
Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.