Schritt-für-Schritt Implementierungsanleitung für Threat Hunting im M365 Tenant
// Rule 1: Verdächtige Inbox-Weiterleitungsregeln CloudAppEvents | where Timestamp > ago(1h) | where ActionType in ( "New-InboxRule", "Set-InboxRule" ) | where RawEventData has_any ( "ForwardTo", "ForwardAsAttachmentTo", "RedirectTo", "DeleteMessage", "MoveToFolder" ) | extend RuleDetails = tostring(RawEventData) | project Timestamp, AccountDisplayName, AccountUpn, ActionType, IPAddress, RuleDetails
// Rule 2: Login aus unbekanntem Land // Erlaubte Länder anpassen (ISO-Codes) let AllowedCountries = dynamic([ "DE", "AT", "CH", "NL", "BE" ]); IdentityLogonEvents | where Timestamp > ago(1h) | where ActionType == "LogonSuccess" | where isnotempty(Location) | where Location !in (AllowedCountries) | project Timestamp, AccountUpn, AccountDisplayName, Location, IPAddress, DeviceName, LogonType
// Rule 3: Massenversand von internem Konto // Schwellwert: mehr als 50 Mails pro Stunde EmailEvents | where Timestamp > ago(1h) | where EmailDirection == "Outbound" | where SenderFromDomain endswith "ihredomain.com" | summarize MailCount = count(), Recipients = make_set(RecipientEmailAddress) by SenderFromAddress | where MailCount > 50 | order by MailCount desc
// Rule 4: Massendownload außerhalb Arbeitszeiten // Außerhalb Mo–Fr 07:00–19:00 Uhr (UTC+1 → UTC angepasst) CloudAppEvents | where Timestamp > ago(1h) | where Application == "Microsoft SharePoint Online" | where ActionType == "FileDownloaded" | where hourofday(Timestamp) !between (6 .. 18) or dayofweek(Timestamp) in ( 0d, // Sonntag 6d // Samstag ) | summarize Downloads = count(), Files = make_set(ObjectName) by AccountUpn, IPAddress | where Downloads > 20 | order by Downloads desc