Detection rules › Kusto

Illusive Incidents Analytic Rule

Status
available
Severity
medium
Time window
5m
Group by
AdditionalExtensions, DeviceCustomNumber2, TimeGenerated
Source
github.com/Azure/Azure-Sentinel

'Create a Microsoft Sentinel incident upon a new Illusive alert (incident) and associate all related Illusive events to the relevant Microsoft Sentinel alert. This is done by filtering and processing Illusive Syslog messages.'

MITRE ATT&CK coverage

Rule body

id: 1a7dbcf6-21a2-4255-84b2-c8dbbdca4630
name: Illusive Incidents Analytic Rule
description: |
  'Create a Microsoft Sentinel incident upon a new Illusive alert (incident) and associate all related Illusive events to the relevant Microsoft Sentinel alert. This is done by filtering and processing Illusive Syslog messages.'
severity: Medium
status: Available
requiredDataConnectors: 
  - connectorId: Illusive
    dataTypes:
      - CommonSecurityLog
  - connectorId: illusiveAttackManagementSystemAma
    dataTypes:
      - CommonSecurityLog
  - connectorId: CefAma
    dataTypes:
      - CommonSecurityLog
queryFrequency: 5m
queryPeriod: 5m
triggerOperator: gt
triggerThreshold: 0
tactics:
  - Persistence
  - PrivilegeEscalation
  - DefenseEvasion
  - CredentialAccess
  - LateralMovement
relevantTechniques:
  - T1078
  - T1098
  - T1548
  - T1021
query: |
  CommonSecurityLog
  | where DeviceProduct == "illusive"
  | extend DeviceCustomNumber2 = coalesce(column_ifexists("FieldDeviceCustomNumber2", long(null)),DeviceCustomNumber2)
  | summarize arg_max(TimeGenerated, *) by DeviceCustomNumber2, AdditionalExtensions, TimeGenerated
  | extend Category = extract(@'cat=([^;]+)(\;|$)', 1, AdditionalExtensions), HasForensics = extract(@'cs7=([^;]+)(\;|$)', 1, AdditionalExtensions)
  | extend Category = coalesce(column_ifexists("DeviceEventCategory",""),Category)	
  | where Category == "illusive:alerts"
  | extend IncidentId = DeviceCustomNumber2, IncidentURL = DeviceCustomString5
  | project TimeGenerated, SourceIP, SourceHostName,Computer , DeviceEventClassID ,HasForensics ,SourceUserName, Activity, DeviceAddress,  DestinationHostName, DestinationUserName, IncidentId, IncidentURL
entityMappings:
  - entityType: IP
    fieldMappings:
      - identifier: Address
        columnName: SourceIP
  - entityType: Host
    fieldMappings:
      - identifier: FullName
        columnName: SourceHostName
  - entityType: Host
    fieldMappings:
      - identifier: OMSAgentID
        columnName: Computer
customDetails:
  IllusiveIncidentId: IncidentId
  HasForensics: HasForensics
  Account: SourceUserName
eventGroupingSettings:
  aggregationKind: AlertPerResult
alertDetailsOverride:
  alertDisplayNameFormat: | 
    Illusive Incident: {{IncidentId}}
  alertDescriptionFormat: | 
    Illusive Incident {{IncidentId}} generated at {{TimeGenerated}}
version: 1.0.5
kind: Scheduled

Stages and Predicates

Stage 1: source

CommonSecurityLog

Stage 2: where

| where DeviceProduct == "illusive"

Stage 3: extend

| extend DeviceCustomNumber2 = coalesce(column_ifexists("FieldDeviceCustomNumber2", long(null)),DeviceCustomNumber2)

Stage 4: summarize

| summarize arg_max(TimeGenerated, *) by DeviceCustomNumber2, AdditionalExtensions, TimeGenerated

Stage 5: extend

| extend Category = extract(@'cat=([^;]+)(\;|$)', 1, AdditionalExtensions), HasForensics = extract(@'cs7=([^;]+)(\;|$)', 1, AdditionalExtensions)

Stage 6: extend

| extend Category = coalesce(column_ifexists("DeviceEventCategory",""),Category)

Stage 7: where

| where Category == "illusive:alerts"

Stage 8: extend

| extend IncidentId = DeviceCustomNumber2, IncidentURL = DeviceCustomString5

Stage 9: project

| project TimeGenerated, SourceIP, SourceHostName,Computer , DeviceEventClassID ,HasForensics ,SourceUserName, Activity, DeviceAddress,  DestinationHostName, DestinationUserName, IncidentId, IncidentURL

Indicators

These rows show field, operator, and value matches.

Output fields

These fields are emitted when the rule matches.

FieldSource
Activityproject
Computerproject
DestinationHostNameproject
DestinationUserNameproject
DeviceAddressproject
DeviceEventClassIDproject
HasForensicsproject
IncidentIdproject
IncidentURLproject
SourceHostNameproject
SourceIPproject
SourceUserNameproject
TimeGeneratedproject