{"id":135958,"date":"2024-10-08T09:00:00","date_gmt":"2024-10-08T16:00:00","guid":{"rendered":"https:\/\/www.microsoft.com\/en-us\/security\/blog\/?p=135958"},"modified":"2024-10-08T10:37:08","modified_gmt":"2024-10-08T17:37:08","slug":"file-hosting-services-misused-for-identity-phishing","status":"publish","type":"post","link":"https:\/\/www.microsoft.com\/en-us\/security\/blog\/2024\/10\/08\/file-hosting-services-misused-for-identity-phishing\/","title":{"rendered":"File hosting services misused for identity phishing"},"content":{"rendered":"\n
Microsoft has observed campaigns misusing legitimate file hosting services increasingly use defense evasion tactics involving files with restricted access and view-only restrictions. While these campaigns are generic and opportunistic in nature, they involve sophisticated techniques to perform social engineering, evade detection, and expand threat actor reach to other accounts and tenants. These campaigns are intended to compromise identities and devices, and most commonly lead to business email compromise (BEC) attacks to propagate campaigns, among other impacts such as financial fraud, data exfiltration, and lateral movement to endpoints.<\/p>\n\n\n\n
Legitimate hosting services, such as SharePoint, OneDrive, and Dropbox, are widely used by organizations for storing, sharing, and collaborating on files. However, the widespread use of such services also makes them attractive targets for threat actors, who exploit the trust and familiarity associated with these services to deliver malicious files and links, often avoiding detection by traditional security measures.<\/p>\n\n\n\n
Importantly, Microsoft takes action against malicious users violating the Microsoft Services Agreement<\/a> in how they use apps like SharePoint and OneDrive. To help protect enterprise accounts from compromise, by default both Microsoft 365 and Office 365 support multi-factor authentication (MFA)<\/a> and passwordless sign-in. Consumers can also go passwordless<\/a> with their Microsoft account. Because security is a team sport, Microsoft also works with third parties like Dropbox to share threat intelligence and protect mutual customers and the wider community.<\/p>\n\n\n\n In this blog, we discuss the typical attack chain used in campaigns misusing file hosting services and detail the recently observed tactics, techniques, and procedures (TTPs), including the increasing use of certain defense evasion tactics. To help defenders protect their identities and data, we also share mitigation guidance to help reduce the impact of this threat, and detection details and hunting queries to locate potential misuse of file hosting services and related threat actor activities. By understanding these evolving threats and implementing the recommended mitigations, organizations can better protect themselves against these sophisticated campaigns and safeguard digital assets.<\/p>\n\n\n\n Phishing campaigns exploiting legitimate file hosting services have been trending throughout the last few<\/a> years<\/a>, especially due to the relative ease of the technique. The files are delivered through different approaches, including email and email attachments like PDFs, OneNote, and Word files, with the intent of compromising identities or devices. These campaigns are different from traditional phishing attacks because of the sophisticated defense evasion techniques used.<\/p>\n\n\n\n Since mid-April 2024, we observed threat actors increasingly use these tactics aimed at circumventing defense mechanisms:<\/p>\n\n\n\n An example attack chain is provided below, depicting the updated defense evasion techniques being used across stages 4<\/strong>, 5<\/strong>, and 6<\/strong>:<\/p>\n\n\n\n The attack typically begins with the compromise of a user within a trusted vendor. After compromising the trusted vendor, the threat actor hosts a file on the vendor\u2019s file hosting service, which is then shared with a target organization. This misuse of legitimate file hosting services is particularly effective because recipients are more likely to trust emails from known vendors, allowing threat actors to bypass security measures and compromise identities. Often, users from trusted vendors are added to allow lists through policies set by the organization on Exchange Online products, enabling phishing emails to be successfully delivered.<\/p>\n\n\n\n While file names observed in these campaigns also included the recipients, the hosted files typically follow these patterns:<\/p>\n\n\n\n Once the threat actor shares the files on the file hosting service with the intended users, the file hosting service sends the target user an automated email notification with a link to access the file securely. This email is not a phishing email<\/strong> but a notification for the user about the sharing action. In scenarios involving SharePoint or OneDrive, the file is shared from the user\u2019s context, with the compromised user\u2019s email address as the sender. However, in the Dropbox scenario, the file is shared from no-reply@dropbox[.]com<\/em>. The files are shared through automated notification emails with the subject: \u201c<User> shared <document> with you<\/em>\u201d. To evade detections, the threat actor deploys the following additional techniques:<\/p>\n\n\n\n These techniques make detonation and analysis of the sample with the malicious link almost impossible since they are restricted.<\/p>\n\n\n\n When the targeted user accesses the shared file, the user is prompted to verify their identity by providing their email address:<\/p>\n\n\n Next, an OTP is sent from no-reply@notify.microsoft[.]com<\/em>. Once the OTP is submitted, the user is successfully authorized and can view a document, often masquerading as a preview, with a malicious link, which is another lure to make the targeted user click the \u201cView my message\u201d access link.<\/p>\n\n\n This link redirects the user to an adversary-in-the-middle (AiTM) phishing page, where the user is prompted to provide the password and complete multifactor authentication (MFA). The compromised token can then be leveraged by the threat actor to perform the second stage BEC attack and continue the campaign.<\/p>\n\n\n\n Microsoft recommends the following mitigations to reduce the impact of this threat:<\/p>\n\n\n\n Microsoft Defender XDR raises the following alerts by combining Microsoft Defender for Office 365 URL click<\/a> and Microsoft Entra ID Protection risky sign-ins<\/a> signal.<\/p>\n\n\n\n Microsoft Defender XDR<\/strong> <\/p>\n\n\n\n The file sharing events related to the activity in this blog post can be audited through the CloudAppEvents<\/em><\/a> telemetry. Microsoft Defender XDR customers can run the following query to find related activity in their networks: <\/p>\n\n\n\n Automated email notifications and suspicious sign-in activity<\/strong><\/p>\n\n\n\n By correlating the email from the Microsoft notification service or Dropbox automated notification service with a suspicious sign-in activity, we can identify compromises, especially from securely shared SharePoint or Dropbox files.<\/p>\n\n\n Files share contents and suspicious sign-in activity<\/strong><\/p>\n\n\n\n In the majority of the campaigns, the file name involves a sense of urgency or content related to finance or credential updates. By correlating the file share emails with suspicious sign-ins, compromises can be detected. (For example: Alex shared \u201cPassword Reset Mandatory.pdf\u201d with you<\/em>). Since these are observed as campaigns, validating that the same file has been shared with multiple users in the organization can support the detection.<\/p>\n\n\n BEC: File sharing tactics based on the file hosting service used<\/strong><\/p>\n\n\n\n To initiate the file sharing activity, these campaigns commonly use certain action types depending on the file hosting service being leveraged. Below are the action types from the audit logs recorded for the file sharing events. These action types can be used to hunt for activities related to these campaigns by replacing the action type for its respective application in the queries below this table.<\/p>\n\n\n\nAttack overview<\/h2>\n\n\n\n
\n
Initial access<\/h3>\n\n\n\n
\n
\n
\n
\n
Defense evasion techniques<\/h3>\n\n\n\n
\n
\n
Identity compromise<\/h3>\n\n\n\n
Recommended actions<\/h2>\n\n\n\n
\n
Appendix<\/h2>\n\n\n\n
Microsoft Defender XDR detections<\/h3>\n\n\n\n
\n
Hunting queries<\/h3>\n\n\n\n
\nlet usersWithSuspiciousEmails = EmailEvents\n | where SenderFromAddress in ("no-reply@notify.microsoft.com", "no-reply@dropbox.com") or InternetMessageId startswith "<OneTimePasscode"\n | where isnotempty(RecipientObjectId)\n | distinct RecipientObjectId;\nAADSignInEventsBeta\n| where AccountObjectId in (usersWithSuspiciousEmails)\n| where RiskLevelDuringSignIn == 100\n<\/pre><\/div>\n\n\n
\nlet usersWithSuspiciousEmails = EmailEvents\n | where Subject has_all ("shared", "with you")\n | where Subject has_any ("payment", "invoice", "urgent", "mandatory", "Payoff", "Wire", "Confirmation", "password")\n | where isnotempty(RecipientObjectId)\n | summarize RecipientCount = dcount(RecipientObjectId), RecipientList = make_set(RecipientObjectId) by Subject\n | where RecipientCount >= 10\n | mv-expand RecipientList to typeof(string)\n | distinct RecipientList;\nAADSignInEventsBeta\n| where AccountObjectId in (usersWithSuspiciousEmails)\n| where RiskLevelDuringSignIn == 100\n<\/pre><\/div>\n\n\n