Detect spoof E-mail and send the spoof E-mail to Administrative Quarantine using Exchange Online rule |Part 7#12 5/5 (2) 14 min read

In the current article, we will review how to deal with Spoof E-mail scenario in an Office 365 environment, by creating an Exchange Online rule that will identify Spoofed E-mail (spoof sender) and as a response – “route” this E-mail to the Exchange Online administrative quarantine.

In our particular scenario, we don’t want to enable the E-mail to be sent to the organization user mailbox. Instead, we would like to route the E-mail that has the characters of Spoof E-mail to a “secured area” or an “isolated area” that can be accessed only by authorized representative such as the Exchange Online administrator.

An additional need is a requirement of notifying the “destination recipient” that E-mail message that sent to him blocked, and if he wants to get additional information about the particular E-mail or, ask to release the E-mail he will need to contact a specific technical representative.

The information about the possible Spoof E-mail event will be logged and reported by using the Exchange Online rule option named – incident report.

The main characters of the Spoof E-mail attack scenario:

Our CIO, report that gets an E-mail, which allegedly sent by a legitimate organization recipient (our company CFO) that asks him to transfer a substantial amount of money to a specific bank account number.

In reality, the organization recipient (our company CFO) didn’t send this E-mail message, and there is a high chance that the E-mail sent by a hostile element that tries to attack our organization.

The business needs

The business need and the goals that we need to accomplish are as follows:

  1. We want to identify events in which E-mail messages that sent to our organization recipient have a high chance of being spoofed E-mail (spoofed sender).
  2. We wish to prevent Spoofed E-mail from reaching the organization user’s mailbox.
  3. We don’t want to delete the E-mail that looks like a spoofed E-mail. Instead, we want to send the Spoofed E-mail to a “restricted area” meaning – the Exchange Online administrative quarantine.
  4. Only authorized representative such as the Exchange Online administrator will be able to access the Exchange Online quarantine.
  5. We want to notify the destination recipient that an E-mail message that sent to him was classified as spoofed E-mail and sent to the administrative quarantine. We want to send information + a sample of the Spoofed E-mail to a designated shared mailbox.
  6. We want that a designated user (such as the Exchange Online administrator), will be able to access the shared mailbox that stores the incident reports, so, he could inspect and analyze the spoofed E-mail message.

The Exchange Online Spoofed E-mail rule structure and logic

The Exchange Online rule trigger

The “trigger” that will activate the Exchange Online “Spoofed E-mail rule” will be based on the following two conditions (a combination of condition 1 + condition 2):

  1. An incoming E-mail message that is sent by a non-authenticated recipient (recipient who doesn’t provide user credentials).
  2. A recipient who presents himself by using an E-mail address that includes our public domain name. In our specific scenario, an E-mail address that includes the domain name – com

The Exchange Online rule response

The “action” that will be executed by our Exchange Online “Spoofed E-mail rule” will include the following “parts”:

1. Identify E-mail that has the characters of Spoofed E-mail

2. “Route” the E-mail to administrative quarantine (route the Spoof E-mail to Isolated area)

Detect spoof E-mail message and send E-mail to quarantine - Step 1-3

When Exchange Online identifies E-mail messages that answer the conditions of
“Spoofed E-mail,” the Exchange rule will activate the following sequence:

The E-mail will not be sent to the destination recipient mailbox and instead, will be “routed” to the administrative quarantine (the term administrative quarantine describes a storage space that can be accessed only by the Exchange Online administrator and not by the user).

Exchange Online will generate an E-mail message notification, which sent to the destination recipient who was supposed to receive the e-mail the E-mail (the E-mail that was identified as spoofed E-mail and sent to the quarantine).

In our scenario, we will create a custom E-mail notification and use an HTML code to make to notification message easy to understand and useful to our organization recipients.

3. Send custom E-mail notification to destination recipient

Detect spoof E-mail message and send E-mail to quarantine - Step 2-3

Inform the destination recipient that an E-mail that sent to him was identified as Spoof E-mail and sent to administrative quarantine.

4. Generate an incident report that sent to the E-mail address of the designated recipient\s.
In our scenario, we ask to send the incident report to a designated recipient (shared mailbox named – Spoof E-mail mailbox).

Detect spoof E-mail message and send E-mail to quarantine - Step 3-3

Only authorized user\s can access the “Spoof E-mail shared mailbox”. In our specific scenario, Brad (Brad is our Exchange Online administrator) will have access to the shared mailbox.

In the following diagram, we can see the sequence of actions, that implemented by the Exchange Online Spoofed E-mail rule:

The logic of Exchange rule for detecting spoof E-mail - Send Spoofed E-mail quarantine

