Query Details
// MailItemsAccessed Defense
// https://www.linkedin.com/posts/0x534c_microsoft365-exchangeonline-defenderxdr-activity-7183335339061620738-ztfq/
// Simple & effective custom DefenderXDR hourly rule to detect threat actors accessing Exchange mailboxes via MailItemsAccessed log entry and marked user as compromised.
CloudAppEvents
| where Timestamp > ago(1h)
| where IPTags has_any ("Brute force attacker",
"Password spray attacker", "Malicious", "Tor")
| where ActionType == "MailItemsAccessed"
This query is designed to detect potential threat actors accessing Exchange mailboxes. Here's a simple breakdown:
CloudAppEvents, which logs various activities in cloud applications.Timestamp > ago(1h)).MailItemsAccessed, indicating that someone accessed mail items.In summary, this query identifies recent instances where potentially malicious actors accessed mail items in Exchange mailboxes, based on specific IP tags and action types.

Steven Lim
Released: August 2, 2024
Tables
Keywords
Operators