Exploiting remote code execution within VirusTotal platform
A DjVu file with a malicious metadata payload was uploaded to VirusTotal, and when its scanners ran exiftool, the payload executed commands on internal hosts. The attacker could gain a reverse shell and access over 50 internal hosts with high privileges, obtaining sensitive information such as Kubernetes tokens and certificates.
cysrc.com
Published on cysrc.com
After a deep security research by Cysource research team led by Shai Alfasi & Marlon Fabiano da Silva, we found a way to execute commands remotely within (through) VirusTotal platform and gain access to its various scans capabilities. About virustotal:
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 scanners used a vulnerable version of exiftool (CVE-2021-22204) that executed code embedded in file metadata.
Impact
The attacker could gain a reverse shell on internal hosts and access sensitive information such as Kubernetes tokens and certificates, service settings, source codes, and logs.
What the attacker needed
Ability to upload files to VirusTotal; VirusTotal uses vulnerable exiftool
The fix
The vulnerability was fixed by updating exiftool to a patched version, as the report states it was no longer exploitable.
How it was found
- Upload a DjVu file containing a malicious metadata payload to VirusTotal.
- VirusTotal sends the file to multiple scanning hosts.
- When exiftool processes the file, the payload executes and provides a reverse shell.
- Use the shell to access internal hosts and services.
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.
VirusTotal is a website that scans files with many antivirus tools. The researchers hid a command inside a file's metadata, and when VirusTotal's scanners processed it, the command ran on their servers. This let the researchers take control of many internal machines and steal secrets.
What is RCE?
Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.