sap_hanadb_user_admin_actions


Description

Detects administrative user management (Create/Alter/Drop) and schema deletion within SAP HANA DB.

Query · yara_l

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

    $statement = $e.additional.fields["executed_statement"]

    (
        $statement = /CREATE USER/ nocase or
        $statement = /ALTER USER/ nocase or
        $statement = /DROP USER/ nocase or
        $statement = /DROP SCHEMA/ nocase
    )

    $user = $e.principal.user.userid

  match:
    $user over 30m

  outcome:
    $risk_score = max(70)
    $principal_user = array_distinct($user)
    $target_user = array_distinct($e.target.user.userid)
    $executed_statements = array_distinct($statement)
    $system_id = array_distinct($e.target.resource.attribute.labels["system_id"])
    $db_name = array_distinct($e.target.resource.name)

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

  meta:
    author = "Google Cloud Security"
    description = "Detects administrative user management (Create/Alter/Drop) and schema deletion within SAP HANA DB."
    severity = "Medium"
    tactic = "TA0003"
    technique = "T1136"

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

    $statement = $e.additional.fields["executed_statement"]

    (
        $statement = /CREATE USER/ nocase or
        $statement = /ALTER USER/ nocase or
        $statement = /DROP USER/ nocase or
        $statement = /DROP SCHEMA/ nocase
    )

    $user = $e.principal.user.userid

  match:
    $user over 30m

  outcome:
    $risk_score = max(70)
    $principal_user = array_distinct($user)
    $target_user = array_distinct($e.target.user.userid)
    $executed_statements = array_distinct($statement)
    $system_id = array_distinct($e.target.resource.attribute.labels["system_id"])
    $db_name = array_distinct($e.target.resource.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.