sap_hanadb_assign_admin_authorizations


Description

Detects the assignment of administrative privileges or roles within SAP HANA DB.

Query · yara_l

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

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

    $statement = /ADMIN/ nocase
    (
        $statement = /GRANT PRIVILEGE/ nocase or
        $statement = /GRANT ROLE/ nocase
    )

    $user = $e.principal.user.userid

  match:
    $user over 30m

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

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

  meta:
    author = "Google Cloud Security"
    description = "Detects the assignment of administrative privileges or roles within SAP HANA DB."
    severity = "High"
    tactic = "TA0003"
    technique = "T1098"

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

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

    $statement = /ADMIN/ nocase
    (
        $statement = /GRANT PRIVILEGE/ nocase or
        $statement = /GRANT ROLE/ nocase
    )

    $user = $e.principal.user.userid

  match:
    $user over 30m

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

  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.