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 VirusTotal platform and gain access to its various scans capabilities. About virustotal:
The virustotal.com application has more than 70 antivirus scanners that scan files and URLs sent by users.
The original idea of the exploration was to use the CVE-2021-22204 so that these scanners would execute the payload as soon as the exiftool was executed.
Technical part:
The first step was uploading a djvu file to the page https://www.virustotal.com/gui/
with the payload:
Virustotal.com analyzed my file and none of the antiviruses detected the payload added to the file's metadata.
According to the documentation at the link:
https://support.virustotal.com/hc/en-us/articles/115002126889-How-it-works ,
virustotal.com uses several scans. The application sent our file with the payload to several hosts to perform the scan.
On virustotal hosts, at the time that exiftool is executed, according to CVE-2021-22204 inform, instead of exiftool detecting the metadata of the file it executes our payload. Handing us a reverse shell on our machine.
After that we noticed that it’s not just a Google-controlled environment, but environments related to internal scanners and partners that assist in the virustotal project. In the tests it was possible to gain access to more than 50 internal hosts with high privileges.
Hosts identified within the internal network:
The interesting part is every time we uploaded a file with a new hash containing a new payload, virustotal forwarded the payload to other hosts. So, not just we had a RCE, but also it was forwarded by Google's servers to Google's internal network, it customers and partners.
Various types of services were found within the networks, such as: mysql, Kubernetes, oracle database, http and https applications, metrics applications, SSH, etc.
Due to this unauthorized access, it was possible to obtain sensitive and critical information such as: Kubernetes tokens and certificates, service settings info, source codes, Logs, etc.
We reported all the findings to Google that fixed this issue quickly.
Disclosure Process:
Report received by GoogleVRP - 04.30.2021
GoogleVRP trigged the report - 05.19.2021
GoogleVRP accepted the report as a valid report - 21.05.2021
GoogleVRP closed the report - 04.06.2021
Virustotal was no longer vulnerable - 13.01.2022
GoogleVRP allowed publishing - 15.01.2022
Source: https://www.cysrc.com/blog/virus-total-blog