Introduction
The Internet was buzzing yesterday over a rapidly spreading attack involving malicious apps masquerading as Google Docs which gained permission to victims’ Google Gmail accounts and extracted confidential information. Netskope considers these type of attacks as CloudPhishing, as they are significantly more sophisticated than a traditional phishing attack, and exploit the implicit trust users have in well-known cloud services. With the enterprise adoption of cloud services and user trust in them becoming more ubiquitous, using cloud services for an attack has become irresistible to hackers. Netskope Threat Research Labs has observed and published analysis of many attacks in the last year that have used cloud services.
Yesterday, Google acted very quickly and mitigated the attack, but some users had already been compromised. Netskope Introspection customers can identify if any of their enterprise users had granted access to the malicious apps (yes, there were multiple apps) prior to Google mitigating the attack.
Additional details of previous CloudPhishing fan-out attacks detected by Netskope can be found in our original blog
How the attack worked
This attack involved only Google Gmail. A GIF animation detailing the attack was posted by a twitter user.
To start, the victim receives an email from one of their contacts who are also using Google Gmail. The subject as well as the body of the email references the sender with name and indicate that a Google document is available for viewing as shown in Figure 1.
Figure 1: Targeted nature of CloudPhishing attack.
The email arrives from legitimate Google SMTP mail servers and also from a legitimate sender, therefore it is not detected by Gmail as a phishing email as shown in Figure 2. The use of the legitimate sender name along with the content of the email make it difficult for victims to identify that it is a phishing attempt.
Figure 2: CloudPhishing message header showing use of legitimate servers
Once the user clicks on the “Open in Docs” button (link), they are taken through various HTTP redirects in the browser that eventually attempt to install a Google Gmail app developed using the Google Gmail API. Prior to asking the permission levels for the app during the installation, if the user is logged into multiple Gmail accounts or Gmail-hosted email accounts in the same browser, it would ask the user to select the Google account which they would like to grant the permission level as shown in Figure 3. As shown in the red box in Figure 3, the name of the app displayed is “Google Docs” which give the false sense of trust to the user that they are indeed installing a Google-built app.