let iocs = externaldata(DateAdded:string,IoC:string,Type:string,TLP:string) [@"https://raw.githubusercontent.com/Azure/Azure-Sentinel/master/Sample%20Data/Feeds/SOURGUM.csv"] with (format="csv", ignoreFirstRecord=True);
let file_path1 = (iocs | where Type =~ "filepath1" | project IoC);
let file_path2 = (iocs | where Type =~ "filepath2" | project IoC);
let file_path3 = (iocs | where Type =~ "filepath3" | project IoC);
let reg_key = (iocs | where Type =~ "regkey" | project IoC);
WindowsEvent
| where EventID == 4688 and (EventData has_any (file_path1) or EventData has_any (file_path2) or EventData has_any (file_path3) or EventData has_any ('reg add') or EventData has_any (reg_key) )
| extend CommandLine = tostring(EventData.CommandLine)
| extend NewProcessName = tostring(EventData.NewProcessName)
| extend ParentProcessName = tostring(EventData.ParentProcessName)
| where (CommandLine has_any (file_path1)) or
(CommandLine has_any (file_path3)) or
(CommandLine has 'reg add' and CommandLine has_any (reg_key) and CommandLine has_any (file_path2)) or
(NewProcessName has_any (file_path1)) or
(NewProcessName has_any (file_path3)) or
(ParentProcessName has_any (file_path1)) or
(ParentProcessName has_any (file_path3))
| extend Account = strcat(EventData.SubjectDomainName,"\\", EventData.SubjectUserName)
| extend NewProcessId = tostring(EventData.NewProcessId)
| extend IP = tostring(EventData.IpAddress)
| project TimeGenerated, Computer, NewProcessName, ParentProcessName, Account, NewProcessId, Type, IP
| extend Alert = 'SOURGUM IOC detected'
| extend AccountName = tostring(split(Account, @'\')[1]), AccountNTDomain = tostring(split(Account, @'\')[0])
| extend HostName = tostring(split(Computer, ".")[0]), DomainIndex = toint(indexof(Computer, '.'))
| extend HostNameDomain = iff(DomainIndex != -1, substring(Computer, DomainIndex + 1), Computer)
name: Caramel Tsunami Actor IOC - July 2021
relevantTechniques:
- T1546
id: 066395ac-ef91-4993-8bf6-25c61ab0ca5a
OriginalUri: https://github.com/Azure/Azure-Sentinel/blob/master/Solutions/Windows Forwarded Events/Analytic Rules/CaramelTsunami_IOC_WindowsEvent.yaml
requiredDataConnectors:
- dataTypes:
- WindowsEvent
connectorId: WindowsForwardedEvents
version: 1.0.4
severity: High
triggerThreshold: 0
tags:
- Caramel Tsunami
queryPeriod: 6h
entityMappings:
- fieldMappings:
- identifier: FullName
columnName: Account
- identifier: Name
columnName: AccountName
- identifier: NTDomain
columnName: AccountNTDomain
entityType: Account
- fieldMappings:
- identifier: FullName
columnName: Computer
- identifier: HostName
columnName: HostName
- identifier: DnsDomain
columnName: HostNameDomain
entityType: Host
- fieldMappings:
- identifier: Address
columnName: IP
entityType: IP
- fieldMappings:
- identifier: ProcessId
columnName: NewProcessId
entityType: Process
queryFrequency: 6h
status: Available
query: |
let iocs = externaldata(DateAdded:string,IoC:string,Type:string,TLP:string) [@"https://raw.githubusercontent.com/Azure/Azure-Sentinel/master/Sample%20Data/Feeds/SOURGUM.csv"] with (format="csv", ignoreFirstRecord=True);
let file_path1 = (iocs | where Type =~ "filepath1" | project IoC);
let file_path2 = (iocs | where Type =~ "filepath2" | project IoC);
let file_path3 = (iocs | where Type =~ "filepath3" | project IoC);
let reg_key = (iocs | where Type =~ "regkey" | project IoC);
WindowsEvent
| where EventID == 4688 and (EventData has_any (file_path1) or EventData has_any (file_path2) or EventData has_any (file_path3) or EventData has_any ('reg add') or EventData has_any (reg_key) )
| extend CommandLine = tostring(EventData.CommandLine)
| extend NewProcessName = tostring(EventData.NewProcessName)
| extend ParentProcessName = tostring(EventData.ParentProcessName)
| where (CommandLine has_any (file_path1)) or
(CommandLine has_any (file_path3)) or
(CommandLine has 'reg add' and CommandLine has_any (reg_key) and CommandLine has_any (file_path2)) or
(NewProcessName has_any (file_path1)) or
(NewProcessName has_any (file_path3)) or
(ParentProcessName has_any (file_path1)) or
(ParentProcessName has_any (file_path3))
| extend Account = strcat(EventData.SubjectDomainName,"\\", EventData.SubjectUserName)
| extend NewProcessId = tostring(EventData.NewProcessId)
| extend IP = tostring(EventData.IpAddress)
| project TimeGenerated, Computer, NewProcessName, ParentProcessName, Account, NewProcessId, Type, IP
| extend Alert = 'SOURGUM IOC detected'
| extend AccountName = tostring(split(Account, @'\')[1]), AccountNTDomain = tostring(split(Account, @'\')[0])
| extend HostName = tostring(split(Computer, ".")[0]), DomainIndex = toint(indexof(Computer, '.'))
| extend HostNameDomain = iff(DomainIndex != -1, substring(Computer, DomainIndex + 1), Computer)
tactics:
- Persistence
kind: Scheduled
description: |
'Identifies a match across IOC's related to an actor tracked by Microsoft as Caramel Tsunami'
triggerOperator: gt