Google Chronicle high experimental yara-l

sap_deprecated_function_module_invoked

A user invoked a function module on the deprecated or unsafe module list

View Source

Detection Logic

/*
 * Copyright 2026 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     https://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES 
OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

rule sap_deprecated_function_module_invoked {

  meta:
    author = "Google Cloud Security"
    description = "A user invoked a function module on the deprecated or unsafe module list"
    severity = "High"
    tactic = "TA0002"
    technique = "T1129"

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

    $e.additional.fields["msg_1"] = /^(AUK
| AUL
| BU4
| DUI
| DUJ
| DUK
| DUR
| DUS
| DUT
| EUE
| EUF
| EUG
| FU1)$/

    $user   = $e.principal.user.userid
    $system = $e.target.application

    $fm1 = re.capture($e.additional.fields["param1_1"], `^([^=]+)`)
    $fm2 = re.capture($e.additional.fields["param2_1"], `^([^=]+)`)
    $fm3 = re.capture($e.additional.fields["param3_1"], `^([^=]+)`)

    (
      $fm1 in %sap_obsolete_function_modules.function_module or
      $fm2 in %sap_obsolete_function_modules.function_module or
      $fm3 in %sap_obsolete_function_modules.function_module
    )

  match:
    $user, $system over 1h

  outcome:
    $risk_score = 80
    $module_param1 = array_distinct($fm1)
    $module_param2 = array_distinct($fm2)
    $module_param3 = array_distinct($fm3)
    $audit_message_id = array_distinct($e.additional.fields["msg_1"])
    $transaction_code = array_distinct($e.security_result.detection_fields["slgtc_1"])
    $abap_program = array_distinct($e.principal.process.file.names)
    $terminal_ip = array_distinct($e.principal.ip)
    $sap_client = array_distinct($e.target.resource.attribute.labels["slgmand_1"])
    $log_description = array_distinct($e.metadata.description)

  condition:
    $e
}

Field Validations

Loading…

Comments (0)

Loading comments...