Detection rules › YARA-L

sap data changed during debugging

Severity
critical
Time window
30m
Match by
session_owner
Author
Google Cloud Security
Source
github.com/chronicle/detection-rules

Detects in-memory data changes (CUL) during an ABAP debugging session. Identifies if the debugger is the same as the session owner.

MITRE ATT&CK coverage

TacticTechniques
Stealth

Rule body

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

rule sap_data_changed_during_debugging {

  meta:
    author = "Google Cloud Security"
    description = "Detects in-memory data changes (CUL) during an ABAP debugging session. Identifies if the debugger is the same as the session owner."
    severity = "Critical"
    tactic = "TA0005"
    technique = "T1564"

  events:
    $e.metadata.log_type = "SAP_SECURITY_AUDIT"

    $e.additional.fields["msg_1"] = "CUL"

    $debugger = $e.additional.fields["param1_1"]
    $session_owner = $e.principal.user.userid

    // exclusions
    not $debugger in %sap_admin_users.user

  match:
    $session_owner over 30m

  outcome:
    $risk_score = 90
    $target_sid = array_distinct($e.target.application)
    $debugging_user = array_distinct($debugger)
    $source_user = array_distinct($session_owner)

    $source_user_is_debugger = array_distinct(if($debugger = $session_owner, "true", "false"))

    $change_field = array_distinct($e.additional.fields["param2_1"])
    $change = array_distinct($e.additional.fields["param3_1"])
    $method = array_distinct(re.capture($e.additional.fields["paramx_1"], `Meth:(.*?),\s`))

  condition:
    $e
}

YARA-L rule structure

Condition

Fires when at least one $e event in the 30m window.

Events

$e

  • metadata.log_type = "SAP_SECURITY_AUDIT"
  • additional.fields["msg_1"] = "CUL"
  • additional.fields["param1_1"] in "%sap_admin_users.user"

Match and correlation

Match key
$session_owner
Within
30m

Outcome

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

FieldExpression
risk_score90
target_sidarray_distinct($e.target.application)
debugging_userarray_distinct($debugger)
source_userarray_distinct($session_owner)
source_user_is_debuggerarray_distinct(if($debugger = $session_owner, "true", "false"))
change_fieldarray_distinct($e.additional.fields["param2_1"])
changearray_distinct($e.additional.fields["param3_1"])
methodarray_distinct(re.capture($e.additional.fields["paramx_1"], `Meth:(.*?),\s`))