sap_hanadb_deactivation_of_audit_trail


Description

Detects the deactivation of the global auditing state in SAP HANA, which stops all audit logging.

Query · yara_l

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

    (
        $e.metadata.product_event_type = /AUDIT CONFIGURATION/ nocase and
        $e.target.resource.attribute.labels["parameter"] = "global_auditing_state" nocase and
        $e.target.resource.attribute.labels["new_value"] = "false" nocase
    ) or
    (
        $e.metadata.product_event_type = "SYSTEM CONFIGURATION CHANGE" nocase and
        $e.additional.fields["executed_statement"] = /ALTER SYSTEM ALTER CONFIGURATION/ nocase and
        $e.additional.fields["executed_statement"] = /UNSET/ nocase
    )
    $user = $e.principal.user.userid

  match:
    $user over 30m

  outcome:
    $risk_score = max(95)
    $principal_user = array_distinct($user)
    $system_id = array_distinct($e.target.resource.attribute.labels["system_id"])
    $prev_value = array_distinct($e.target.resource.attribute.labels["old_value"])
    $new_value = array_distinct($e.target.resource.attribute.labels["new_value"])
    $action = array_distinct($e.security_result.action)

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

  meta:
    author = "Google Cloud Security"
    description = "Detects the deactivation of the global auditing state in SAP HANA, which stops all audit logging."
    severity = "Critical"
    tactic = "TA0005"
    technique = "T1562.001"

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

    (
        $e.metadata.product_event_type = /AUDIT CONFIGURATION/ nocase and
        $e.target.resource.attribute.labels["parameter"] = "global_auditing_state" nocase and
        $e.target.resource.attribute.labels["new_value"] = "false" nocase
    ) or
    (
        $e.metadata.product_event_type = "SYSTEM CONFIGURATION CHANGE" nocase and
        $e.additional.fields["executed_statement"] = /ALTER SYSTEM ALTER CONFIGURATION/ nocase and
        $e.additional.fields["executed_statement"] = /UNSET/ nocase
    )
    $user = $e.principal.user.userid

  match:
    $user over 30m

  outcome:
    $risk_score = max(95)
    $principal_user = array_distinct($user)
    $system_id = array_distinct($e.target.resource.attribute.labels["system_id"])
    $prev_value = array_distinct($e.target.resource.attribute.labels["old_value"])
    $new_value = array_distinct($e.target.resource.attribute.labels["new_value"])
    $action = array_distinct($e.security_result.action)

  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.