Detection rules › Kusto
SAP ETD - Execution of Sensitive Function Module
This is a third-party alert feed, not a detection over modeled telemetry. The vendor product raised the finding; this rule forwards it into the SIEM. It is searchable for reference but is excluded from the detection-rule browse and the ATT&CK coverage matrix.
Identifies execution of a sensitive ABAP Function Module using the watchlists provided by the Microsoft Sentinel Solution for SAP Source Action: Execute a sensitive function module directly using SE37. Data Sources: SAP Enterprise Thread Detection Solution - Alerts
MITRE ATT&CK coverage
| Tactic | Techniques |
|---|---|
| Discovery | No specific technique |
Rule body kusto
id: c6111e06-11e2-45eb-86ef-28313a06db35
kind: Scheduled
name: SAP ETD - Execution of Sensitive Function Module
description: |
Identifies execution of a sensitive ABAP Function Module using the watchlists provided by the Microsoft Sentinel Solution for SAP
Source Action: Execute a sensitive function module directly using SE37.
*Data Sources: SAP Enterprise Thread Detection Solution - Alerts*
severity: Medium
status: Available
requiredDataConnectors:
- connectorId: SAPETDAlerts
dataTypes:
- SAPETDAlerts_CL
queryFrequency: 5m
queryPeriod: 60m
triggerOperator: gt
triggerThreshold: 0
tactics:
- Discovery
relevantTechniques: []
query: |
let AuditTimeAgo = 60m;
let minThreshold= 1;
let minScore= 50;
let SenseModules = _GetWatchlist('SAP - Sensitive Function Modules')
| project trimmedFunctionModule = trim(@"\s+", FunctionModule);
SAPETDAlerts_CL
| where TimeGenerated > ago(AuditTimeAgo)
| where Threshold >= minThreshold and Score >= minScore
| where PatternName == "Critical Function module call in Test framework calls"
| mv-expand NormalizedTriggeringEvents
| extend sapOriginalEvent = tostring(NormalizedTriggeringEvents.OriginalEvent)
| extend Id_ = NormalizedTriggeringEvents.Id
| extend extracted_user_ip = tostring(NormalizedTriggeringEvents.NetworkIPAddressInitiator)
| extend extracted_sap_user = tostring(NormalizedTriggeringEvents.UserAccountActing)
| extend extracted_sid = tostring(NormalizedTriggeringEvents.SystemIdActor)
| extend extracted_instance_name = tostring(NormalizedTriggeringEvents.NetworkHostnameActor)
| extend extracted_instance_host = tostring(NormalizedTriggeringEvents.ServiceInstanceName)
| extend extracted_function_module = trim(@"\s+", tostring(NormalizedTriggeringEvents.ServiceFunctionName))
| extend extracted_system_role = tostring(NormalizedTriggeringEvents.SystemRoleReporter)
| where extracted_function_module in (SenseModules)
| extend AlertName = strcat("SAP ETD - Sensitive Function Module ", extracted_function_module," was executed by user ", extracted_sap_user,
" in a ", tolower(extracted_system_role), " system"), Dummy = " "
| mv-expand Users
| extend
UserAccountName = tostring(Users.UserAccountName),
UserEmail = tostring(Users.EmailAddresses[0])
eventGroupingSettings:
aggregationKind: SingleAlert
entityMappings:
- entityType: Account
fieldMappings:
- identifier: Name
columnName: UserAccountName
- entityType: Mailbox
fieldMappings:
- identifier: MailboxPrimaryAddress
columnName: UserEmail
- entityType: CloudApplication
fieldMappings:
- identifier: AppId
columnName: extracted_sid
- identifier: InstanceName
columnName: extracted_instance_name
- entityType: Host
fieldMappings:
- identifier: FullName
columnName: extracted_instance_host
- entityType: IP
fieldMappings:
- identifier: Address
columnName: extracted_user_ip
alertDetailsOverride:
alertDisplayNameFormat: 'SAP ETD - {{PatternName}} '
alertDescriptionFormat: |
{{PatternDescription}}
Source: SAP ETD
customDetails:
SAP_User: extracted_sap_user
SAP_UserEmail: UserEmail
ETD_AlertNumber: AlertId
version: 1.0.1
Stages and Predicates
Parameters
let AuditTimeAgo = 60m;
let minThreshold = 1;
let minScore = 50;
Let binding: SenseModules
let SenseModules = _GetWatchlist('SAP - Sensitive Function Modules')
| project trimmedFunctionModule = trim(@"\s+", FunctionModule);
Stage 1: source
SAPETDAlerts_CL
Stage 2: where
| where TimeGenerated > ago(AuditTimeAgo)
Stage 3: where
| where Threshold >= minThreshold and Score >= minScore
Stage 4: where
| where PatternName == "Critical Function module call in Test framework calls"
Stage 5: mv-expand
| mv-expand NormalizedTriggeringEvents
Stage 6: extend (9 consecutive steps)
| extend sapOriginalEvent = tostring(NormalizedTriggeringEvents.OriginalEvent)
| extend Id_ = NormalizedTriggeringEvents.Id
| extend extracted_user_ip = tostring(NormalizedTriggeringEvents.NetworkIPAddressInitiator)
| extend extracted_sap_user = tostring(NormalizedTriggeringEvents.UserAccountActing)
| extend extracted_sid = tostring(NormalizedTriggeringEvents.SystemIdActor)
| extend extracted_instance_name = tostring(NormalizedTriggeringEvents.NetworkHostnameActor)
| extend extracted_instance_host = tostring(NormalizedTriggeringEvents.ServiceInstanceName)
| extend extracted_function_module = trim(@"\s+", tostring(NormalizedTriggeringEvents.ServiceFunctionName))
| extend extracted_system_role = tostring(NormalizedTriggeringEvents.SystemRoleReporter)
Stage 7: where
| where extracted_function_module in (SenseModules)
References SenseModules (defined above).
Stage 8: extend
| extend AlertName = strcat("SAP ETD - Sensitive Function Module ", extracted_function_module," was executed by user ", extracted_sap_user,
" in a ", tolower(extracted_system_role), " system"), Dummy = " "
Stage 9: mv-expand
| mv-expand Users
Stage 10: extend
| extend
UserAccountName = tostring(Users.UserAccountName),
UserEmail = tostring(Users.EmailAddresses[0])
Indicators
Each row is a field, operator, and value that the rule matches. The corpus column counts how many other rules in the catalog look for the same combination: high numbers point to widely-used, community-vetted indicators. Blank or 1 shows that the indicator is specific to this rule.
| Field | Kind | Values |
|---|---|---|
PatternName | eq |
|
Score | ge |
|
Threshold | ge |
|
extracted_function_module | in |
|
Output fields
Fields the rule emits when it matches. Chronicle authors list these in the outcome block; they appear on the detection and $risk_score drives alerting. Sentinel / Defender XDR rules build them up through project / summarize / extend stages. Sentinel maps these into alert fields via entityMappings and customDetails; Defender XDR custom detections surface them as alert fields directly.
| Field | Source |
|---|---|
sapOriginalEvent | extend |
Id_ | extend |
extracted_user_ip | extend |
extracted_sap_user | extend |
extracted_sid | extend |
extracted_instance_name | extend |
extracted_instance_host | extend |
extracted_function_module | extend |
extracted_system_role | extend |
AlertName | extend |
Dummy | extend |
UserAccountName | extend |
UserEmail | extend |