Sending enriched Microsoft Sentinel alerts to 3rd party SIEM and Ticketing Systems
Published Jun 11 2020 11:08 AM 45.8K Views
Microsoft

(Last updated January 18th 2021)

 

Special thanks to @Ofer_Shezaf and @Alp Babayigit that collaborating with me on this blog post.

 

In the blog post we will introduce a solution which uses Logic Apps to automatically attach evidence to Microsoft Sentinel alerts and send them to an Event Hub that can be consumed by a 3rd party SIEMs and Ticketing Systems.

 

Using Sentinel alongside a 3rd party SIEM and ticketing systems

 

From our customers engagements we learned that sometimes customers prefer to maintain their existing SIEM alongside Microsoft Sentinel.

 

Among the reasons for doing so are:

  • Using Microsoft Sentinel as a cloud SIEM alongside the existing SIEM to monitor on-prem workloads.
  • Using both during the transition period.

 

In addition, customers often use a ticketing system, such as Service Now or JIRA to manage incidents at the SOC and need to forward alert information to those systems.

 

Traditionally, customers forwarded alerts from Microsoft Sentinel to their existing SIEM or ticketing systems using the Graph Security API. You can do so for Splunk, QRadar, Service Now or any other SIEM or Ticketing System that supports Event Hub ingestion.

 

Microsoft Sentinel supporting evidence

 

However, in a side by side deployment, alerts from one platform need to be sent to the other to enable a single pane of glass for the analyst. To ensure efficient triaging on the primary pane of glass, the alerts have to include enough supporting information. When the 3rd Party SIEM or ticketing system is used as the primary pane of glass, this translates to sending both Microsoft Sentinel alerts and their supporting events to this system.

 

1.png

 

When you press “Events”, you are redirected to the “Logs” screen to view the supporting events relevant to the alert. Those can be, but are not necessarily, raw events collected by Microsoft Sentinel. Instead, the alert rule determines what to present as supporting events. Learn more about how a rule controls the supporting evidence in the Microsoft Sentinel KQL lab (YouTubedeck) and the Microsoft Sentinel rule writing Webinar (YouTubedeck).

 

As an example, the following alert rule taken from the KQL Lab uses the summarize and extend keywords to produce just the data relevant to the detected anomalies:

 

2.png

Forwarding alerts with supporting events to an Event Hub

 

In this article, we demonstrate how to use Microsoft sentinel SOAR capability and leverage a Logic App playbook to send alerts with their associated supporting events to a 3rd party SIEM.

 

3.png

 

The playbook, available here, works as follows:

  • The playbook triggers when an alert is created (1), this can be done automatically for each alert when it triggers, or on-demand by an analyst.
  • Parse JSON actions are used throughout the playbook to transform JSON objects received to the format expected in subsequent steps.
  • Query the workspace for the supporting events (2). Note that the query to fetch the supporting events is included as part of the alert extended properties.
  • Send the enriched alert to an Event Hub (3).

 

The JSON that is sent to the Event Hub looks as below. The “SupportingEvents” attribute is added by the Playbook

 

 

 

 

 

 

 

 

{
    "Alert": "AD user created password not set within 24-48 hours",
    "AlertsDescription": "Identifies whenever a new account is created with a …",
… additional alert fields
    "AlertEntites": 
" [{ 
		" $id ": " 3 ",
		" DnsDomain ": " Contoso.Azure ",
		" HostName ": " ContosoDc ",
		" Type ": " host "
	}, {
		" $id ": " 4 ",
		" Name ": " MSOL_d9f03d5ca7ff ",
		" Type ": " account "
	] ",
    "Events": 
" [{
		" StartTimeUtc ": " 2020 - 06 - 02T17: 03: 16.44Z ",
		" EventID ": 4722,
		" Computer ": " ContosoDc.Contoso.Azure ",
		" TargetUserName ": " XXX ",
		" TargetDomainName ": " CONTOSO ",
		" SubjectUserName ": " ContosoAdmin ",
		" timestamp ": " 2020 - 06 - 02T17: 03: 16.44Z ",
		" AccountCustomEntity ": " XXX ",
		" HostCustomEntity ": " ContosoDc.Contoso.Azure "
	}, {
		" StartTimeUtc ": " 2020 - 06 - 02T16: 29: 56.963Z ",
		" EventID ": 4722,
		" Computer ": " ContosoDc.Contoso.Azure ",
		" TargetUserName ": " XXX ",
		" TargetDomainName ": " CONTOSO ",
		" SubjectUserName ": " ContosoAdmin ",
		" timestamp ": " 2020 - 06 - 02T16: 29: 56.963Z ",
		" AccountCustomEntity ": " XXX ",
		" HostCustomEntity ": " ContosoDc.Contoso.Azure "
	}]"
}

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Deploying the solution

  • Create an Event Hub using the article “Create an event hub using Azure portal” or use an existing Event Hub.
  • Go to the Playbook GitHub page.
  • Press the “deploy to Azure” button.
  • Once the playbook is deployed, modify the “Run query and list results” action (2) and point it to your Microsoft Sentinel workspace.
  • Next, configure the “send event” action (3) to use your Event Hub.

 

