-
Notifications
You must be signed in to change notification settings - Fork 3.5k
Created a new tool for creating Incidents with email #6409
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
4b1100f
590fdb3
e8120a3
7c225ce
7bdb458
4ecde81
47ba4d6
71c6a7f
36bdfd5
f057e88
91ced81
a8990c6
c0a8427
67261aa
d4c9545
73ea96d
9e51007
5d54f6a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,52 @@ | ||
|
|
||
|
|
||
|
|
||
|
|
||
| Please use the below button to deploy | ||
|
|
||
| [](https://portal.azure.com/#create/Microsoft.Template/uri/https%3A%2F%2Fraw.githubusercontent.com%2FAzure%2FAzure-Sentinel%2Fmaster%2FPlaybooks%2FCreate%2520Incidents%2520with%2520Email%2Fazuredeploy.json) | ||
|
|
||
| ### Deployment | ||
|
|
||
| Once deployed you can configure the connections as below | ||
|
|
||
|  | ||
|
|
||
|
|
||
| ### Configuration | ||
|
|
||
| 1. Sentinel Connection | ||
|
|
||
samikroy marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|  | ||
|
|
||
|
|
||
| 2. Office 365 Connection | ||
|
|
||
samikroy marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|  | ||
|
|
||
| ### Post configuration | ||
|
|
||
| Once configured, the logic app will look like this. | ||
|
|
||
|  | ||
|
|
||
| ### Test | ||
|
|
||
| Step 1: Send an email to the configure email | ||
|
|
||
|  | ||
|
|
||
|
|
||
| Step 2: Incident created in Sentinel | ||
|
|
||
|  | ||
|
|
||
|
|
||
| ### Use cases | ||
|
|
||
| SOC - In a organization there might be Security Incident / Suspicious activity occurring to the resources where Security is not tightened up yet. | ||
| So an email address can be whistle blower here. A suspicious activity can be reported over a dedicated email address to create an incident and address the incident. | ||
|
|
||
|
|
||
| Thank you for using the tool. | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,161 @@ | ||
| { | ||
| "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#", | ||
| "contentVersion": "1.0.0.0", | ||
| "metadata": { | ||
| "title": "Create-Incident-Logic-App", | ||
| "description": "This playbook will help to create an incident in Microsoft Sentinle when an email is sent to the configured email address.", | ||
| "prerequisites": ["1. A Office 365 MailBox.", | ||
| "2. An existing Microsoft Sentinel Instance"], | ||
| "lastUpdateTime": "2022-12-16T00:00:00.000Z", | ||
| "tags": ["Enrichment"], | ||
| "support": { | ||
| "tier": "community" | ||
| }, | ||
| "author": { | ||
| "name": "samikroy" | ||
| } | ||
| }, | ||
| "parameters": { | ||
| "PlaybookName": { | ||
| "defaultValue": "Create-Incident-Logic-App", | ||
| "type": "String" | ||
| }, | ||
| "WorkspaceName": { | ||
| "defaultValue": "demo-workspace", | ||
| "type": "String" | ||
| } | ||
| }, | ||
| "variables": { | ||
| "MicrosoftSentinelConnection": "[concat('azuresentinel-', parameters('PlaybookName'))]", | ||
| "Office365Connection": "[concat('office-', parameters('PlaybookName'))]" | ||
|
|
||
| }, | ||
| "resources": [ | ||
| { | ||
| "type": "Microsoft.Web/connections", | ||
| "apiVersion": "2016-06-01", | ||
| "name": "[variables('Office365Connection')]", | ||
| "location": "[resourceGroup().location]", | ||
| "kind": "V1", | ||
| "properties": { | ||
| "displayName": "[variables('Office365Connection')]", | ||
| "customParameterValues": {}, | ||
| "api": { | ||
| "id": "[concat('/subscriptions/', subscription().subscriptionId, '/providers/Microsoft.Web/locations/', resourceGroup().location, '/managedApis/office365')]" | ||
| } | ||
| } | ||
| }, | ||
| { | ||
| "type": "Microsoft.Web/connections", | ||
| "apiVersion": "2016-06-01", | ||
| "name": "[variables('MicrosoftSentinelConnection')]", | ||
| "location": "[resourceGroup().location]", | ||
| "kind": "V1", | ||
| "properties": { | ||
| "displayName": "[variables('MicrosoftSentinelConnection')]", | ||
| "customParameterValues": {}, | ||
| "parameterValueType": "Alternative", | ||
| "api": { | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Deployment is failing due to missing entry mentioned below: After custom Parameters: this will enable the deployment to install workflow as managed by service identity. Note: Before submitting the PR, kindly test the deployment in your environment.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @samikroy is this done? Please confirm
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Hello , after line number 58 you need to make the changes, you didn't get lost, that why I marked the comment at line 58. Changes mentioned above are needs to be added in Microsoft.Web/connections of sentinel connection not in office 365 connection.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @v-atulyadav Waiting for @samikroy to complete the changes properly |
||
| "id": "[concat('/subscriptions/', subscription().subscriptionId, '/providers/Microsoft.Web/locations/', resourceGroup().location, '/managedApis/azuresentinel')]" | ||
| } | ||
| } | ||
| }, | ||
| { | ||
| "type": "Microsoft.Logic/workflows", | ||
| "apiVersion": "2017-07-01", | ||
| "name": "[parameters('PlaybookName')]", | ||
| "location": "[resourceGroup().location]", | ||
| "identity": { | ||
| "type": "SystemAssigned" | ||
| }, | ||
| "dependsOn": [ | ||
| "[resourceId('Microsoft.Web/connections', variables('MicrosoftSentinelConnection'))]", | ||
| "[resourceId('Microsoft.Web/connections', variables('Office365Connection'))]" | ||
| ], | ||
| "properties": { | ||
| "state": "Enabled", | ||
| "definition": { | ||
| "$schema": "https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#", | ||
| "contentVersion": "1.0.0.0", | ||
| "parameters": { | ||
| "$connections": { | ||
| "defaultValue": {}, | ||
| "type": "Object" | ||
| } | ||
| }, | ||
| "triggers": { | ||
| "When_a_new_email_arrives": { | ||
| "recurrence": { | ||
| "frequency": "Minute", | ||
| "interval": 1 | ||
| }, | ||
| "evaluatedRecurrence": { | ||
| "frequency": "Minute", | ||
| "interval": 1 | ||
| }, | ||
| "splitOn": "@triggerBody()?['value']", | ||
| "type": "ApiConnection", | ||
| "inputs": { | ||
| "host": { | ||
| "connection": { | ||
| "name": "@parameters('$connections')['Office365Connection']['connectionId']" | ||
| } | ||
| }, | ||
| "method": "get", | ||
| "path": "/Mail/OnNewEmail", | ||
| "queries": { | ||
| "folderPath": "Inbox", | ||
| "importance": "Normal", | ||
| "subjectFilter": "Security Incident" | ||
| } | ||
| } | ||
| } | ||
| }, | ||
| "actions": { | ||
| "Create_incident": { | ||
| "runAfter": {}, | ||
| "type": "ApiConnection", | ||
| "inputs": { | ||
| "body": { | ||
| "description": "A new Incident is reported \n\n@{triggerBody()?['Subject']}\n\nRepoted by - @{triggerBody()?['From']}", | ||
| "severity": "Low", | ||
| "status": "New", | ||
| "title": "User Reported Incident" | ||
| }, | ||
| "host": { | ||
| "connection": { | ||
| "name": "@parameters('$connections')['MicrosoftSentinelConnection']['connectionId']" | ||
| } | ||
| }, | ||
| "method": "put", | ||
| "path":"[concat('/Incidents/subscriptions/', subscription().subscriptionId, '/resourceGroups/', resourceGroup().name, '/workspaces/',parameters('WorkspaceName'))]" | ||
| } | ||
| } | ||
| }, | ||
| "outputs": {} | ||
| }, | ||
| "parameters": { | ||
| "$connections": { | ||
| "value": { | ||
| "MicrosoftSentinelConnection": { | ||
| "connectionId": "[resourceId('Microsoft.Web/connections', variables('MicrosoftSentinelConnection'))]", | ||
| "connectionName": "[variables('MicrosoftSentinelConnection')]", | ||
| "id": "[concat('/subscriptions/', subscription().subscriptionId, '/providers/Microsoft.Web/locations/', resourceGroup().location, '/managedApis/azuresentinel')]", | ||
| "connectionProperties": { | ||
| "authentication": { | ||
| "type": "ManagedServiceIdentity" | ||
| } | ||
| } | ||
| }, | ||
| "Office365Connection": { | ||
| "connectionId": "[resourceId('Microsoft.Web/connections', variables('Office365Connection'))]", | ||
| "connectionName": "[variables('Office365Connection')]", | ||
| "id": "[concat('/subscriptions/', subscription().subscriptionId, '/providers/Microsoft.Web/locations/', resourceGroup().location, '/managedApis/office365')]" | ||
| } | ||
| } | ||
| } | ||
| } | ||
| } | ||
| } | ||
| ] | ||
| } | ||

Uh oh!
There was an error while loading. Please reload this page.