Man in the Cloud attacks steal the sync token that a file sync service stores on a device. Attackers then sync their own device to the victim account without a password. Imperva researchers described the technique in July 2015 for Dropbox, Google Drive, Box and OneDrive. Audits, least privilege and user training reduce token theft risk.
You reset your password after a scare and the attacker still reads your files. Stolen sync tokens explain that problem.
This guide explains the attack in plain words and the controls that MITRE and Microsoft document for token theft.
What is a Man in the Cloud Attack?
File sync services match local files with a provider server. They store a sync token in a file, the registry or Windows Credential Manager so users avoid typing a password at every sync.
In this attack the attacker takes that token and syncs a second device to the victim account. Attackers need no password and the malicious code does not need to remain active on the victim PC.
Which Services did the Research Include?
Imperva reported the technique in its Hacker Intelligence Initiative report in July 2015. Tests covered Dropbox, Google Drive, Box and Microsoft OneDrive. At that time password resets affected the services differently. Dropbox tokens stayed valid after a password reset while Google Drive revoked all tokens.
Providers have changed their products since 2015, so check provider documentation for current behavior.
Why is the Attack Hard to Detect?
- Normal traffic. Sync traffic from the attacker device looks like regular sync traffic.
- No password. Attackers never submit your credentials.
- Little evidence. Malicious code does not need to remain on the PC after it copies the token.
How do You Reduce the Risk of Token Theft?
MITRE documents stolen application tokens as technique T1528 and lists four mitigations. See MITRE ATT&CK T1528.
| Mitigation | What it Means |
|---|---|
| Audit | Review cloud accounts and the permissions of OAuth applications |
| Restrict web content | Deny end user consent to unknown OAuth applications |
| Account management | Enforce least privilege role based access |
| User training | Teach users not to authorize unknown third party applications |
Microsoft recommends allowing user consent only for applications from verified publishers. It explains that restricting consent blocks consent phishing and limits the damage of a bad grant. See Microsoft user consent settings.
These controls address OAuth tokens. Copied sync tokens on a device also need endpoint protection and fast removal of lost or infected devices. That last point is practical advice and not official guidance.
For wider cloud risks see the top security issues in cloud computing and cloud data protection controls.
Frequently Asked Questions
What is a Man in the Cloud Attack?
It is an attack where the attacker steals the sync token of a file sync service and syncs a second device to the victim account.
Does a Password Reset Stop It?
Not always. In the 2015 research Dropbox tokens stayed valid after a password reset. Check provider documentation for current behavior.
Which Services were Tested?
Tests covered Dropbox, Google Drive, Box and Microsoft OneDrive.
Does the Attack Need Malware on the PC?
It needs code to copy the token once. That code can stop afterward.
How do I Reduce Token Theft Risk?
Audit accounts and applications, enforce least privilege, restrict user consent and train users.
Key Takeaways
- Sync services store a token so users avoid repeated sign ins.
- Stolen tokens let attackers sync their own device without a password.
- Imperva described the technique in July 2015.
- MITRE lists audit, restricted consent, least privilege and training as mitigations.
- Check provider documentation because behavior has changed since 2015.
Sources and References
This guide follows MITRE and Microsoft documentation. Imperva research from 2015 is summarized from news coverage and is not linked.
- Steal Application Access Token T1528 (MITRE ATT&CK) attack.mitre.org
- Configure User Consent to Applications (Microsoft Learn) learn.microsoft.com