Detection rules › Kusto
Trend Micro CAS - Unexpected file via mail
'Detects when unexpected file recieved via mail.'
MITRE ATT&CK coverage
| Tactic | Techniques |
|---|---|
| Initial Access | T1566 Phishing |
Rule body kusto
id: 201fd2d1-9131-4b29-bace-ce5d19f3e4ee
name: Trend Micro CAS - Unexpected file via mail
description: |
'Detects when unexpected file recieved 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.0
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
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.
| Field | Kind | Values |
|---|---|---|
EventCategoryType | in |
|
SrcFileName | is_not_null | |
file_type | in |
|
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.
| Field | Source |
|---|---|
file_type | extend |
AccountCustomEntity | extend |