AzSentinel – Version 0.6.5

Good news guys! A new version of AzSentinel is available in PowerShell Gallery with bunch of bugfixes and new features.

Before we jump to all the good stuff, please let me thank everyone for their great feedback, support and mostly patience :p I know this version took really long and I received lots of messages. So sorry for that. The reason that it took longer is because I started my own company a couple of months ago and that kept me quite busy. As I promised I will keep maintaining this module until the Microsoft official PowerShell module is released. With that said, below you’ll find a list of changes in this new version.

1. (Breaking) changes

In this version I have decided to drop the compare functionality. This means that from now on if an alert exists, you don’t get the popup message to confirm the new changes. Why, you ask. Well with the new Incident settings and Alert grouping, the Alert Class contained child objects and I had a really hard time to fix this in the compare functionality. So I asked around and understood that people don’t use this option that much, because most of the time deployments are done through Pipeline. So I still use it in some of the functions. Like to decide if a playbooks is assigned and if we need to remove it for example. Maybe we can bring this back in the next version. Let me know what you think about this decision and if you have any tips.

Another one is the output of “Import-AzSentinelAlertRule”. In the current version it’s returned with Write-Output and this has different result than the return function. Also, instead of writing each rule output one by one, I collect it in a temp variable and return at once. This also speeds up the loop process. So how do you know if your rule was created successful or not? Well I have added a new property value named “status” and it returns 3 values:
Created: if a rule doesn’t exist and is created;
Ok: if a rule exists and gets updated;
Failed: if there was an issue, with this one you will also get an error output at the beginning of the output (so scroll up).

In the upcoming version I will try to implement more performance optimization. If you have feedback please create an issue on GitHub or get in touch with me.

2. Support for Incident settings

Also new in this version is support for Incidnet settings. You can use CreateIncidnet property in the JSON/YAML template or use the -CreateIncidnet switch when using New-AzSentinelAlertRule command. If you don’t configure this then the Microsoft default settings will be applied and your existing rules (JSON) are backwards compatible.

3. Alert grouping

Also, this new version contains support for Alert grouping. You can configure this by adding the following properties to your JSON/YAML template for each rule or by using the New-AzSentinelAlertRule with the same properties. If you don’t configure this then the Microsoft default settings will be applied and your existing rules are backwards compatible.

or by using the following switches:

4. Alert aggregation (private preview)

This is a new feature that Ofer has talked about in his latest presentation and in my opinion one of the must have features in Azure Sentinel Alert creation process. This option gives you the possibility to treat each event as a separate alert in Sentinel. This way instead of having one alert rule attached to your incident which contains 12 events, you can e.g. have 12 separate alerts assigned to one incident or 12 incidents each having one or more alerts. You can now enable this feature using -AggregationKind “AlertPerRow” in the New-AzSentinelAlertRule function or by using “aggregationKind”: “string” property in your template.

PLEASE DO NOT USE IN PRODUCTION, THIS FEATURE IS STILL IN PREVIEW!!

You have the following options:
– SingleAlert (default value)
– AlertPerRow

5. Rename-AzSentinelAlertRule

Also, you can use the Rename-AzSentinelAlertRule to rename your existing Rules.

6. Set-AzSentinel updated

In this version the Set-AzSentinel command will automatically enable the required Resource Providers if those are not enabled in your Subscription.

  1. Microsoft.SecurityInsights
  2. Microsoft.OperationsManagement

7. Get-AzSentinelPlayBook updated

And finally, there were some issues with the number of playbooks returned. Shout-out to @stehod for solving this issue.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.