Detection rules › Kusto
Trusted Developer Utilities Proxy Execution
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
| Tactic | Techniques |
|---|---|
| Stealth |
Telemetry coverage
| Platform | Record / event type |
|---|---|
| Microsoft Defender for Endpoint | DeviceProcessEvents action any: Process activity |
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.
| Field | Kind | Excluded values | Search |
|---|---|---|---|
InitiatingProcessFileName | eq | WDExpress.exe | excludes:InitiatingProcessFileName field:"InitiatingProcessFileName" value:"WDExpress.exe" |
InitiatingProcessFileName | eq | devenv.exe | excludes:InitiatingProcessFileName field:"InitiatingProcessFileName" value:"devenv.exe" |
InitiatingProcessFolderPath | starts_with | C:\Program Files (x86)\Microsoft Visual Studio | excludes:InitiatingProcessFolderPath field:"InitiatingProcessFolderPath" value:"C:\Program Files (x86)\Microsoft Visual Studio" |
FolderPath | starts_with | C:\Program Files (x86)\Microsoft Visual Studio | excludes:FolderPath field:"FolderPath" value:"C:\Program Files (x86)\Microsoft Visual Studio" |
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
FileName | eq |
| field:"file_name" kind:eq value:"ilsasm.exe" |
FileName | match |
| field:"file_name" kind:match |
ProcessCommandLine | match |
| field:"CommandLine" kind:match |