Detection rules › Kusto

Known Forest Blizzard group domains - July 2019

Severity
high
Time window
1d
Author
Microsoft Security Research
Source
github.com/Azure/Azure-Sentinel

'Matches domain name IOCs related to Forest Blizzard group activity published July 2019 with CommonSecurityLog, DnsEvents and VMConnection dataTypes. References: https://blogs.microsoft.com/on-the-issues/2019/07/17/new-cyberthreats-require-new-ways-to-protect-democracy/.'

MITRE ATT&CK coverage

TacticTechniques
Command & ControlT1071 Application Layer Protocol

Rule body kusto

id: 074ce265-f684-41cd-af07-613c5f3e6d0d
name: Known Forest Blizzard group domains - July 2019
description: |
  'Matches domain name IOCs related to Forest Blizzard group activity published July 2019 with CommonSecurityLog, DnsEvents and VMConnection dataTypes.
  References: https://blogs.microsoft.com/on-the-issues/2019/07/17/new-cyberthreats-require-new-ways-to-protect-democracy/.'
severity: High
tags:
  - Schema: ASIMDns
    SchemaVersion: 0.1.1
requiredDataConnectors:
  - connectorId: DNS
    dataTypes:
      - DnsEvents
  - connectorId: AzureMonitor(VMInsights)
    dataTypes:
      - VMConnection
  - connectorId: CiscoASA
    dataTypes:
      - CommonSecurityLog
  - connectorId: PaloAltoNetworks
    dataTypes:
      - CommonSecurityLog
  - connectorId: AzureFirewall
    dataTypes: 
      - AzureDiagnostics
      - AZFWApplicationRule
      - AZFWDnsQuery
  - connectorId: Zscaler
    dataTypes:
      - CommonSecurityLog
  - connectorId: InfobloxNIOS
    dataTypes: 
      - Syslog
  - connectorId: GCPDNSDataConnector
    dataTypes: 
      - GCP_DNS_CL
  - connectorId: NXLogDnsLogs
    dataTypes: 
      - NXLog_DNS_Server_CL
  - connectorId: CiscoUmbrellaDataConnector
    dataTypes: 
      - Cisco_Umbrella_dns_CL
  - connectorId: Corelight
    dataTypes: 
      - Corelight_CL

queryFrequency: 1d
queryPeriod: 1d
triggerOperator: gt
triggerThreshold: 0
tactics:
  - CommandAndControl
relevantTechniques:
  - T1071
