Detection rules › Kusto

Trusted Developer Utilities Proxy Execution

Status
available
Severity
medium
Time window
1h
Source
github.com/Azure/Azure-Sentinel

This detection looks at process executions - in some cases with specific command line attributes to filter a lot of common noise.

MITRE ATT&CK coverage

Telemetry coverage

Rule body

id: 5c2bb446-926f-4160-a233-21e335c2c290
name: Trusted Developer Utilities Proxy Execution
description: |
  This detection looks at process executions - in some cases with specific command line attributes to filter a lot of common noise.
severity: Medium
status: Available
requiredDataConnectors:
  - connectorId: MicrosoftThreatProtection
    dataTypes:
      - DeviceProcessEvents
queryFrequency: 1h
queryPeriod: 1h
triggerOperator: gt
triggerThreshold: 0
tactics:
  - DefenseEvasion
relevantTechniques:
  - T1127
query: |
  let Timeframe = 1h;
  DeviceProcessEvents
  | where Timestamp > ago(Timeframe)
  | where (FileName has_any ("msbuild.exe", "msxsl.exe")
  or (FileName has_any ("vbc.exe","csc.exe","jsc.exe") and ProcessCommandLine has_any ("/exe","/dll","/pe64","-exe","-dll","-pe64"))
  or (FileName == ("ilsasm.exe") and ProcessCommandLine has_any ("out","target","t:","reference","r:")))
  // Filter initations by Visual Studio since this is expected behavior.
    and not(FolderPath startswith "C:\\Program Files (x86)\\Microsoft Visual Studio" 
    or InitiatingProcessFolderPath startswith "C:\\Program Files (x86)\\Microsoft Visual Studio" 
    and (InitiatingProcessFileName == "devenv.exe" or InitiatingProcessFileName == "WDExpress.exe"))
entityMappings:
  - entityType: Host
    fieldMappings:
      - identifier: FullName
        columnName: DeviceName
  - entityType: Account
    fieldMappings:
      - identifier: Sid
        columnName: AccountSid 
      - identifier: Name
        columnName: AccountName
      - identifier: NTDomain
        columnName: AccountDomain
  - entityType: Process
    fieldMappings:
      - identifier: CommandLine
        columnName: ProcessCommandLine
version: 1.0.0
kind: Scheduled

Stages and Predicates

Parameters

let Timeframe = 1h;

Stage 1: source

DeviceProcessEvents

Stage 2: where

| where Timestamp > ago(Timeframe)

Stage 3: where

| where (FileName has_any ("msbuild.exe", "msxsl.exe")
or (FileName has_any ("vbc.exe","csc.exe","jsc.exe") and ProcessCommandLine has_any ("/exe","/dll","/pe64","-exe","-dll","-pe64"))
or (FileName == ("ilsasm.exe") and ProcessCommandLine has_any ("out","target","t:","reference","r:")))
  and not(FolderPath startswith "C:\\Program Files (x86)\\Microsoft Visual Studio" 
  or InitiatingProcessFolderPath startswith "C:\\Program Files (x86)\\Microsoft Visual Studio" 
  and (InitiatingProcessFileName == "devenv.exe" or InitiatingProcessFileName == "WDExpress.exe"))

Exclusions

The rule actively suppresses these predicates.

FieldKindExcluded valuesSearch
InitiatingProcessFileNameeqWDExpress.exeexcludes:InitiatingProcessFileName field:"InitiatingProcessFileName" value:"WDExpress.exe"
InitiatingProcessFileNameeqdevenv.exeexcludes:InitiatingProcessFileName field:"InitiatingProcessFileName" value:"devenv.exe"
InitiatingProcessFolderPathstarts_withC:\Program Files (x86)\Microsoft Visual Studioexcludes:InitiatingProcessFolderPath field:"InitiatingProcessFolderPath" value:"C:\Program Files (x86)\Microsoft Visual Studio"
FolderPathstarts_withC:\Program Files (x86)\Microsoft Visual Studioexcludes:FolderPath field:"FolderPath" value:"C:\Program Files (x86)\Microsoft Visual Studio"

Indicators

These rows show field, operator, and value matches.

FieldKindValuesSearch
FileNameeq
  • ilsasm.exe
field:"file_name" kind:eq value:"ilsasm.exe"
FileNamematch
  • csc.exe transforms: term
  • jsc.exe transforms: term
  • msbuild.exe transforms: term corpus 2 (kusto 2)
  • msxsl.exe transforms: term
  • vbc.exe transforms: term
field:"file_name" kind:match
ProcessCommandLinematch
  • -dll transforms: term
  • -exe transforms: term
  • -pe64 transforms: term
  • /dll transforms: term
  • /exe transforms: term
  • /pe64 transforms: term
  • out transforms: term
  • r: transforms: term
  • reference transforms: term
  • t: transforms: term
  • target transforms: term
field:"CommandLine" kind:match