FortiSIEM Rules

Office365: Mailbox Login from Outside My Country

Rule ID

PH_RULE_O365_MailboxLoginOutsideCountry

Default Status

Enabled

Description

Office365 analytics reported a mailbox login from a source IP that is outside your home countries list. To set approved countries, go to Resources:Country Groups:My Home and edit with the list of expected countries.

Severity

9

Category

Security

MITRE ATT&CK® Tactics

Collection

Collection consists of techniques adversaries may use to gather information and the sources information is collected from that are relevant to following through on the adversary's objectives. Frequently, the next goal after collecting data is to steal (exfiltrate) the data. Common target sources include various drive types, browsers, audio, video, and email. Common collection methods include capturing screenshots and keyboard input.

https://attack.mitre.org/tactics/TA0009

MITRE ATT&CK® Techniques


T1114.002

Email Collection: Remote Email Collection

Adversaries may target an Exchange server or Office 365 to collect sensitive information. Adversaries may leverage a user's credentials and interact directly with the Exchange server to acquire information from within a network. Adversaries may also access externally facing Exchange services or Office 365 to access email using credentials or access tokens. Tools such as [MailSniper](https://attack.mitre.org/software/S0413) can be used to automate searches for specific keywords.

https://attack.mitre.org/techniques/T1114/002

Impacts

Application

Data Source

Office 365 via Management Activity API

Detection

Correlation

Remediation Guidance

Investigate the source, and determine if it is legitimate. Lock and Change credentials of all affected accounts if it is not. Turn on Strong Authentication for all accounts if possible. If the login source country is expected for many users, you can add it to your "My Home" country list under the Resources -> Country groups configuration.

Time Window

If the following pattern or patterns match an ingested event within the given time window in seconds, trigger an incident.

300 seconds

Trigger Conditions

If the following defined pattern/s occur within a 300 second time window.

login_outside_country

SubPattern Definitions

SubPattern Name: login_outside_country

This is the named definition of the event query, this is important if multiple subpatterns are defined to distinguish them.

SubPattern Query

This is the query logic that matches incoming events

eventType="MS_OFFICE365_Exchange_MailboxLogin" AND srcGeoCountry NOT IN (Group@PH_COUNTRY_GROUP_MYHOME)

Group by Attributes

This defines how matching events are aggregated, only events with the same matching attribute values are grouped into one unique incident ID

user,srcGeoCountry,srcIpAddr

Aggregate Constraint

This is most typically a numerical constraint that defines when the rule should trigger an incident

COUNT(*) >= 1

Incident Attribute Mapping

This section defines which fields in matching raw events should be mapped to the incident attributes in the resulting incident.

The available raw event attributes to map are limited to the group by attributes and the aggregate event constraint fields for each subpattern

 srcIpAddr=login_outside_country.srcIpAddr,
user=login_outside_country.user,
srcGeoCountry=login_outside_country.srcGeoCountry,
incidentCount=login_outside_country.COUNT(*)