sap_hanadb_audit_trail_policy_changes


Description

Detects changes to SAP HANA audit policies (Create, Alter, Drop) which could indicate an attempt to evade logging.

Query · yara_l

events:
    $e.metadata.product_name = "SAP_HANA_AUDIT"

    $statement = $e.additional.fields["executed_statement"]
    $statement = /AUDIT\s+POLICY/ nocase

    $user = $e.principal.user.user_display_name

  match:
    $user over 30m

  outcome:
    $risk_score = max(85)
    $principal_user = array_distinct($user)
    $statements = array_distinct($statement)
    $system_id = array_distinct($e.target.resource.attribute.labels["system_id"])
    $policy_name = array_distinct($e.security_result.rule_name)

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

  meta:
    author = "Google Cloud Security"
    description = "Detects changes to SAP HANA audit policies (Create, Alter, Drop) which could indicate an attempt to evade logging."
    severity = "High"
    tactic = "TA0005"
    technique = "T1562"

  events:
    $e.metadata.product_name = "SAP_HANA_AUDIT"

    $statement = $e.additional.fields["executed_statement"]
    $statement = /AUDIT\s+POLICY/ nocase

    $user = $e.principal.user.user_display_name

  match:
    $user over 30m

  outcome:
    $risk_score = max(85)
    $principal_user = array_distinct($user)
    $statements = array_distinct($statement)
    $system_id = array_distinct($e.target.resource.attribute.labels["system_id"])
    $policy_name = array_distinct($e.security_result.rule_name)

  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.