Note – although the information in the current article written about Office 365 (Exchange Online) based environment, most of the information is also relevant to Exchange on-Premises based environment.

Configuring The Exchange Online Spoofed E-Mail Rule | Send To Administrative Quarantine | Generate An Incident Report | Send custom E-Mail Notification to the end user

In the following section, we will provide “step by step” instructions for creating the required “Exchange Online Spoofed E-mail rule” that will answer our business needs.

Part 1#2 – configuring the “condition part” of the Exchange Online Spoofed E-mail rule

  • Log in to the Exchange admin portal
  • On the left menu bar, choose –mail flow
  • On the top menu bar, choose –rules

Login to Exchange Online admin portal and create a new rule ~01

  • Click on the plus icon
  • Choose – Create a new rule…

Detect Spoof E-mail & Send to Administrative Quarantine- condition -02

  • In the Name: box, add a descriptive name for the new rule.
    In our specific scenario, we will name the rule – Detect Spoof E-mail –Prepend subject and Send to administrative quarantine
  • Click on the –More Options… link (by default, the interface of the Exchange Online rule includes only a limited set of options. To be able to display the additional options, we will need to “activate” the More Options…).

Detect Spoof E-mail & Send to Administrative Quarantine- condition -03

  • In the section named –Apply this rule if… click on the small black arrow

Detect Spoof E-mail & Send to Administrative Quarantine- condition -04

Condition 1#2

  • Choose the primary menu –The sender…
  • In the submenu, select the option –Is external/internal

Detect Spoof E-mail & Send to Administrative Quarantine- condition -05

  • In the select sender location window, choose the option – Outside the organization.
    The meaning of the term “outside the organization”, relates to a un-authenticated recipient, meaning – a recipient that doesn’t provide user credentials to the mail server.

Detect Spoof E-mail & Send to Administrative Quarantine- condition -06

Condition 2#2

Now, we will add an additional “layer” to the “rule condition”, in which we relate to
the recipient who uses an E-mail address that includes our domain name (o365pilot.com in our specific scenario).

Note – If you would like to read more information about the meaning of the Exchange Online terms– “External Sender” and “outside the organization“, read the following section: Dealing with an E-mail Spoof Attack in Office 365 based environment | Introduction | Part 1#12
  • Click on the – add condition.

Detect Spoof E-mail & Send to Administrative Quarantine- condition -07

  • In the section named – and click on the small black arrow.

Detect Spoof E-mail & Send to Administrative Quarantine- condition -08

  • Choose the primary menu – The sender…
  • In the submenu, select the option – domain is

Detect Spoof E-mail & Send to Administrative Quarantine- condition -09

In the specify domain window, add the required domain name that represents your organization.
In our specific scenario, the public domain name is – o365pilot.com

Note – Don’t forget to click on the plus icon to add the domain name.

Detect Spoof E-mail & Send to Administrative Quarantine- condition -10

Click on the OK option to save the Exchange Online rule settings.

Detect Spoof E-mail & Send to Administrative Quarantine- condition -11

 

Part 2#2 – Configuring the “action part” of the Exchange Online Spoofed E-mail rule

In this phase, we will configure the “second part” of the Exchange Online rule, in which we define the required Exchange response (action) to a scenario of spoofed E-mail that sent to one of our organization recipients.

Detect Spoof E-mail & Send to Administrative Quarantine - action -01

In our scenario, we wish to instruct Exchange Online to respond to the event in which E-mail message identified as Spoof E-mail by implementing the following actions:

1#3 – Send the spoofed E-mail to quarantine.

  • In the section named –Do the following… click on the small black arrow

Detect Spoof E-mail & Send to Administrative Quarantine - action -02

  • Choose the menu option –Redirect the message to…
  • In the submenu choose the menu option –hosted quarantine

Detect Spoof E-mail & Send to Administrative Quarantine - action -03

2#3 – Create an E-mail notification that will send to the destination recipient.

In this step, we will define the action that will send a mail notification, to the Exchange Online recipient who was supposed to get the E-mail message.

  • Click on the option –add action

Detect Spoof E-mail & Send to Administrative Quarantine - action -04

  • In the section named – *. and… click on the small black arrow.

Detect Spoof E-mail & Send to Administrative Quarantine - action -05

  • Choose the menu option –Notify the recipient with a message…

Detect Spoof E-mail & Send to Administrative Quarantine - action -06

In the “provide the message text” window, add the required E-mail notification text.

Technically, the content if the E-mail notification can be a simple text message.
In our scenario, I have prepared a “style E-mail notification” using an HTML format.

This is an example of the content of the custom E-mail message content.

Detect Spoof E-mail & Send to Administrative Quarantine - action -07

If you want to download an example to the HTML format that I have used, you can download the example from the following link

