Microsoft Sentinel medium experimental kql

Dataverse - TI map URL to DataverseActivity

Identifies a match in DataverseActivity from any URL IOC from Microsoft Sentinel Threat Intelligence.

View Source

Detection Logic

let dt_lookBack = 1h;
let ioc_lookBack = 14d;
ThreatIntelligenceIndicator
| where TimeGenerated >= ago(ioc_lookBack) and ExpirationDateTime > now()
| summarize LatestIndicatorTime = arg_max(TimeGenerated, *) by IndicatorId
| where Active == true
| where isnotempty(Url)
| join kind=innerunique (
    DataverseActivity
| where TimeGenerated >= ago(dt_lookBack)
| where Message in ("Create", "Update")
| where isnotempty(Fields) and Fields has "http"
| extend
        ExtractedUrls = extract_all("(http[s]?://(?:[a-zA-Z\\.-]
| [0-9])+)", tostring(Fields)),
        DataverseActivity_TimeGenerated = TimeGenerated
| mv-expand Url = ExtractedUrls
| project
        DataverseActivity_TimeGenerated,
        tostring(Url),
        UserId,
        ClientIp,
        InstanceUrl,
        EntityName
    )
    on Url
| where DataverseActivity_TimeGenerated < ExpirationDateTime
| summarize DataverseActivity_TimeGenerated  = arg_max(DataverseActivity_TimeGenerated, *) by IndicatorId, Url
| extend
    CloudAppId = int(32780),
    AccountName = tostring(split(UserId, '@')[0]),
    UPNSuffix = tostring(split(UserId, '@')[1])
| project
    DataverseActivity_TimeGenerated,
    Description,
    ActivityGroupNames,
    IndicatorId,
    ThreatType,
    ExpirationDateTime,
    ConfidenceScore,
    UserId,
    ClientIp,
    InstanceUrl,
    CloudAppId,
    AccountName,
    UPNSuffix,
    Url

Field Validations

Loading…

Comments (0)

Loading comments...