Connect to your 3rd party SIEM or ticketing system

 

Most, if not all, SIEMs can consume the alerts from an Event Hub. Consult with your SIEM vendor on how. The following are instructions for consuming the alerts from the Event Hub to popular SIEM platforms:

 

Alternatively, if your SIEM or ticketing system supports an API, you may be able to connect directly from the Logic App playbook to your SIEM using the Logic App HTTP connector, or, if available a dedicated connector such as those available for Service Now or Jira

 

Summary

 

We just walked through the process of how enrichment can be done on Microsoft Sentinel level by leveraging could native capabilities in Azure before forwarding to 3rd Party SIEM or to a ticketing system. Stay tuned for more us cases in our Blog channel!

 

Thanks

17 Comments
Steel Contributor

@Yaniv Shasha@Ofer_Shezaf  @Alp Babayigit 

 

That is a lot of parsing going on there! :lol: I have the same struggle when pushing data from Log Analytics to Logic Apps since the data is wrapped in tables and rows. What is the best way yo handle this? Any tips?

Copper Contributor

@JanBakkerOrphaned , 

The Sentinel trigger brings the alert rule related data and running it on Log analytics using query extended options gets the events.

So do you mean pushing data from Log analytics to Event grid instead?

Its always an array from log analytics output with proper json objects which should be easy to deal with.

Can you kindly ellaborate your issue?

Steel Contributor

@MaheshMarthi  I'm talking about this scenario : https://gregramsey.net/2020/04/13/processing-an-azure-alert-with-a-logic-app/

 

In this blog, the JSON is parsed with powershell using an Azure function, but that seems a bit of a detour. As the writer of the blog mentions, he has no better option for it yet. The data is indeed in JSON format, but the values that matter to me are all stuffed in one single row. See this example. 

 

That is not easy to parse.

Like to hear your ideas! Thanks

Copper Contributor

@JanBakkerOrphaned ,

I have done some work on this.

Below is the logic app over view

MaheshMarthi_0-1592903974155.png

 
 

 

 

Input is taken as a string it is the whole json from here (as you mentioned).

Then I parsed it.

Inside foreach loop I used json(items('For_each_entry_in_input')?['Properties']) . You can use this parsed json to perform required actions.

or it can be added to an array variable like i did to get all the json in an array.

 

 

Copper Contributor

Hi @Yaniv Shasha , @MaheshMarthi 

 

I have a ticketing system to which I need to push alerts from Azure Sentinel. The ticketing system is set up to use Azure webhook alerts.

How would I change your above logic app to address my situation?

 

Steel Contributor

@MaheshMarthi do you mind sharing the details on the logic app steps with us? Thanks!

Copper Contributor

@HetashParmar . 

You have option to use Incident APIs available here.

https://github.com/Azure/azure-rest-api-specs/tree/master/specification/securityinsights/resource-ma...

 

You can poll incidents using these APIs and get relevant info and push to your ITSM

Copper Contributor
Copper Contributor

@HetashParmar You can use Incident APIs available hee

https://github.com/Azure/azure-rest-api-specs/tree/master/specification/securityinsights/resource-ma... to poll incidents and push data to your ITSM

Iron Contributor

@Yaniv Shasha @MaheshMarthi What if we want to stream the incidents from Sentinel to a ticketing tool whose connector is not there. For example, I want to link ConnectWise and Sentinel for ticketing.

Copper Contributor

Hi Yash,

We have to either use incident APIs or poll SecurityIncident table in senitnel connected workspace to get info of created/updated incidents and pass them to ITSM (assuming ITSM has RestAPIs exposed).

Copper Contributor

I'm trying to deploy this logic app however I keep getting an error. The trigger is successful but the output from it is 'null'. There are a number of incidents in my Sentinel workspace at present I'm unsure why they are not being received.

Copper Contributor

@wvpank This only works for alerts, I need to accomplish the same as you and have it work for incidents instead however, the incidents trigger does not contain the extended properties, therefore the rest of the chain does not work. 

 

@Yaniv Shasha @MaheshMarthi do you have any suggestions on how this could be accomplished? 

Copper Contributor

@solman07 

You can use the Automation in Azure Sentinel.

Create a play book with incident trigger.

Create an automation rule to file a playbook on incident creation.

With in the playbook, with incident number on hand, you can query SecurityAlert and SecurityIncident Tables to get more info that would enrich your ticket.

Microsoft

The customer needs to configure there on prem firewall to allow communication for this solution to ON pem Firewall, what would the IPs be?

Copper Contributor

@Henry_Pieterse : After deployment of logic app, go to azure portal => logic app => propeties => outgoing Ips. 

You need to add these to allow communication

Copper Contributor

The app is not getting triggered for me. I'm using a service principal for the Sentinel connection, which has both Sentinel Reader and Sentinel Automation Contributor roles in the subscription that houses the Sentinel instance I want the app to trigger on. Is this an access issue, or might I have something else wrong?

Co-Authors
Version history
Last update:
‎Nov 02 2021 12:07 AM
Updated by: