Detection rules › Kusto

Trend Micro CAS - Unexpected file on file share

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

'Detects unexpected files on file share.'

MITRE ATT&CK coverage

TacticTechniques
Initial Access

Rule body

id: de54f817-f338-46bf-989b-4e016ea6b71b
name: Trend Micro CAS - Unexpected file on file share
description: |
  'Detects unexpected files on file share.'
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~ ('sharepoint', 'onedrive', 'dropbox', 'box', 'googledrive')
  | where isnotempty(SrcFileName)
  | extend file_type = extract(@'\.(\w+)$', 1, SrcFileName)
  | where file_type in~ (f_types) or SrcFileName !contains @'.'
  | 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~ ('sharepoint', 'onedrive', 'dropbox', 'box', 'googledrive')

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) or SrcFileName !contains @'.'

Stage 6: extend

| extend AccountCustomEntity = DstUserName

Indicators

These rows show field, operator, and value matches.

FieldKindValuesSearch
EventCategoryTypein
  • box
  • dropbox
  • googledrive
  • onedrive
  • sharepoint
field:"EventCategoryType" kind:in
SrcFileNameis_not_null
  • (no value, null check)
field:"SrcFileName" kind:is_not_null
file_typein
  • bat
  • exe
  • js
  • lnk
  • ps1
  • scr
  • sh
field:"file_type" kind:in

Output fields

These fields are emitted when the rule matches.

FieldSource
file_typeextend
AccountCustomEntityextend