query: |
  let DomainNames = dynamic(["irf.services","microsoft-onthehub.com","msofficelab.com","com-mailbox.com","my-sharefile.com","my-sharepoints.com",
  "accounts-web-mail.com","customer-certificate.com","session-users-activities.com","user-profile-credentials.com","verify-linke.com","support-servics.net",
  "onedrive-sharedfile.com","onedrv-live.com","transparencyinternational-my-sharepoint.com","transparencyinternational-my-sharepoints.com","soros-my-sharepoint.com"]);
  (union isfuzzy=true
    (CommonSecurityLog
    | where Message has_any (DomainNames)
    | parse Message with * '(' DNSName ')' *
    | extend AccountName = SourceUserID, DeviceName, IPAddress = SourceIP
    ),
    (_Im_Dns(domain_has_any=DomainNames)
    | where DnsQuery has_any (DomainNames)
    | extend IPAddress = SrcIpAddr, DeviceName = Dvc
    ),
    (VMConnection
    | where RemoteDnsCanonicalNames has_any (DomainNames)
    | parse RemoteDnsCanonicalNames with * '["' DNSName '"]' *
    | extend IPAddress = RemoteIp, DeviceName = Computer
    ),
    (AzureDiagnostics 
    | where ResourceType == "AZUREFIREWALLS"
    | where Category == "AzureFirewallApplicationRule"
    | parse msg_s with Protocol 'request from ' SourceHost ':' SourcePort 'to ' DestinationHost ':' DestinationPort '. Action:' Action
    | where DestinationHost has_any (DomainNames)
    | extend DNSName = DestinationHost 
    | extend IPAddress = SourceHost
    ),
    (AzureDiagnostics
    | where ResourceType == "AZUREFIREWALLS"
    | where Category == "AzureFirewallDnsProxy"
    | project TimeGenerated,Resource, msg_s, Type
    | parse msg_s with "DNS Request: " ClientIP ":" ClientPort " - " QueryID " " Request_Type " " Request_Class " " Request_Name ". " Request_Protocol " " Request_Size " " EDNSO_DO " " EDNS0_Buffersize " " Responce_Code " " Responce_Flags " " Responce_Size " " Response_Duration
    | where Request_Name  has_any (DomainNames)
    | extend DNSName = Request_Name
    | extend IPAddress = ClientIP
    ),
    (AZFWApplicationRule
    | where isnotempty(Fqdn)
    | where Fqdn has_any (DomainNames)  
    | extend DNSName = Fqdn 
    | extend IPAddress = SourceIp
    ),
    (AZFWDnsQuery
    | where isnotempty(QueryName)
    | where QueryName has_any (DomainNames)
    | extend DNSName = QueryName
    | extend IPAddress = SourceIp
    ),
    (
      _Im_WebSession(url_has_any=DomainNames)
      | extend IPAddress=IpAddr, DeviceName=Hostname, AccountName = tostring(split(User, "@")[0]), AccountDomain = tostring(split(User, "@")[1])
    )
  )
  | where DNSName has_any (DomainNames)
  | extend timestamp = TimeGenerated
  | extend HostName = tostring(split(DeviceName, ".")[0]), DomainIndex = toint(indexof(DeviceName, '.'))
  | extend HostNameDomain = iff(DomainIndex != -1, substring(DeviceName, DomainIndex + 1), DeviceName)
entityMappings:
  - entityType: Account
    fieldMappings:
      - identifier: FullName
        columnName: User
      - identifier: Name
        columnName: AccountName
      - identifier: NTDomain
        columnName: AccountDomain
  - entityType: Host
    fieldMappings:
      - identifier: FullName
        columnName: DeviceName
      - identifier: HostName
        columnName: HostName
      - identifier: NTDomain
        columnName: HostNameDomain
  - entityType: IP
    fieldMappings:
      - identifier: Address
        columnName: IPAddress
version: 1.6.1
kind: Scheduled
metadata:
    source:
        kind: Community
    author:
        name: Microsoft Security Research
    support:
        tier: Community
    categories:
        domains: [ "Security - 0-day Vulnerability" ]

Stages and Predicates

Let binding: DomainNames

let DomainNames = dynamic(["irf.services","microsoft-onthehub.com","msofficelab.com","com-mailbox.com","my-sharefile.com","my-sharepoints.com",
"accounts-web-mail.com","customer-certificate.com","session-users-activities.com","user-profile-credentials.com","verify-linke.com","support-servics.net",
"onedrive-sharedfile.com","onedrv-live.com","transparencyinternational-my-sharepoint.com","transparencyinternational-my-sharepoints.com","soros-my-sharepoint.com"]);

union isfuzzy=true (8 sources)

Each leg below queries one source; the rule matches if any leg does. Sources: CommonSecurityLog, _Im_Dns(domain_has_any=DomainNames), VMConnection, AzureDiagnostics, AzureDiagnostics, AZFWApplicationRule, AZFWDnsQuery, _Im_WebSession(url_has_any=DomainNames)

Leg 1: CommonSecurityLog

CommonSecurityLog
  | where Message has_any (DomainNames)
  | parse Message with * '(' DNSName ')' *
  | extend AccountName = SourceUserID, DeviceName, IPAddress = SourceIP

Leg 2: _Im_Dns(domain_has_any=DomainNames)

_Im_Dns(domain_has_any=DomainNames)
  | where DnsQuery has_any (DomainNames)
  | extend IPAddress = SrcIpAddr, DeviceName = Dvc

Leg 3: VMConnection

