I Thought It Was a Container… It Was a Whole Azure VM (RCE Stor
The online IDE allowed users to execute arbitrary system commands, and the underlying system was a full Azure VM with passwordless sudo for the user, enabling root access. An attacker could run commands as root and fully compromise the VM.
Published on medium.com
I received a mail from some learning portal saying that I had been enrolled in a course. I didn’t remember signing up, but I thought, “Cool… let’s see what this is about.”
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 IDE executed user-supplied code directly on the host without sandboxing, and the host user had passwordless sudo privileges.
Impact
An attacker could execute arbitrary commands as root, leading to full compromise of the Azure VM.
What the attacker needed
Access to the learning portal; use of the IDE feature
The fix
The report was fixed, likely by properly sandboxing the IDE and removing passwordless sudo.
How it was found
- Accessed the IDE section of the learning portal.
- Ran a simple Java command to print the operating system name.
- Executed system commands like whoami, id, and uname -a via Java.
- Checked process list and cgroup to confirm it was a full VM, not a container.
- Ran sudo -l to discover passwordless sudo.
- Executed sudo id and sudo /bin/bash to obtain root shell.
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.
An online code playground let people run code, but it didn't properly isolate that code from the real computer behind it. The user running the code had full administrator rights without needing a password, so anyone using the playground could take complete control of the machine.
What is RCE?
Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.