Microsoft 365 exploit could give attackers access to all your emails

Email warning
(Image credit: Shutterstock)

Researchers have uncovered a new way to abuse a workflow automation feature in Microsoft 365 to exfiltrate data. 

Eric Saraga from cybersecurity firm Varonis discovered how Power Automate, a feature found in Microsoft 365 for Outlook, SharePoint, and OneDrive, can be abused to automatically share or send files, or forward emails, to unauthorized third parties. Not in the fashion of ransomware, but devastating nonetheless.

The premise is simple: Power Automate, a feature that is enabled by default with Microsoft 365 applications, allows users to create their own “flows” - automated cross-app behaviors. To set these behaviors up, the user must first create a connection between two apps, allowing data to flow between the two. 

Faking an Azure app

In a fashion similar to forwarding emails, Saraga explains, these flows can be used to extract emails, as well as files from SharePoint and One drive. There is even the possibility to exfiltrate data from other Microsoft 365 applications, including MSGraph, he added. 

Saraga also explains two methods with which flows can be abused: one is by having direct access to the victim’s endpoint, while the other one requires tricking the victim into downloading a fake Azure application.

The first method is somewhat harder to pull off, but is also more devastating. 

“Creating flows can be done programmatically using the flow API. Although there’s no dedicated Power Automate API, the flow endpoints can be used to query for existing connections and to create a flow,” he explains. 

“Once a Microsoft 365 account is compromised, attackers can simply execute a command that will leak sensitive data coming in, without the need to manually create the Power Automate flow.”

The second method - tricking the victim into downloading the app - comes with a caveat. Once the user consents to running the malware app, it will have the necessary permissions to create a flow. However, there is no way to create a new connection using the app. The attacker can onl use existing connections, meaning Azure applications for this attack limit the malicious actors to users who have already made certain connections.

“The more fool-proof method would be to use the user’s credentials or a Power Automate authentication token,” he concludes.

One of the ways to mitigate the threat, Saraga explains, is to monitor for behaviors.

“Behavior-based alerts are also extremely effective at detecting when a user is infected with malware that is operating under the user’s context—it’s very hard for attackers to emulate a user’s normal day-to-day behavior,” he concluded.

Sead is a seasoned freelance journalist based in Sarajevo, Bosnia and Herzegovina. He writes about IT (cloud, IoT, 5G, VPN) and cybersecurity (ransomware, data breaches, laws and regulations). In his career, spanning more than a decade, he’s written for numerous media outlets, including Al Jazeera Balkans. He’s also held several modules on content writing for Represent Communications.

Read more
A person at a laptop with a cybersecure lock symbol floating above it.
A worrying security flaw could have left Microsoft SharePoint users open to attack
Outlook
Dangerous Microsoft Outlook flaw could let hackers send out malware via email
Illustration of a laptop with a magnifying glass exposing a beetle on-screen
Microsoft Outlook targeted by new malware attacks allowing sneaky hijacking
The best free firewall
Microsoft fixes Power Pages security flaw, tells users to be on their guard
Hacker Typing
This devious two-step phishing campaign uses Microsoft tools to bypass email security
A fish hook is lying across a computer keyboard, representing a phishing attack on a computer system
Microsoft authentication system spoofed via phishing attack
Latest in Software & Services
woman listening to computer
AWS vs Azure: choosing the right platform to maximize your company's investment
A person at a desktop computer working on spreadsheet tables.
Trello vs Jira: which project management solution is best for you?
Autonomous finance
Quickbooks vs Quicken: what are the main strengths and weaknesses for your business
finance
Quickbooks vs Xero: which is the best for your business?
Group of people meeting
Zoom vs Google Meet: which is the best video conferencing tool for your business?
Fingers typing on a computer keyboard.
Microsoft 365 Personal vs Microsoft 365 Family: are there any real differences?
Latest in News
Google Pixel 8a in aloe green showing
Google Pixel 9a benchmark link teases the performance of the upcoming mid-ranger
Quordle on a smartphone held in a hand
Quordle hints and answers for Monday, March 17 (game #1148)
NYT Strands homescreen on a mobile phone screen, on a light blue background
NYT Strands hints and answers for Monday, March 17 (game #379)
NYT Connections homescreen on a phone, on a purple background
NYT Connections hints and answers for Monday, March 17 (game #645)
Apple iPhone 16 Pro HANDS ON
Leaked iPhone 17 dummy units may have given us our best look yet at all four models
A super close up image of the Google Gemini app in the Play Store
It's official: Google Assistant will be retired for phones this year, with Gemini taking over