Detect Spoof E-mail & Send to Administrative Quarantine - action -08

3#3 – Create an incident report and send it to a designated recipient.

In this step, we will define the “last action”, in which we instruct Exchange Online to generate + send an incident report to a designated recipient.

  • Click on the option – add action

Detect Spoof E-mail & Send to Administrative Quarantine - action -09

  • In the section named – *. and… click on the small black arrow.

Detect Spoof E-mail & Send to Administrative Quarantine - action -10

  • Choose the menu option – Generate incident report and send it to…

Detect Spoof E-mail & Send to Administrative Quarantine - action -11

The settings of the incident report include two parameters:

  1. The name of the “destination recipient” which will get the incident report.
  2. The information fields that will be included in the incident report.
  • To add the required “destination recipient” name, click on the link – Select one…

Detect Spoof E-mail & Send to Administrative Quarantine - action -12

  • In our specific scenario, the recipient who will get the incident report is Spoof E-mails mailbox.

Detect Spoof E-mail & Send to Administrative Quarantine - action -13

To select the information that will be included within the incident report, click on the link named-*include message properties

Detect Spoof E-mail & Send to Administrative Quarantine - action -14

In our scenario, we will choose to include all the available message properties in the summary report + a copy of the “original Spoof E-mail message”.

  • Select the option – Select all

Detect Spoof E-mail & Send to Administrative Quarantine - action -15

In the following screenshot, we can view the available options:

  • Part A – relates to the info that will appear in the incident report summary.
  • Part B – relates to the option of “attaching” copy of the original E-mail message to the incident report.

Detect Spoof E-mail & Send to Administrative Quarantine - action -16

In the following screenshot, we can see the “final result” – the Exchange Online Spoof email that includes the two parts:

  • The condition part
  • The action part

Detect Spoof E-mail & Send to Administrative Quarantine - action -17

Verifying That The Exchange Online Spoofed E-Mail Rule Is Working Properly

In this phase, we would like to test the Exchange Online Spoof E-mail rule that was created in the former step, and verify that the rule is working properly.

The required results from the Exchange Online Spoofed E-mail rule

Our desired expectations are – when Exchange Online identifies events in which E-mail messages that sent to our organization recipient have a high chance of being spoofed E-mail (spoofed sender), the Exchange Online Spoof E-mail rule will execute that following sequence of actions:

  1. Identify the event of – incoming E-mail messages that have the characters of spoof E-mail.
  2. Send the spoofed E-mail to administrative quarantine.
  3. Send a custom E-mail notification message to the destination recipient (Bob in our specific scenario) notifying him that a Spoof E-mail was sent to him, and he can contact the Exchange Online administrator if he needs to check the specific E-mail message.
  4. Generate an incident report, that will be sent to the E-mail address of the designated recipient\s. In our specific scenario, we ask to send the incident report to a designated recipient (shared mailbox named – Spoof E-mail mailbox).

Simulate a Spoof E-mail attack | Scenario characters

To be able to ensure that the Exchange Online Spoof E-mail rule is working properly, we will simulate a spoof E-mail attack that has the following characters:

  • A “hostile element” is trying to spoof the identity of a legitimate organization recipient named –Suzan using the E-mail address – [email protected]
  • The spoofed E-mail message will be sent to a legitimate organization user named Bob, which uses the E-mail address – [email protected]
Note – if you like to learn about the way that we use for simulating the E-mail spoof attack, you can read the article – How to Simulate E-mail Spoof Attack |Part 11#12

1#3 – Verifying that a custom E-mail notification message to the destination recipient

In the following screenshot, we can see an example of the custom E-mail notification that sent to the destination recipient by the Exchange Online rule.

Verifying The Exchange -Administrative quarantin E-Mail Rule Is Working Properly -01-AA

The custom E-mail notification includes a couple of “parts.”

  1. The upper part (part A) includes the “warning notification” which inform the recipient that an E-mail message that was sent to him is probably Spoof E-mail.
  2. The second part (part B) include a report summary about the E-mail message.
  3. The bottom part (part B) include information about the “contact persons” that the recipient can contact in case he need more information about the specific event.

Verifying The Exchange -Administrative quarantin E-Mail Rule Is Working Properly -02-AA

2#3 – Verifying that the spoofed E-mail sent to administrative quarantine.

To be able to view the content of the Exchange Online administrative quarantine, we will login to the Exchange Online administrative portal.

  • On the left sidebar menu, choose the menu –protection
  • On the top bar menu, choose the menu –quarantine

In the following screenshot, we can see the content of the Exchange Online administrative quarantine.

We can see that the E-mail that sent from [email protected] (the recipient, we use for simulating the spoofed E-mail attack) was “captured by the Exchange Online Spoofed E-mail rule and sent to the Exchange Online administrative quarantine.

