Detection rules › Kusto

Office ASR rule triggered from browser spawned office process.

Status
available
Severity
medium
Time window
5m
Source
github.com/Azure/Azure-Sentinel

The attacker sends a spearphishing email to a user. The email contains a link which points to a website that eventually presents the user a download of an MS Office document. This document contains a malicious macro. The macro triggers one of the ASR rules. This detection looks for Office ASR violations triggered by an Office document opened from a browser. Note: be aware that you need to have the proper ASR rules enabled for this detection to work.

MITRE ATT&CK coverage

TacticTechniques
Initial Access

Telemetry coverage

Rule body

id: 30580043-2451-4d35-b49f-065728529f4a
name: Office ASR rule triggered from browser spawned office process.  
description: |
  The attacker sends a spearphishing email to a user. The email contains a link which points to a website that eventually presents the user a download of an MS Office document. This document contains a malicious macro. The macro triggers one of the ASR rules. 
  This detection looks for Office ASR violations triggered by an Office document opened from a browser.
  Note: be aware that you need to have the proper ASR rules enabled for this detection to work. 
severity: Medium
status: Available
requiredDataConnectors:
  - connectorId: MicrosoftThreatProtection
    dataTypes:
      - DeviceEvents
queryFrequency: 5m
queryPeriod: 5m
triggerOperator: gt
triggerThreshold: 0
tactics:
  - InitialAccess
relevantTechniques:
  - T1566.002
query: |
  // Add your own browsers here as well. 
  let browsers = dynamic(["iexplore.exe", "chrome.exe", "firefox.exe", "msedge.exe"]);
  DeviceEvents
  | where ActionType contains "Office"
  | where InitiatingProcessFileName in~ (browsers) or InitiatingProcessParentFileName in~ (browsers)
  // Ignore docx, xlsx and pptx files. These don't contain macros.
  | where not(FileName endswith ".docx" or FileName endswith ".xlsx" or FileName endswith ".pptx")
entityMappings:
  - entityType: Account
    fieldMappings:
      - identifier: Sid
        columnName: AccountSid 
      - identifier: Name
        columnName: AccountName
      - identifier: NTDomain
        columnName: AccountDomain
  - entityType: Host
    fieldMappings:
      - identifier: FullName
        columnName: DeviceName
  - entityType: Process
    fieldMappings:
      - identifier: CommandLine
        columnName: ProcessCommandLine
version: 1.0.1
kind: Scheduled

Stages and Predicates

Parameters

let browsers = dynamic(["iexplore.exe", "chrome.exe", "firefox.exe", "msedge.exe"]);

Stage 1: source

DeviceEvents

Stage 2: where

| where ActionType contains "Office"

Stage 3: where

| where InitiatingProcessFileName in~ (browsers) or InitiatingProcessParentFileName in~ (browsers)

Stage 4: where

| where not(FileName endswith ".docx" or FileName endswith ".xlsx" or FileName endswith ".pptx")

Exclusions

The rule actively suppresses these predicates.

FieldKindExcluded valuesSearch
FileNameends_with.docxexcludes:FileName field:"FileName" value:".docx"
FileNameends_with.pptxexcludes:FileName field:"FileName" value:".pptx"
FileNameends_with.xlsxexcludes:FileName field:"FileName" value:".xlsx"

Indicators

These rows show field, operator, and value matches.

FieldKindValuesSearch
ActionTypecontains
  • Office
field:"ActionType" kind:contains value:"Office"
InitiatingProcessFileNamein
  • chrome.exe corpus 9 (elastic 9)
  • firefox.exe corpus 9 (elastic 9)
  • iexplore.exe corpus 8 (elastic 8)
  • msedge.exe corpus 7 (elastic 7)
field:"parent_process_name" kind:in
InitiatingProcessParentFileNamein
  • chrome.exe
  • firefox.exe
  • iexplore.exe
  • msedge.exe
field:"ParentImage" kind:in