Update 2 (2021-09-28)
VMware vCenter's analytics service mishandled user-supplied request parameters, allowing an unauthenticated attacker to write arbitrary files to disk as root. By writing to a cron directory, an attacker could achieve remote code execution.
censys.io
Published on censys.io
@wvuuuuuuuuuuuuu disclosed how to get execution using this API endpoint. The method simply requires writing to /etc/cron.d.
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 analytics service used user-controlled input to construct a file path without sufficient validation, allowing directory traversal and arbitrary file write.
Impact
An unauthenticated attacker could write arbitrary files as root and achieve remote code execution, but CEIP must be enabled for the exploit to work.
What the attacker needed
CEIP enabled; network access to vCenter
The fix
The vulnerability was fixed by adding validation of the collector instance ID format and checking the collector ID against a whitelist.
How it was found
- Send a request to create a directory under the log path using a crafted _i parameter.
- Send a second request with a path traversal sequence in _i to write a file to an arbitrary location, such as /etc/cron.d.
- The file is written as root and can contain commands that are executed by cron.
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 telemetry service in VMware vCenter accepted a filename from the user without properly checking it. An attacker could use a path like '../../../../etc/cron.d/file' to write a file anywhere on the server, including places that automatically run commands, leading to full control of the server.
What is Path traversal?
Input that builds a file path escapes the intended folder, reading or writing files the application should never touch.