Detection rules › Kusto
Trend Micro CAS - Unexpected file via mail
'Detects when unexpected file received via mail.'
MITRE ATT&CK coverage
| Tactic | Techniques |
|---|---|
| Initial Access |
Rule body
id: 201fd2d1-9131-4b29-bace-ce5d19f3e4ee
name: Trend Micro CAS - Unexpected file via mail
description: |
'Detects when unexpected file received via mail.'
severity: Medium
status: Available
requiredDataConnectors:
- connectorId: TrendMicroCAS
dataTypes:
- TrendMicroCAS
queryFrequency: 1h
queryPeriod: 1h
triggerOperator: gt
triggerThreshold: 0
tactics:
- InitialAccess
relevantTechniques:
- T1566
query: |
let f_types = dynamic(['ps1', 'bat', 'scr', 'sh', 'exe', 'js', 'lnk']);
TrendMicroCAS
| where EventCategoryType in~ ('exchange', 'gmail', 'exchangeserver')
| where isnotempty(SrcFileName)
| extend file_type = extract(@'\.(\w+)$', 1, SrcFileName)
| where file_type in~ (f_types)
| extend AccountCustomEntity = DstUserName
entityMappings:
- entityType: Account
fieldMappings:
- identifier: Name
columnName: AccountCustomEntity
version: 1.0.1
kind: Scheduled
Stages and Predicates
Parameters
let f_types = dynamic(['ps1', 'bat', 'scr', 'sh', 'exe', 'js', 'lnk']);
Stage 1: source
TrendMicroCAS
Stage 2: where
| where EventCategoryType in~ ('exchange', 'gmail', 'exchangeserver')
Stage 3: where
| where isnotempty(SrcFileName)
Stage 4: extend
| extend file_type = extract(@'\.(\w+)$', 1, SrcFileName)
Stage 5: where
| where file_type in~ (f_types)
Stage 6: extend
| extend AccountCustomEntity = DstUserName
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
EventCategoryType | in |
| field:"EventCategoryType" kind:in |
SrcFileName | is_not_null | field:"SrcFileName" kind:is_not_null | |
file_type | in |
| field:"file_type" kind:in |
Output fields
These fields are emitted when the rule matches.
| Field | Source |
|---|---|
file_type | extend |
AccountCustomEntity | extend |