feat(o365): normalize outcomes and group administrator changes - #2661
Conversation
Production counts showed the awareness rules would pass 50 top-level alerts a day on busy tenants: they grouped per object, so every mailbox, folder and target made a new top-level alert (up to 125 a day for folder permissions on one data source), and the rule flood guard switches off a rule after 50. Group the eight awareness rules by acting account and action instead; later changes become child alerts, which stay visible but are not counted. Folder permission changes a user makes to their own mailbox (owner sharing a calendar) are routine and were most of the volume, so the folder rule now skips them. Test fixture added for that case. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A spray is one address trying many accounts. Grouping by address and user made every targeted account a new top-level alert; yesterday's production counts give up to about 1,200 such pairs a day on one tenant, far above the rule flood guard limit of 50. Group by the attacking address so each sprayer is one top-level alert and the per-account attempts are children. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Changes pushed ( What changed
Why
Validation
Note on threat intelligence: this draft changes |
|
@kryonsx heads-up: my unmerged branch |
…ng severity Awareness alerts still recorded large amounts of routine activity as child alerts, and each child is stored, passes tag and automation rules, and goes to automatic alert analysis when that module is on. - Inbox Rule Changed no longer includes UpdateInboxRules. Outlook desktop writes these records repeatedly for the same rules, usually with no rule change; they were almost all of this rule's volume. - Folder Permission Changed also skips records with logon type Owner, which works with filters that do not map the mailbox owner, and changes by Microsoft service accounts (ExternalAccess true with an S-1-5 security identifier as the actor), for example group mailbox configuration. - Mailbox Delegate Permission Changed alerts on grants only, not removals. - The Set-Mailbox forwarding alert needs a non-empty ForwardingSmtpAddress or ForwardingAddress. Exchange records a cleared address as an empty value, and DeliverToMailboxAndForward alone sets no destination. The filter flag is renamed log.o365MailboxForwardingSet to match (filter 1.4.1). - Both forwarding rules alert at medium severity in the Collection category and keep their v11 names, so the name-based rule sync updates the existing rules instead of deleting and recreating them. - Standard technique codes for the connector, client access and inbox rule alerts; the calendar rule no longer lists one reference twice. Fabricated regression cases cover each change and fail on the previous head. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Changes pushed ( What changed
Why
Validation
Not covered: no rule alerts on inbox rules created from Outlook desktop, as in v11. Their |
Brings the draft onto the newest v11, including the alerts module on go-sdk v1.1.36, before revalidating on the newest engine. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Updated to the newest v11 (
This stays a draft. |
|
Revalidated against the newest published engine image,
No code changed. This stays a draft. |
FileMalwareDetected (RecordType 6) and AlertAdded (RecordType 78) are system-generated detections that carry no ResultStatus in production. KryonX's v1.4.1 filter (merged #2661) therefore never resolves actionResult=success for them, which would silently dead the rules. The event's presence is the signal, so match on action alone. Verified against the real filter + production data shapes: all 9 O365 gap rules now fire (MailboxLogin RT2/Succeeded, Set-CASMailbox + Add-MailboxFolderPermission + Remove-DlpPolicy + Set-MailboxAuditBypass RT1/True, Disable/UpdateConditionalAccessPolicy RT8/Success, MailItemsAccessed RT50/Succeeded, FileMalwareDetected RT6 + AlertAdded RT78 no-ResultStatus).
Problem and resulting behavior
Microsoft 365 audit outcomes can be workload-specific. The existing v11 filter treated some non-final or failed operations as success, and Exchange inbox and mailbox administration had overlapping alerts and gaps. This draft derives canonical outcomes from the final workload result. It also adds low-severity awareness alerts for successful Exchange administration changes, and keeps the two forwarding detections at medium severity.
Suspicious Mail Forwarding Rule Creation), and Set-Mailbox setting a forwarding address (O365 Mailbox Auto-Forwarding (Set-Mailbox)). Both keep their v11 names, so the name-based rule sync updates the existing rules in place.These alerts group by tenant, organization, data source, acting account and action. Later changes by the same account become child alerts, so the rule flood guard limit of 50 top-level alerts per data source a day is not reached. Routine records are excluded: Outlook desktop's repeated
UpdateInboxRulessaves, owners changing their own folders, Microsoft service accounts configuring mailboxes, permission removals, and Set-Mailbox calls that only clear forwarding. An alert does not by itself establish compromise or an external recipient.The filter records exact Exchange parameter names before its existing string cast, after clearing any input-supplied markers. The mailbox forwarding flag needs a non-empty forwarding address. The forwarding and SendOnBehalf rules also accept the structured parameter array present in older deployed filters, but these rules need this filter to work with the current v11 cast, so the two should ship together. The overlapping generic forwarding rule is removed. The existing SendAs history escalation remains separate. The password-spraying rule groups by the attacking address.
Evidence and checks
go test ./...inplugins/alertspasses on the newestv11merge with go-sdk v1.1.36.main8a3ade7(go-sdk v1.1.36): all 122 fabricated cases pass, and 328 real records parse with no errors, both before and after this draft and againstv11d2479c1a. The same checks also passed on the earlier 497bf53 build. This does not establish deployment, production grouping, alert indexing or notifications. History-based rules were not exercised end to end.Threat-intelligence dependency: this draft writes
failurewhere v11 wrotefailed. The current feeds plugin skips onlydenied,blockedandfailed, so failed sign-ins from listed addresses become eligible for "Known Malicious IP Detected". Merging EventProcessor #19 first avoids that. See the comments for measurements.Remote-domain, Exchange sharing-policy and organization-relationship rules are deferred until relevant real events can be sampled. This remains a draft against
v11for review. No deployment or merge is part of this change.🤖 Generated with Claude Code