Detection rules › YARA-L
sap multiple password changes
Detects multiple password changes (BU2) by a single actor or targeting a single user across systems.
MITRE ATT&CK coverage
| Tactic | Techniques |
|---|---|
| Privilege Escalation |
Rule body
// Copyright 2026 Google LLC. Licensed under Apache-2.0.
rule sap_multiple_password_changes {
meta:
author = "Google Cloud Security"
description = "Detects multiple password changes (BU2) by a single actor or targeting a single user across systems."
severity = "Medium"
tactic = "TA0004"
technique = "T1098"
events:
$e.metadata.product_name = "SAP security audit"
$e.additional.fields["msg_1"] = "BU2"
$source_user = $e.principal.user.userid
$target_user = $e.additional.fields["param2_1"]
$client = $e.target.resource.attribute.labels["slgmand_1"]
match:
$source_user over 3h
outcome:
$total_changes = count($e.metadata.product_log_id)
$distinct_targets = count_distinct($target_user)
$distinct_clients = count_distinct($client)
$admin_email = array_distinct($e.principal.user.email_addresses)
$target_users = array_distinct($target_user)
$terminal_ips = array_distinct($e.principal.ip)
condition:
#e >= 3 or #target_user >= 3
}
YARA-L rule structure
Condition
Fires when $e occurs at least 3 times in the 3h window or $target_user occurs at least 3 times in the 3h window.
Events
$e
additional.fields["msg_1"] = "BU2"
Match and correlation
Outcome
Outcome variables add context to a detection. When the rule generates an alert, $risk_score is displayed with it.
| Field | Expression |
|---|---|
total_changes | count($e.metadata.product_log_id) |
distinct_targets | count_distinct($target_user) |
distinct_clients | count_distinct($client) |
admin_email | array_distinct($e.principal.user.email_addresses) |
target_users | array_distinct($target_user) |
terminal_ips | array_distinct($e.principal.ip) |