Exploiting CVE-2024–22274: A Deep Dive into VMware vCenter Server Vulnerabilities and Defense…
An authenticated user with the admin role could inject command-line flags into the vCenter backup API's SFTP username field, causing the system to run arbitrary commands as root. This allowed the attacker to create a new root-level user and gain full control of the server.
systemweakness.com
Published on systemweakness.com
These components are susceptible to a flag injection attack. This type of attack can inject malicious flags into system commands executed by the API, allowing an attacker to run arbitrary commands as the root user.
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
Likely the backup API passes user-supplied values such as the SFTP username directly into a shell command without sanitising them, allowing flag injection.
Impact
An authenticated admin could execute arbitrary commands as root, leading to full compromise of the vCenter server.
What the attacker needed
Authenticated admin access to vCenter; SSH access to the vCenter server
How it was found
- Log in to vCenter Server over SSH as a user with the admin role.
- Use a process-monitoring tool to observe the system commands run by the backup API.
- Inject a malicious SSH flag through the username field of the backup validate command.
- Use the injected command to create a new user with root privileges and sudo group membership.
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.
vCenter is software that manages virtual machines. A feature that lets admins back up vCenter passes a username to a system command without checking it. By putting special characters in that username, an attacker can make the system run extra commands with the highest privileges (root), which is like tricking a butler into running errands for you.
What is RCE?
Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.