Detection rules › YARA-L
sap brute force rfc logon
Identifies brute force attacks on SAP systems using RFC logons. Detects a single IP attempting to sign in to several systems or clients within a 1-hour interval, indicating potential credential stuffing or internal lateral movement.
MITRE ATT&CK coverage
| Tactic | Techniques |
|---|---|
| Credential Access |
Rule body
// Copyright 2026 Google LLC. Licensed under Apache-2.0.
rule sap_brute_force_rfc_logon {
meta:
author = "Google Cloud Security"
description = "Identifies brute force attacks on SAP systems using RFC logons. Detects a single IP attempting to sign in to several systems or clients within a 1-hour interval, indicating potential credential stuffing or internal lateral movement."
severity = "Low"
tactic = "TA0001"
technique = "T1110"
events:
$e.metadata.log_type = "SAP_SECURITY_AUDIT"
$e.additional.fields["msg_1"] = /^AU6$|^CUZ$/
$ip = $e.principal.ip
$sid = $e.target.application
$client = $e.target.resource.attribute.labels["slgmand_1"]
match:
$ip over 1h
outcome:
$total_event_count = count($e.metadata.id)
$user_ids_attempted = array_distinct($e.principal.user.userid)
$systems_targeted = array_distinct($sid)
$clients_targeted = array_distinct($client)
$source_ip = array_distinct($ip)
$terminal_names = array_distinct($e.principal.hostname)
$report_names = array_distinct($e.principal.process.file.names)
condition:
#sid >= 2 or #client >= 2
}
YARA-L rule structure
Condition
Fires when $sid occurs at least 2 times in the 1h window or $client occurs at least 2 times in the 1h window.
Events
$e
metadata.log_type = "SAP_SECURITY_AUDIT"additional.fields["msg_1"] matches "^AU6$|^CUZ$"
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_event_count | count($e.metadata.id) |
user_ids_attempted | array_distinct($e.principal.user.userid) |
systems_targeted | array_distinct($sid) |
clients_targeted | array_distinct($client) |
source_ip | array_distinct($ip) |
terminal_names | array_distinct($e.principal.hostname) |
report_names | array_distinct($e.principal.process.file.names) |