Defense Evasion (TA0005)(external, opens in a new tab or window)
Persistence (TA0003)(external, opens in a new tab or window)
text code block:from logs-o365.audit-* metadata _id, _version, _index | where data_stream.dataset == "o365.audit" and event.provider == "Exchange" and event.action in ("New-InboxRule", "Set-InboxRule") and event.outcome == "success" and o365.audit.ObjectId is not null | grok o365.audit.ObjectId """.*\\\\(?<Esql.inbox_rule_name>.*)$""" // only special chars in inbox rule name | where Esql.inbox_rule_name rlike """[!@#$%^&*()_+={[\]|\\:;"'<,>.?/~` \-]+""" | keep @timestamp, _id, _version, _index, Esql.inbox_rule_name, o365.audit.ObjectId, o365.audit.UserId, o365.audit.ApplicationId, user.name, user.domain, event.action, source.ip, source.as.number, source.as.organization.name, o365.audit.Parameters.ForwardTo, o365.audit.Parameters.ForwardAsAttachmentTo, o365.audit.Parameters.RedirectTo
Install detection rules in Elastic Security
Detect M365 Exchange Inbox Rule with Obfuscated Name in the Elastic Security detection engine by installing this rule into your Elastic Stack.
To setup this rule, check out the installation guide for Prebuilt Security Detection Rules(external, opens in a new tab or window).