59 строки
2.2 KiB
YAML
59 строки
2.2 KiB
YAML
id: 712fab52-2a7d-401e-a08c-ff939cc7c25e
|
|
name: (Preview) TI map URL entity to AuditLogs
|
|
description: |
|
|
'Identifies a match in AuditLogs from any URL IOC from TI'
|
|
severity: Medium
|
|
requiredDataConnectors:
|
|
- connectorId: AzureActiveDirectory
|
|
dataTypes:
|
|
- AuditLogs
|
|
- connectorId: ThreatIntelligence
|
|
dataTypes:
|
|
- ThreatIntelligenceIndicator
|
|
- connectorId: ThreatIntelligenceTaxii
|
|
dataTypes:
|
|
- ThreatIntelligenceIndicator
|
|
queryFrequency: 1h
|
|
queryPeriod: 14d
|
|
triggerOperator: gt
|
|
triggerThreshold: 0
|
|
tactics:
|
|
- Impact
|
|
query: |
|
|
|
|
let dt_lookBack = 1h;
|
|
let ioc_lookBack = 14d;
|
|
ThreatIntelligenceIndicator
|
|
| where TimeGenerated >= ago(ioc_lookBack) and ExpirationDateTime > now()
|
|
| where Active == true
|
|
// Picking up only IOC's that contain the entities we want
|
|
| where isnotempty(Url)
|
|
| join (
|
|
AuditLogs
|
|
| where TimeGenerated >= ago(dt_lookBack)
|
|
// Extract the URL that is contained within the JSON data
|
|
| extend Url = extract("(http[s]?://(?:[a-zA-Z]|[0-9]|[$-_@.&+]|[!*\\(\\),]|(?:%[0-9a-fA-F][0-9a-fA-F]))+);", 1,tostring(TargetResources))
|
|
| where isnotempty(Url)
|
|
| extend userPrincipalName = tostring(parse_json(tostring(InitiatedBy.user)).userPrincipalName)
|
|
| extend TargetResourceDisplayName = tostring(TargetResources[0].displayName)
|
|
| extend Audit_TimeGenerated = TimeGenerated
|
|
) on Url
|
|
| where Audit_TimeGenerated >= TimeGenerated and Audit_TimeGenerated < ExpirationDateTime
|
|
| summarize LatestIndicatorTime = arg_max(TimeGenerated, *) by IndicatorId
|
|
| project LatestIndicatorTime, Description, ActivityGroupNames, IndicatorId, ThreatType, ExpirationDateTime, ConfidenceScore,
|
|
Audit_TimeGenerated, OperationName, Identity, userPrincipalName, TargetResourceDisplayName, Url
|
|
| extend timestamp = Audit_TimeGenerated, AccountCustomEntity = userPrincipalName, HostCustomEntity = TargetResourceDisplayName, URLCustomEntity = Url
|
|
entityMappings:
|
|
- entityType: Account
|
|
fieldMappings:
|
|
- identifier: FullName
|
|
columnName: AccountCustomEntity
|
|
- entityType: Host
|
|
fieldMappings:
|
|
- identifier: FullName
|
|
columnName: HostCustomEntity
|
|
- entityType: URL
|
|
fieldMappings:
|
|
- identifier: Url
|
|
columnName: URLCustomEntity
|
|
version: 1.0.0 |