VMConnection
  | where RemoteDnsCanonicalNames has_any (DomainNames)
  | parse RemoteDnsCanonicalNames with * '["' DNSName '"]' *
  | extend IPAddress = RemoteIp, DeviceName = Computer

Leg 4: AzureDiagnostics

AzureDiagnostics 
  | where ResourceType == "AZUREFIREWALLS"
  | where Category == "AzureFirewallApplicationRule"
  | parse msg_s with Protocol 'request from ' SourceHost ':' SourcePort 'to ' DestinationHost ':' DestinationPort '. Action:' Action
  | where DestinationHost has_any (DomainNames)
  | extend DNSName = DestinationHost 
  | extend IPAddress = SourceHost

Leg 5: AzureDiagnostics

AzureDiagnostics
  | where ResourceType == "AZUREFIREWALLS"
  | where Category == "AzureFirewallDnsProxy"
  | project TimeGenerated,Resource, msg_s, Type
  | parse msg_s with "DNS Request: " ClientIP ":" ClientPort " - " QueryID " " Request_Type " " Request_Class " " Request_Name ". " Request_Protocol " " Request_Size " " EDNSO_DO " " EDNS0_Buffersize " " Responce_Code " " Responce_Flags " " Responce_Size " " Response_Duration
  | where Request_Name  has_any (DomainNames)
  | extend DNSName = Request_Name
  | extend IPAddress = ClientIP

Leg 6: AZFWApplicationRule

AZFWApplicationRule
  | where isnotempty(Fqdn)
  | where Fqdn has_any (DomainNames)  
  | extend DNSName = Fqdn 
  | extend IPAddress = SourceIp

Leg 7: AZFWDnsQuery

AZFWDnsQuery
  | where isnotempty(QueryName)
  | where QueryName has_any (DomainNames)
  | extend DNSName = QueryName
  | extend IPAddress = SourceIp

Leg 8: _Im_WebSession(url_has_any=DomainNames)

_Im_WebSession(url_has_any=DomainNames)
    | extend IPAddress=IpAddr, DeviceName=Hostname, AccountName = tostring(split(User, "@")[0]), AccountDomain = tostring(split(User, "@")[1])

Applied to the combined result

| where DNSName has_any (DomainNames)
| extend timestamp = TimeGenerated
| extend HostName = tostring(split(DeviceName, ".")[0]), DomainIndex = toint(indexof(DeviceName, '.'))
| extend HostNameDomain = iff(DomainIndex != -1, substring(DeviceName, DomainIndex + 1), DeviceName)

Indicators

Each row is a field, operator, and value that the rule matches. The corpus column counts how many other rules in the catalog look for the same combination: high numbers point to widely-used, community-vetted indicators. Blank or 1 shows that the indicator is specific to this rule.

FieldKindValues
Categoryeq
  • AzureFirewallApplicationRule transforms: cased
  • AzureFirewallDnsProxy transforms: cased
DNSNamematch
  • accounts-web-mail.com
  • com-mailbox.com
  • customer-certificate.com
  • irf.services
  • microsoft-onthehub.com
  • msofficelab.com
  • my-sharefile.com
  • my-sharepoints.com
  • onedrive-sharedfile.com
  • onedrv-live.com
  • session-users-activities.com
  • soros-my-sharepoint.com
  • support-servics.net
  • transparencyinternational-my-sharepoint.com
  • transparencyinternational-my-sharepoints.com
  • user-profile-credentials.com
  • verify-linke.com
DestinationHostmatch
  • accounts-web-mail.com
  • com-mailbox.com
  • customer-certificate.com
  • irf.services
  • microsoft-onthehub.com
  • msofficelab.com
  • my-sharefile.com
  • my-sharepoints.com
  • onedrive-sharedfile.com
  • onedrv-live.com
  • session-users-activities.com
  • soros-my-sharepoint.com
  • support-servics.net
  • transparencyinternational-my-sharepoint.com
  • transparencyinternational-my-sharepoints.com
  • user-profile-credentials.com
  • verify-linke.com