Verifying The Exchange -Administrative quarantin E-Mail Rule Is Working Properly -03-AA

The Exchange Online administrator can view the particular E-mail message that was sent to the administrative quarantine and decide if he wants to send the E-mail to his “original destination” meaning the recipient mailbox.

Verifying The Exchange -Administrative quarantin E-Mail Rule Is Working Properly -04-AA

3#3 – verifying that an incident report sent to the designated recipient.

We can see that Exchange Online rule “capture” an event of Spoof E-mail.

As a result, an incident report was sent to the recipient name (Spoof E-mails mailbox) that configured in the Exchange Online rule.

Verifying The Exchange -Administrative quarantin E-Mail Rule Is Working Properly -05-AA

In the following screenshot, we can see an example of the incident report E-mail.

When we look into the incident report, we can see that the incident report includes two parts:

  • The copy of the original E-mail message (A).
  • The incident report summary (B).

The incident report summary includes details such as:

  • Information about the generator of the incident report E-mail message – “This email was automatically generated by the Generate Incident Report action” (number 1).
  • The sender (the “source recipient”) that claim to be a legitimate organization recipient named –[email protected] (number 2).
  • The recipients (the destination recipient) is – [email protected] (number 3)
  • Rule Hit – the Exchange Online rule the “capture” the spoof E-mail event, and the action that was executed by the Exchange Online rule –” Detect Spoof E-mail & Send to Administrative Quarantine, Action: GenerateNotification, Quarantine, GenerateIncidentReport” (number 4).

Verifying The Exchange -Administrative quarantin E-Mail Rule Is Working Properly -06-AA

The next article in the current article series

In the next article – Detect spoof E-mail and send the spoof E-mail to — USER quarantine using Exchange Online rule |Part 8#12, we will review how to create an Exchange Online rule that will identify events of spoofed E-mail and as a response, the Exchange Online spam filter will send the Spoof E-mail to user quarantine and the Exchange Online rule will send a custom E-mail notification to the recipient.

Dealing with spoof E-mail – Office 365 | Article series index

Now it’s Your Turn!
It is important for us to know your opinion on this article

Summary
Detect spoof E-mail and send the spoof E-mail to Administrative Quarantine using Exchange Online rule |Part 7#12
Article Name
Detect spoof E-mail and send the spoof E-mail to Administrative Quarantine using Exchange Online rule |Part 7#12
Description
In the current article, we will review how to deal with Spoof E-mail scenario in an Office 365 environment, by creating an Exchange Online rule that will identify Spoofed E-mail (spoof sender) and as a response – “route” this E-mail to the Exchange Online administrative quarantine.
Author
Publisher Name
o365info.com
Publisher Logo

Related Post

Please rate this

Eyal Doron on EmailEyal Doron on FacebookEyal Doron on GoogleEyal Doron on LinkedinEyal Doron on PinterestEyal Doron on RssEyal Doron on TwitterEyal Doron on WordpressEyal Doron on Youtube
Eyal Doron

Share your knowledge.

It’s a way to achieve immortality.

Dalai Lama


One Response to “Detect spoof E-mail and send the spoof E-mail to Administrative Quarantine using Exchange Online rule |Part 7#12”

  1. Sandro Alves Reply

    Hello,

    I received an email from a supplier that was hacked.

    Customer domain is (header.from = dhavalgroup.com), but the email was sent from (smtp.mailfrom = deltaexports.us).

    How to protect yourself from receiving these fake emails from my suppliers?

    ———–>
    Authentication-Results: spf = none (IP sender is 173,201,192,164)
    smtp.mailfrom = deltaexports.us; mydominio.com.br; dkim = none (message not
    signed) header.d = none; mydomain.com.br; DMARC = none action = none
    header.from = dhavalgroup.com; mydomain.com.br; dkim = none (message not
    signed) header.d = none;
    Received-SPF: None (protection.outlook.com: deltaexports.us does not designate
    permitted sender hosts)
    Received: from p3plwbeout13-02.prod.phx3.secureserver.net (173,201,192,164) by
    BN1BFFO11FD048.mail.protection.outlook.com (10.58.145.3) with Microsoft SMTP
    Server (version = TLS1_2, cipher = TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.669.7
    Frontend via Transport; Mon, 17 Oct 2016 08:56:30 +0000
    Received: from localhost ([173,201,192,136])
                  by p3plwbeout13-02.prod.phx3.secureserver.net with bizsmtp
                  id wYwV1t0012x1vXx01YwVbq; Mon, 17 Oct 2016 01:56:29 -0700
    <————

    Thank you.

Leave a Reply

Your email address will not be published. Required fields are marked *