Detection rules › YARA-L

sap critical authorization value changed

Severity
critical
Time window
1h
Match by
admin, role
Author
Google Cloud Security
Source
github.com/chronicle/detection-rules

Detects the modification of sensitive authorization objects (CD1251) within a role. This identifies potential 'backdoor' privilege escalation where a standard role is granted administrative powers (e.g., Debugging or System Table access) via PFCG.

MITRE ATT&CK coverage

TacticTechniques
Privilege Escalation

Rule body

// Copyright 2026 Google LLC. Licensed under Apache-2.0.

rule sap_critical_authorization_value_changed {

  meta:
    author = "Google Cloud Security"
    description = "Detects the modification of sensitive authorization objects (CD1251) within a role. This identifies potential 'backdoor' privilege escalation where a standard role is granted administrative powers (e.g., Debugging or System Table access) via PFCG."
    severity = "Critical"
    tactic = "TA0004"
    technique = "T1098"

  events:
    $change.metadata.log_type = "SAP_CHANGE_DOCUMENT"
    $change.target.resource.attribute.labels["TABNAME"] = "CD1251"
    $change.target.resource.attribute.labels["CHNGIND"] = /J|U/
    $change.target.application = "PFCG"

    $role = $change.target.resource.product_object_id
    $admin = $change.principal.user.userid

    $auth_object = re.capture($change.target.resource.attribute.labels["TABKEY"], "^.{33}(.{10})")

  match:
    $admin, $role over 1h

  outcome:
    $admin_user = array_distinct($admin)
    $modified_role = array_distinct($role)
    $impacted_object = array_distinct($auth_object)
    $new_value = array_distinct($change.additional.fields["VALUE_NEW"])
    $system_id = array_distinct($change.target.application)
    $risk_score = 75

  condition:
    $change
}

YARA-L rule structure

Condition

Fires when at least one $change event in the 1h window.

Events

$change

  • metadata.log_type = "SAP_CHANGE_DOCUMENT"
  • target.resource.attribute.labels["TABNAME"] = "CD1251"
  • target.resource.attribute.labels["CHNGIND"] matches "J|U"
  • target.application = "PFCG"

Match and correlation

Match key
$admin, $role
Within
1h

Outcome

Outcome variables add context to a detection. When the rule generates an alert, $risk_score is displayed with it.

FieldExpression
admin_userarray_distinct($admin)
modified_rolearray_distinct($role)
impacted_objectarray_distinct($auth_object)
new_valuearray_distinct($change.additional.fields["VALUE_NEW"])
system_idarray_distinct($change.target.application)
risk_score75