adfs_dkm_key_access


Description

Detects access to the AD contact object to read the AD FS DKM (distributed key manager) master key value

Query · yara_l

events:
    $object.metadata.event_type = "USER_RESOURCE_ACCESS"
    $object.metadata.product_name = "Microsoft-Windows-Security-Auditing"
    $object.metadata.vendor_name = "Microsoft"
    $object.metadata.product_event_type = "4662"
    any $object.security_result.detection_fields.value = "properties:{8d3bca50-1d7e-11d0-a081-00aa006c33ed}"
    $object.principal.labels["SubjectLogonId"] = $subject

    $login.metadata.event_type = "USER_LOGIN"
    $login.metadata.product_name = "Microsoft-Windows-Security-Auditing"
    $login.metadata.vendor_name = "Microsoft"
    $login.metadata.product_event_type = "4624"
    $login.target.labels["TargetLogonId"] = $subject
    $login.principal.hostname = $hostname

  match:
    $hostname over 5m

  outcome:
    $risk_score = 85
    //added to populate alert graph with additional context
    //Commented out because it is the same as the match variable, if match variable changes, uncomment to use
    //$principal_hostname = array_distinct($logon.principal.hostname)
    $object_principal_process_pid = array_distinct($object.principal.process.pid)
    $object_principal_user_userid = array_distinct($object.principal.user.userid)
    //$principal_user_windows_sid = array_distinct($object.principal.user.windows_sid)
    $object_target_resource_name = array_distinct($object.target.resource.name)

  condition:
    $object and $login
Raw source adfs_dkm_key_access · YARA-L
Esc
Published by chronicle/detection-rules ↗, licensed under Apache 2.0 ↗. Reproduced here unmodified.
rule adfs_dkm_key_access {

  meta:
    author = "Google Cloud Security"
    description = "Detects access to the AD contact object to read the AD FS DKM (distributed key manager) master key value"
    rule_id = "mr_2517eaa0-0915-4a9e-8ca2-abce955eb635"
    rule_name = "ADFS DKM Key Access"
    reference = "https://github.com/OTRF/BHEU22-ADFS/blob/main/Slide-Deck.pdf"
    type = "alert"
    tactic = "TA0006"
    technique = "T1552.004"
    platform = "Windows"
    data_source = "windows security events"
    severity = "High"
    priority = "High"

  events:
    $object.metadata.event_type = "USER_RESOURCE_ACCESS"
    $object.metadata.product_name = "Microsoft-Windows-Security-Auditing"
    $object.metadata.vendor_name = "Microsoft"
    $object.metadata.product_event_type = "4662"
    any $object.security_result.detection_fields.value = "properties:{8d3bca50-1d7e-11d0-a081-00aa006c33ed}"
    $object.principal.labels["SubjectLogonId"] = $subject

    $login.metadata.event_type = "USER_LOGIN"
    $login.metadata.product_name = "Microsoft-Windows-Security-Auditing"
    $login.metadata.vendor_name = "Microsoft"
    $login.metadata.product_event_type = "4624"
    $login.target.labels["TargetLogonId"] = $subject
    $login.principal.hostname = $hostname

  match:
    $hostname over 5m

  outcome:
    $risk_score = 85
    //added to populate alert graph with additional context
    //Commented out because it is the same as the match variable, if match variable changes, uncomment to use
    //$principal_hostname = array_distinct($logon.principal.hostname)
    $object_principal_process_pid = array_distinct($object.principal.process.pid)
    $object_principal_user_userid = array_distinct($object.principal.user.userid)
    //$principal_user_windows_sid = array_distinct($object.principal.user.windows_sid)
    $object_target_resource_name = array_distinct($object.target.resource.name)

  condition:
    $object and $login
}

Detection rules belong to the projects that publish them and remain under their own licenses. This site indexes and links to them; it claims no rights in them.