DnsQuerymatch
  • accounts-web-mail.com
  • com-mailbox.com
  • customer-certificate.com
  • irf.services
  • microsoft-onthehub.com
  • msofficelab.com
  • my-sharefile.com
  • my-sharepoints.com
  • onedrive-sharedfile.com
  • onedrv-live.com
  • session-users-activities.com
  • soros-my-sharepoint.com
  • support-servics.net
  • transparencyinternational-my-sharepoint.com
  • transparencyinternational-my-sharepoints.com
  • user-profile-credentials.com
  • verify-linke.com
Fqdnis_not_null
  • (no value, null check)
Fqdnmatch
  • accounts-web-mail.com
  • com-mailbox.com
  • customer-certificate.com
  • irf.services
  • microsoft-onthehub.com
  • msofficelab.com
  • my-sharefile.com
  • my-sharepoints.com
  • onedrive-sharedfile.com
  • onedrv-live.com
  • session-users-activities.com
  • soros-my-sharepoint.com
  • support-servics.net
  • transparencyinternational-my-sharepoint.com
  • transparencyinternational-my-sharepoints.com
  • user-profile-credentials.com
  • verify-linke.com
Messagematch
  • accounts-web-mail.com
  • com-mailbox.com
  • customer-certificate.com
  • irf.services
  • microsoft-onthehub.com
  • msofficelab.com
  • my-sharefile.com
  • my-sharepoints.com
  • onedrive-sharedfile.com
  • onedrv-live.com
  • session-users-activities.com
  • soros-my-sharepoint.com
  • support-servics.net
  • transparencyinternational-my-sharepoint.com
  • transparencyinternational-my-sharepoints.com
  • user-profile-credentials.com
  • verify-linke.com
QueryNameis_not_null
  • (no value, null check)
QueryNamematch
  • accounts-web-mail.com
  • com-mailbox.com
  • customer-certificate.com
  • irf.services
  • microsoft-onthehub.com
  • msofficelab.com
  • my-sharefile.com
  • my-sharepoints.com
  • onedrive-sharedfile.com
  • onedrv-live.com
  • session-users-activities.com
  • soros-my-sharepoint.com
  • support-servics.net
  • transparencyinternational-my-sharepoint.com
  • transparencyinternational-my-sharepoints.com
  • user-profile-credentials.com
  • verify-linke.com
RemoteDnsCanonicalNamesmatch
  • accounts-web-mail.com
  • com-mailbox.com
  • customer-certificate.com
  • irf.services
  • microsoft-onthehub.com
  • msofficelab.com
  • my-sharefile.com
  • my-sharepoints.com
  • onedrive-sharedfile.com
  • onedrv-live.com
  • session-users-activities.com
  • soros-my-sharepoint.com
  • support-servics.net
  • transparencyinternational-my-sharepoint.com
  • transparencyinternational-my-sharepoints.com
  • user-profile-credentials.com
  • verify-linke.com
Request_Namematch
  • accounts-web-mail.com
  • com-mailbox.com
  • customer-certificate.com
  • irf.services
  • microsoft-onthehub.com
  • msofficelab.com
  • my-sharefile.com
  • my-sharepoints.com
  • onedrive-sharedfile.com
  • onedrv-live.com
  • session-users-activities.com
  • soros-my-sharepoint.com
  • support-servics.net
  • transparencyinternational-my-sharepoint.com
  • transparencyinternational-my-sharepoints.com
  • user-profile-credentials.com
  • verify-linke.com
ResourceTypeeq
  • AZUREFIREWALLS transforms: cased

Output fields

Fields the rule emits when it matches. Chronicle authors list these in the outcome block; they appear on the detection and $risk_score drives alerting. Sentinel / Defender XDR rules build them up through project / summarize / extend stages. Sentinel maps these into alert fields via entityMappings and customDetails; Defender XDR custom detections surface them as alert fields directly.

FieldSource
Resourceproject
TimeGeneratedproject
Typeproject
msg_sproject
DNSNameextend
IPAddressextend
AccountDomainextend
AccountNameextend
DeviceNameextend
timestampextend
DomainIndexextend
HostNameextend
HostNameDomainextend