Collect SAP HANA audit logs in Microsoft Sentinel

This article explains how to collect audit logs from your SAP HANA database.

Important

Microsoft Sentinel SAP HANA support is currently in PREVIEW. The Azure Preview Supplemental Terms include additional legal terms that apply to Azure features that are in beta, preview, or otherwise not yet released into general availability.

Prerequisites

SAP HANA logs are sent over Syslog. Make sure that your AMA agent or your Log Analytics agent (legacy) is configured to collect Syslog files. For more information, see:

For more information, see Ingest syslog and CEF messages to Microsoft Sentinel with the Azure Monitor Agent.

Collect SAP HANA audit logs

  1. Make sure that the SAP HANA audit log trail is configured to use Syslog, as described in SAP Note 0002624117, which is accessible from the SAP Launchpad support site. For more information, see:

  2. Check your operating system Syslog files for any relevant HANA database events.

  3. Sign into your HANA database operating system as a user with sudo privileges.

  4. Install an agent on your machine and confirm that your machine is connected. For more information, see:

  5. Configure your agent to collect Syslog data. For more information, see:

    Tip

    Because the facilities where HANA database events are saved can change between different distributions, we recommend that you add all facilities. Check them against your Syslog logs, and then remove any that aren't relevant.

Verify your configuration

In Microsoft Sentinel, check to confirm that HANA database events are now shown in the ingested logs. For example, run the following query:

//generated function structure for custom log Syslog
// generated on 2024-05-07
let D_Syslog = datatable(TimeGenerated:datetime
,EventTime:datetime
,Facility:string
,HostName:string
,SeverityLevel:string
,ProcessID:int
,HostIP:string
,ProcessName:string
,Type:string
)['1000-01-01T00:00:00Z', '1000-01-01T00:00:00Z', 'initialString', 'initialString', 'initialString', 'initialString',1,'initialString', 'initialString', 'initialString'];

let T_Syslog = (Syslog | project
TimeGenerated = column_ifexists('TimeGenerated', '1000-01-01T00:00:00Z')
,EventTime = column_ifexists('EventTime', '1000-01-01T00:00:00Z')
,Facility = column_ifexists('Facility', 'initialString')
,HostName = column_ifexists('HostName', 'initialString')
,SeverityLevel = column_ifexists('SeverityLevel', 'initialString')
,ProcessID = column_ifexists('ProcessID', 1)
,HostIP = column_ifexists('HostIP', 'initialString')
,ProcessName = column_ifexists('ProcessName', 'initialString')
,Type = column_ifexists('Type', 'initialString')
);
T_Syslog | union isfuzzy= true (D_Syslog | where TimeGenerated != '1000-01-01T00:00:00Z')

Add analytics rules for SAP HANA

Use the following built-in analytics rules to have Microsoft Sentinel start triggering alerts on related SAP HANA activity:

  • SAP - (PREVIEW) HANA DB -Assign Admin Authorizations
  • SAP - (PREVIEW) HANA DB -Audit Trail Policy Changes
  • SAP - (PREVIEW) HANA DB -Deactivation of Audit Trail
  • SAP - (PREVIEW) HANA DB -User Admin actions

For more information, see Microsoft Sentinel solution for SAP® applications: security content reference.

Learn more about the Microsoft Sentinel solution for SAP® applications:

Troubleshooting:

Reference files:

For more information, see Microsoft Sentinel solutions.