Special thanks to @Amit-Lal, Microsoft for collaborating and co-writing this technical article with me.
In this blog post we will show how you can use the SOAR capabilities of Sentinel with SAP by using Azure playbooks/Logic Apps to automatically take remediation actions in a SAP S/4HANA/ECC/BW system.
Firstly, some background: organizations around the world rely on SAP systems and their applications to handle massive amounts of business-critical data. It has been notoriously challenging to detect these threats to SAP applications, while the consequences of an undetected threat in a SAP application can be extremely serious.
This difficulty in detection stems - in part - from the complex internal nature of SAP systems, as well as the fact that these systems usually have lots of cross-connections between different applications.
The Continuous Threat Monitoring solution for SAP in Microsoft Sentinel enables you to monitor your SAP environment and helps you with cross-correlating logs from numerous systems with your SAP logs. With the Microsoft Sentinel SAP connector you can monitor your SAP systems for sophisticated threats within the business and application layers. The connector uses a docker container, which pulls the data from SAP and then sends it through to Microsoft Sentinel.
For a detailed description on how to deploy the SAP continuous threat monitoring with Sentinel, see Deploy SAP continuous threat monitoring | Microsoft Docs
By deploying the data connector, we can now import the SAP logs into Sentinel and correlate the logs with other data and analyze and hunt the logs for emerging threats. Install the SAP solution security content to gain insight into your organization's SAP environment and improve any related security operation capabilities. For a complete overview of what is included in the Sentinel SAP solution content, see Microsoft Sentinel SAP solution - security content reference | Microsoft Docs.
Microsoft Sentinel also contains a Security Orchestration and Automated Response (SOAR) capability which will help you respond to incidents rapidly if they are detected in your SAP application:
We are going to focus on a practical use case example for automating SAP actions as a response to an incident in Sentinel.
Use case: Block the SAP dialog or RFC user after suspicious user-incident
The goal here is to block the SAP dialog or RFC user access by locking the dialog or RFC user accessing SAP S/4HANA or NetWeaver system and do it in an automated way.
For this blog post we will make use of the data gateway to leverage the SOAR capabilities from Sentinel on SAP.
The gateway makes it possible to have a secure data transfer between data sources and a service in the cloud. The data gateway should be installed on a Windows Server. It is possible to use a dedicated machine or install it on the machine on which SAP is running, but you must ensure that both the VMs can communicate to each other over the private IPs.
When you have installed the data gateway, you will also need to install the SAP Connector for Microsoft .NET 3.0 on the same machine as the data gateway. The SAP Connector for Microsoft .NET 3.0 will allow us to use BAPIs and remote-enabled function modules in a .NET application. You can download the SAP connector via Software Downloads - SAP ONE Support Launchpad
Make sure to use “Install assemblies to GAC” when setting up the SAP connector and afterwards restart the data gateway.
For our final preparatory step, we will have to create the gateway cloud service to finalize the handshake between the cloud services and the data gateway.
More information on creating the Azure gateway resource can be found at Access data sources on premises - Azure Logic Apps | Microsoft Docs
The final architecture schema
High level sequence of flow
Playbook
In this use case a suspicious user will be blocked from accessing the SAP environment.
The SOC team has been notified of an ‘Atypical travel’ alert in Sentinel. After thorough investigations they decide to block the user entity from accessing the SAP environment and use the “Run playbook” action to start automatic remediation.
Atypical travel has been detected. Playbook will be used as an automatic remediation action.
This playbook will use the Microsoft Sentinel incident as a trigger, so that you can use it as an automatic action on an incident.
In the playbook the ‘Create stateful session’ action from the SAP connector (see: SAP - Connectors | Microsoft Docs) is used to make the connection with SAP.
When the connection has been made, extract the user entity from the Sentinel incident and use ‘BAPI - Call method’ to block the user in SAP. For more information visit Connect to SAP systems - Azure Logic Apps | Microsoft Docs
Logic app for blocking a user in SAPGitHub source code for BAPI Parameter - Link
When the SAP user ‘nchristis’ tries to subsequently logon to the SAP S/4HANA system, she cannot access the system since she is locked out:
More complex use cases (e.g. with extra steps for approval from the SOC manager via teams or delete the user account instead of blocking it) are possible and we encourage you to try it out on your own!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.