Skip to main content
Back
IntrusionMicrosoft Entra · SaaS
5 min read

SANS Institute mail-forwarding rule from a malicious Office 365 add-in

Victim
SANS Institute
When
Jul 24, 2020 – Aug 6, 2020Disclosed Aug 11, 2020
Entry
A phishing email posing as a SharePoint file share led one employee to an Amazon S3-hosted page that, per the indicators relay, asked for Office 365 credentials; SANS's notice says no credentials were divulged and that access to the account was granted through a malicious O365 add-in.

In July 2020 a phishing email posing as a SharePoint file share reached several SANS employees. One user opened an Amazon S3-hosted page that, per the indicators relay, asked for Office 365 credentials; SANS's notice says no credentials were divulged and that access was granted through a malicious O365 add-in. A forwarding rule sent 513 emails to an outside address until a review found it on August 6, 2020.

What happened

External Parties
Lure sender
S3 login page
Forwarding address
Internet
Microsoft Entra IDOffice 365 sign-in
SANS Microsoft 365
+ other mailboxes
+ other accounts
+ other systems
Other SANS Accounts
One User's Mailbox
Enable4Excel Add-in
Files With Personal Data

Replaying the SANS July 2020 intrusion

  1. 1

    A bonus-file lure

    Jul 24, 2020

    A fake SharePoint share of a 'July Bonus' spreadsheet reaches several employees, and one user opens an S3-hosted page that, per the indicators relay, asks for Office 365 credentials.

  2. 2

    Consent to Enable4Excel

    Jul 24, 2020, per one relay of the webcast

    An OAuth add-in named Enable4Excel is installed for the account; whether the user gave the password, an OAuth consent or both is unconfirmed.

  3. 3

    A keyword forwarding rule

    Jul 24 – Aug 6, 2020

    A forwarding rule sends 513 emails to an outside address. Per the indicators relay, the add-in created it as the 'Anti Spam Rule', which matches 16 finance keywords.

  4. 4

    Found and removed

    From Aug 6, 2020

    A review of email configuration and rules finds the rule; SANS removes the rule and the add-in and scans every other account.

Impact

One employee account forwarded 513 emails to an outside address for about two weeks, per Hurricane Labs. Some held files with about 28,000 records of personal information, as SANS's notice gives it. No passwords or financial data were in them, and CyberScoop reported no evidence of misuse as of August 12, 2020.

Outcome

Where cloud-provider controls fit

The add-in got into the mailbox through a user's consent in Microsoft Entra ID, and that consent is where a cloud-provider control reaches this chain. Microsoft Entra user consent turned off caps it: a user without a directory role that can grant consent cannot grant it, but the sources do not state the employee's role. An app consent policy that lets your users consent only to apps from verified publishers, for low-impact permissions, caps it, but the sources do not say whether the add-in met either condition. The lure, the click, the inbox rule and the forwarding sit on the endpoint and in your Microsoft 365 tenant, where Exchange Online settings such as automatic external forwarding turned off do the work. Hurricane Labs puts the rule at about two weeks undetected before a review found it, and CyberScoop reported no evidence of misuse as of August 12, 2020.

Could this have been prevented?

In hindsight, no control would have stopped it. 2 controls would have limited how far it went. 5 steps have no cloud-provider control. The counts below are control assessments, not attack stages: several can address the same step. The same replay with the controls in place before the incident shows where each phase would have been refused or bounded.

0
Prevented
2
Contained
5
Not covered

How it could have been prevented

The same replay with the controls in place. Green marks where a step is refused, blue where it is bounded, and red where no control reaches it. Open a row to read the control, why it acts, and its caveat.

External Parties
Lure sender
S3 login page
Forwarding address
Internet
Microsoft Entra IDOffice 365 sign-in
SANS Microsoft 365
+ other mailboxes
+ other accounts
+ other systems
Other SANS Accounts
One User's Mailbox
Enable4Excel Add-in
Files With Personal Data

Replaying the SANS July 2020 intrusion

1 · A bonus-file lure

2 Not covered

2 · Consent to Enable4Excel

2 Contained

3 · A keyword forwarding rule

2 Not covered

4 · Found and removed

1 Not covered

