sap_break_glass_account_login


Description

Alerts whenever a default SAP administrative account (e.g., SAP*, DDIC, TMSADM) logs into the system. These accounts should be locked and used only for emergency 'break-glass' scenarios

Query · yara_l

events:
    $e.metadata.log_type = "SAP_SECURITY_AUDIT"
    (
        $e.additional.fields["msg_1"] = /^AU1$|^AU5$/ or
        $e.metadata.event_type = "USER_LOGIN"
    )
    $e.principal.user.userid = $userid
    $userid = /^DDIC$|^EARLYWATCH$|^SAP\*$|^TMSADM$/ nocase

  match:
    $userid over 1h

  outcome:
    $event_count = count_distinct($e.metadata.id)
    $risk_score = if($event_count < 10, 20, 40)
    $vendor_name = array_distinct($e.metadata.vendor_name)
    $product_name = array_distinct($e.metadata.product_name)
    $product_severity = array_distinct($e.security_result.severity)
    $event_description = array_distinct($e.metadata.description)
    $victim_name = array_distinct($e.target.user.userid)
    $adversary_name = array_distinct($e.principal.user.userid)
    $result_time = min($e.metadata.event_timestamp.seconds)

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

  meta:
    author = "Google Cloud Security"
    description = "Alerts whenever a default SAP administrative account (e.g., SAP*, DDIC, TMSADM) logs into the system. These accounts should be locked and used only for emergency 'break-glass' scenarios"
    severity = "Low"
    tactic = "TA0001"
    technique = "T1078"

  events:
    $e.metadata.log_type = "SAP_SECURITY_AUDIT"
    (
        $e.additional.fields["msg_1"] = /^AU1$|^AU5$/ or
        $e.metadata.event_type = "USER_LOGIN"
    )
    $e.principal.user.userid = $userid
    $userid = /^DDIC$|^EARLYWATCH$|^SAP\*$|^TMSADM$/ nocase

  match:
    $userid over 1h

  outcome:
    $event_count = count_distinct($e.metadata.id)
    $risk_score = if($event_count < 10, 20, 40)
    $vendor_name = array_distinct($e.metadata.vendor_name)
    $product_name = array_distinct($e.metadata.product_name)
    $product_severity = array_distinct($e.security_result.severity)
    $event_description = array_distinct($e.metadata.description)
    $victim_name = array_distinct($e.target.user.userid)
    $adversary_name = array_distinct($e.principal.user.userid)
    $result_time = min($e.metadata.event_timestamp.seconds)

  condition:
    $e
}

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.