Skip to content

Commit 3ee89ba

Browse files
committed
Update mde-sap-custom-detection-rules.md
1 parent 06fddfa commit 3ee89ba

File tree

1 file changed

+10
-11
lines changed

1 file changed

+10
-11
lines changed

defender-endpoint/mde-sap-custom-detection-rules.md

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ audience: ITPro
2525
- Microsoft Defender for Endpoint for servers
2626
- Microsoft Defender for Servers Plan 1 or Plan 2
2727

28-
SAP Systems can execute OS level commands by using SAPXPG – Transaction Code SM49/SM69. This article describes how to use advanced hunting with Microsoft Defender for Endpoint to help safeguard the SAPXPG mechanism. The example illustrated in this article features SAP running on Linux; however, the procedure for SAP running on Windows 11 is similar.
28+
SAP Systems can execute OS level commands by using `SAPXPG – Transaction Code SM49/SM69`. This article describes how to use advanced hunting with Microsoft Defender for Endpoint to help safeguard the SAPXPG mechanism to protect it from being exploited. The example illustrated in this article features SAP running on Linux; however, the procedure for SAP running on Windows 11 is similar.
2929

3030
## Before you begin
3131

@@ -34,37 +34,36 @@ Make sure to read the following articles before you begin:
3434
- [Create custom detection rules](/defender-xdr/custom-detection-rules)
3535
- [SAP Documentation: Starting External Commands and ProgramsLocate this document in the navigation structure](https://help.sap.com/doc/saphelp_nw73ehp1/7.31.19/en-US/4b/2b2bed365474fee10000000a421937/frameset.htm)
3636

37-
The SAP BASIS Team and the Security team should codevelop the solution. The SAP BASIS team doesn't have access to the Microsoft Defender portal, and the Security team doesn't know the specifics of the SAP Batch Jobs and External Commands.
37+
The SAP BASIS Team and the security team should codevelop the solution. The SAP BASIS team doesn't have access to the Microsoft Defender portal, and the security team doesn't know the specifics of the SAP Batch Jobs and External Commands. Both teams should work together.
3838

3939
## Recommended implementation sequence
4040

4141
1. The SAP BASIS team identifies and categorizes the external commands and scripts running on all SAP Environments (Dev, QA, PRD).
4242

43-
2. The Security team and the SAP BASIS team ensure that Defender for Endpoint is correctly deployed and configured on all SAP servers. For deployment guidance, see the following articles:
43+
2. The security team and the SAP BASIS team ensure that Defender for Endpoint is correctly deployed and configured on all SAP servers. For deployment guidance, see the following articles:
4444

4545
- [Deployment guidance for Microsoft Defender for Endpoint on Linux for SAP](https://aka.ms/mde4sap-linux)
4646
- [Microsoft Defender for Endpoint on Windows Server with SAP](https://aka.ms/mde4sap-windows)
4747

48-
3. The Security team identifies all the SAP servers and runs a query for `"InitiatingProcessName" == "sapxpg"`, noting which servers are starting SAPXPG.
48+
3. The security team identifies all the SAP servers and runs a query for `"InitiatingProcessName" == "sapxpg"`, noting which servers are starting SAPXPG.
4949

50-
- It's recommended to limit the number of servers running SAPXPG to a minimum and to disallow SAPXPG on most SAP servers.
51-
- The SAP BASIS team and Security team should limit access to the authorization objects and transaction codes for SAPXPG.
50+
We recommended limiting the number of servers running SAPXPG to a minimum, and disallowing SAPXPG on most SAP servers. And, the SAP BASIS team and security team should limit access to the authorization objects and transaction codes for SAPXPG.
5251

53-
4. The SAP BASIS team briefs the Security team on any "allowed" utilities, such as `BRTOOLS` (for Oracle customers), `AzCopy` (if used) or other specific utilities for printing or archiving.
52+
4. The SAP BASIS team briefs the security team on any "allowed" utilities, such as `BRTOOLS` (for Oracle customers), `AzCopy` (if used) or other specific utilities for printing or archiving.
5453

55-
5. The security team works with the SAP BASIS team to query SAPXPG commands and parameters. An example query to detect or block "wget" (which can be used to download malicious payloads) is as follows:
54+
5. The security team works with the SAP BASIS team to query SAPXPG commands and parameters. An example query to detect or block `wget` (which can be used to download malicious payloads) is as follows:
5655

5756
```kusto
5857
5958
DeviceProcessEvents
6059
| where Timestamp >= ago (1d)
6160
| where (InitiatingProcessFileName == "sapxpg" or InitiatingProcessFileName =="sapxpg.exe") and FileName == "wget"
6261
63-
// Query will show SAPXPG commands that execute "wget"
62+
// Query shows SAPXPG commands that execute "wget"
6463
6564
```
6665

67-
This query is designed to work on Linux (sapxpg) and Windows (sapxpg.exe).
66+
This query is designed to work on Linux (`sapxpg`) and Windows (`sapxpg.exe`).
6867

6968
Another query/rule design logic is to block SAPXPG from executing any command other than specified allowed commands. In the following query, any command that is not in the set ("cp", "ls", "mkdir") can be alerted or blocked.
7069

@@ -74,7 +73,7 @@ The SAP BASIS Team and the Security team should codevelop the solution. The SAP
7473
| where Timestamp >= ago (1d)
7574
| where (InitiatingProcessFileName == "sapxpg" or InitiatingProcessFileName =="sapxpg.exe") and FileName !in ("cp", "ls", "mkdir")
7675
77-
//Query will show SAPXPG commands that execute any command other than "cp" or "mv" or mkdir
76+
//Query shows SAPXPG commands that execute any command other than "cp" or "mv" or mkdir
7877
7978
```
8079

0 commit comments

Comments
 (0)