Key facts

  • On July 24, 2020 a phishing email that posed as a SharePoint share of a 'July Bonus' spreadsheet reached several SANS employees, as SecurityWeek relays the SANS indicators post
  • One user clicked 'Open', reached a page on an Amazon S3 bucket in us-east-2 that asked for Office 365 credentials, and an OAuth add-in named Enable4Excel was installed for the account, per BleepingComputer's relay
  • The add-in created a forwarding rule named 'Anti Spam Rule' that matched 16 finance keywords and sent matching mail to an external address, per BleepingComputer's relay
  • The rule forwarded 513 emails; some held files with about 28,000 records of personal information and no passwords or card data, as SANS's notice gives it
  • A systematic review of email configuration and rules found the rule on August 6, 2020; SANS removed the rule and the add-in, scanned all other accounts and found no other indications of compromise
  • SANS disclosed the incident on August 11, 2020 and attributed it to consent phishing, per its notice and ITPro

Sources

Every fact in this breakdown comes from the public reporting below. The replay is a model of that reporting, not a reconstruction of the environment it describes.

  1. 1.
    Data Incident 2020SANS Institute · undated · Vendor reportDiscovery on August 6, 2020 by a systematic review of email configuration and rules, one forwarding rule on a single account, 513 emails, about 28,000 records, a single phishing email as the vector, no credentials divulged, access granted through a malicious O365 add-in (consent phishing), removal of the rule and the add-in, scan of all other accounts
  2. 2.
    SANS Institute Email Breach – 28,000 User Records exposedSecurity Affairs · Aug 12, 2020 · NewsDiscovery on August 6, 2020 by a systematic review of email configuration and rules, single account, forwarded data fields, about 28,000 PII records, 513 emails, removal of the rule and the O365 add-in, scan of all other accounts, no other indications of compromise
  3. 3.
    SANS infosec training org suffers data breach after phishing attackBleepingComputer · Aug 11, 2020 · NewsDisclosure on August 11, 2020, single phishing email as vector, only the affected user's account compromised, 513 emails, about 28,000 member PII records, no passwords or card data
  4. 4.
    SANS shares details on attack that led to their data breachBleepingComputer · Aug 14, 2020 · NewsSharePoint file-share lure, Open button, landing page on an Amazon S3 bucket in us-east-2, Office 365 credential prompt, OAuth add-in Enable4Excel, forwarding rule Anti Spam Rule, 16 finance keywords, external forwarding address
  5. 5.
    SANS Institute Says 28,000 User Records Exposed in Email BreachSecurityWeek · Aug 12, 2020 · NewsDiscovery on August 6, 2020, single account, 513 emails, about 28,000 PII records, no passwords or card data, rule and O365 add-in removed, other accounts scanned
  6. 6.
    SANS Institute Says Multiple Employees Targeted in Recent AttackSecurityWeek · Aug 17, 2020 · NewsPhishing email on July 24, 2020 to multiple employees, one user fell for it, appeared to come from an Office 365 asset, add-in Enable4Excel resembling the Salesforce add-in Enabler4Excel, 513 emails, opportunistic with financial theft the intent
  7. 7.
    SANS Institute, which drills cyber professionals in defense, suffers data breachCyberScoop · Aug 12, 2020 · NewsDiscovery on August 6, 2020, further release stopped, no evidence of abuse at the time
  8. 8.
    Cyber security training firm SANS Institute suffers data breachITPro · Aug 13, 2020 · NewsSANS attribution to consent phishing, malicious Office 365 OAuth applications, 513 emails, about 28,000 records
  9. 9.
    Security Advisory Regarding the Sans Data BreachHurricane Labs · Aug 26, 2020 · ResearchWebcast relay: phishing email received July 24, 2020, forwarding rule active that same day, detection August 6, 2020, about two weeks undetected, mailbox-settings write permission needed to create a forwarding rule (author's analysis)
  10. 10.
    Office 365 Mail Forwarding Rules (and other Mail Rules too)SANS Internet Storm Center · Aug 20, 2020 · ResearchGet-InboxRule audit across mailboxes for ForwardTo, RedirectTo and ForwardAsAttachmentTo, client-only rules not visible to the server-side audit
  11. 11.
    SANS Institute: how to turn a data breach into an educational opportunityAndrea Fortuna (blog) · Aug 17, 2020 · ResearchPhishing email on July 24, 2020 to several employees, lure sender address, Open button starts the app install

The estate in the replay is illustrative and drawn at the level of attack stages; the victim's real environment is not public. Verdicts describe what a control does when it is in place before the incident. They are not an assessment of the victim's security program.

More cloud attack breakdowns

All breakdowns