|
3 | 3 | ## Overview |
4 | 4 | This playbook uses the [Microsoft Defender Threat Intelligence](https://learn.microsoft.com/en-us/defender/threat-intelligence/what-is-microsoft-defender-threat-intelligence-defender-ti) Reputation data to automatically enrich incidents generated by Microsoft Sentinel. Indicators from an incident will be evaluated with MDTI [Reputation](https://learn.microsoft.com/en-us/defender/threat-intelligence/reputation-scoring) data. If any indicators are labeled as "suspicious", the incident will be tagged as such and its severity will be marked as "medium". If any indicators are labeled as "malicious", the incident will be tagged as such and its severity will be marked as "high". Regardless of the reputation state, comments will be added to the incident outlining the reputation details with links to further information if applicable. |
5 | 5 |
|
6 | | -## Prerequisites |
7 | | -1. This playbook inherits API connections created and established within a base playbook. Ensure you have deployed [MDTI-Base](https://raw.githubusercontent.com/Azure/Azure-Sentinel/master/Solutions/Microsoft%20Defender%20Threat%20Intelligence/Playbooks/MDTI-Base/azuredeploy.json) this playbook. If you have trouble accessing your account or your credentials contact your account representative or reach out to discussMDTI[@]microsoft.com. |
8 | | -2. This playbook requires "Microsoft Sentinel Contributor" role to update Incidents. |
9 | 6 |
|
| 7 | +## Prerequisites |
| 8 | +1. Microsoft Defender Threat Intelligence (MDTI) Premium license enabled on your tenant. |
| 9 | +2. Security Administrator, Global Administrator, or Privileged Role Administrator role in Azure AD to assign the required API permissions to the playbook's Managed Identity. |
10 | 10 |
|
11 | 11 | ## Deployment |
12 | 12 |
|
| 13 | +### Playbook Parameters |
| 14 | +| Name | Description | Default Value | |
| 15 | +|-----------------|------------------------------------|-------------------------------| |
| 16 | +| PlaybookName | Name of the playbook | MDTI-Automated-Triage | |
| 17 | +| MDTI-BaseUrl | Base URL for MDTI API | https://graph.microsoft.com | |
| 18 | +| Api-Version | API version for MDTI API | v1.0 | |
| 19 | + |
13 | 20 | <a href="https://portal.azure.com/#create/Microsoft.Template/uri/https%3A%2F%2Fraw.githubusercontent.com%2FAzure%2FAzure-Sentinel%2Fmaster%2FSolutions%2FMicrosoft%2520Defender%2520Threat%2520Intelligence%2FPlaybooks%2FMDTI-Automated-Triage%2Fazuredeploy.json" target="_blank"> |
14 | 21 | <img src="https://aka.ms/deploytoazurebutton"/> |
15 | 22 | </a> |
16 | 23 | <a href="https://portal.azure.us/#create/Microsoft.Template/uri/https%3A%2F%2Fraw.githubusercontent.com%2FAzure%2FAzure-Sentinel%2Fmaster%2FSolutions%2FMicrosoft%2520Defender%2520Threat%2520Intelligence%2FPlaybooks%2FMDTI-Automated-Triage%2Fazuredeploy.json" target="_blank"> |
17 | 24 | <img src="https://raw.githubusercontent.com/Azure/azure-quickstart-templates/master/1-CONTRIBUTION-GUIDE/images/deploytoazuregov.png"/> |
18 | 25 | </a> |
19 | 26 |
|
| 27 | + |
20 | 28 | ## Post-Deployment Instructions |
21 | | -After deploying the playbook, you must authorize the connections leveraged. |
22 | 29 |
|
23 | | -1. Visit the playbook resource. |
24 | | -2. Under "Development Tools" (located on the left), click "API Connections". |
25 | | -3. Ensure each connection has been authorized. |
26 | 30 |
|
27 | | -**Note: If you've deployed the [MDTI-Base](https://raw.githubusercontent.com/Azure/Azure-Sentinel/master/Solutions/Microsoft%20Defender%20Threat%20Intelligence/Playbooks/MDTI-Base/azuredeploy.json) playbook, you will only need to authorize the Microsoft Sentinel connection.** |
| 31 | +**1. Assign ThreatIntelligence.Read.All Permission to Playbook's Managed Identity** |
| 32 | + |
| 33 | +To allow the playbook to query Microsoft Defender Threat Intelligence data, you must grant the managed identity of the playbook the `ThreatIntelligence.Read.All` application permission in Microsoft Graph. Follow these steps: |
| 34 | + |
| 35 | +1. Ensure you have the necessary Azure AD permissions (Security Administrator, Global Administrator, or Privileged Role Administrator). |
| 36 | +2. Open the [Azure Cloud Shell](https://shell.azure.com/) or use a local PowerShell session with the Microsoft Graph module installed. |
| 37 | +3. Run the following commands, replacing `'MDTI-Automated-Triage'` with your playbook's name if different: |
| 38 | + |
| 39 | +```powershell |
| 40 | +# Install and import Microsoft Graph module if not already present |
| 41 | +Install-Module Microsoft.Graph -Scope CurrentUser -AllowClobber -Force |
| 42 | +Import-Module Microsoft.Graph # It takes a minute to import |
| 43 | +
|
| 44 | +
|
| 45 | +# Connect to Microsoft Graph with the required scopes |
| 46 | +Connect-MgGraph -Identity |
| 47 | +
|
| 48 | +# Get the Microsoft Graph service principal |
| 49 | +$graphSp = Get-MgServicePrincipal -Filter "displayName eq 'Microsoft Graph'" |
| 50 | +
|
| 51 | +# Get the App Role ID for ThreatIntelligence.Read.All |
| 52 | +$role = $graphSp.AppRoles | Where-Object { $_.Value -eq "ThreatIntelligence.Read.All" -and $_.AllowedMemberTypes -contains "Application" } |
| 53 | +
|
| 54 | +$logicAppName = 'MDTI-Data-Cookies' # Change if different |
| 55 | +# Get your Logic App's managed identity service principal |
| 56 | +$logicAppSp = Get-MgServicePrincipal -Filter "displayName eq 'MDTI-Automated-Triage'" |
| 57 | +
|
| 58 | +# Assign the permission to the Logic App's managed identity |
| 59 | +New-MgServicePrincipalAppRoleAssignment -ServicePrincipalId $logicAppSp.Id ` |
| 60 | + -PrincipalId $logicAppSp.Id ` |
| 61 | + -ResourceId $graphSp.Id ` |
| 62 | + -AppRoleId $role.Id |
| 63 | +
|
| 64 | +Write-Host "Permission assigned successfully to Logic App ${logicAppName}." |
| 65 | +``` |
| 66 | + |
| 67 | +**2. Authorize Connections** |
| 68 | + |
| 69 | +After deployment, authorize all connections: |
| 70 | + |
| 71 | +1. Click the Microsoft Sentinel connection resource |
| 72 | +2. Click edit API connection |
| 73 | +3. Click Authorize |
| 74 | +4. Sign in |
| 75 | +5. Click Save |
| 76 | +Repeat steps for all connections. |
| 77 | + |
| 78 | +**3. Assign Microsoft Sentinel Contributor Role to Playbook** |
| 79 | + |
| 80 | +This playbook uses a managed identity, which must have the Microsoft Sentinel Contributor role assigned in the Sentinel instances to enable adding comments. |
| 81 | + |
| 82 | +1. Select the Playbook resource. |
| 83 | +2. In the left menu, click Identity. |
| 84 | +3. Under Permissions, click Azure role assignments. |
| 85 | +4. Click Add role assignment (Preview). |
| 86 | +5. Use the drop-down lists to select the resource group that your *Sentinel Workspace* is in. If multiple workspaces are used in different resource groups consider selecting subscription as a scope instead. |
| 87 | +6. In the Role drop-down list, select the role 'Microsoft Sentinel Contributor'. |
| 88 | +7. Click Save to assign the role. |
| 89 | + |
| 90 | +**4. Attach the Incident Triggered Playbook to an Automation Rule** |
| 91 | + |
| 92 | +To run the playbook automatically: |
| 93 | + |
| 94 | +1. In Microsoft Sentinel, go to **Automation** > **Automation rules**. |
| 95 | +2. Click **+ Add new** to create a new automation rule. |
| 96 | +3. Set the rule conditions (e.g., when an alert/incident is created, or based on alert/incident details). |
| 97 | +4. In the Actions section, select **Run playbook** and choose your Alert Triggered Playbook. |
| 98 | +5. Save the automation rule. |
| 99 | + |
| 100 | +For more details, see the [official documentation on automation rules](https://docs.microsoft.com/azure/sentinel/automate-incident-handling-with-automation-rules#creating-and-managing-automation-rules). |
| 101 | + |
| 102 | +**5. Configure Analytics Rules to run Playbook** |
| 103 | + |
| 104 | +To ensure this playbook is triggered by alerts/incidents containing URL entities, configure your analytics rules as follows: |
| 105 | + |
| 106 | +1. In Microsoft Sentinel, go to **Analytics** and create a new scheduled query rule or edit an existing one. |
| 107 | +2. In the rule creation workflow, go to the **Set rule logic** tab. |
| 108 | +3. In the **Alert enhancement** section, expand **Entity mapping**. |
| 109 | +4. Click **Add new entity**: |
| 110 | + - For IPs, select **IP** as the entity type, then map the **Address** identifier to the field in your query that contains the IP address value. |
| 111 | + - For Hostnames, select **Host** as the entity type, then map the **FullName** identifier to the field in your query that contains the IP address value. |
| 112 | +5. You can map up to 10 entities per rule and up to 3 identifiers per entity. |
| 113 | +6. Complete the rest of the rule configuration and save. |
| 114 | + |
| 115 | +For more details, see the official documentation on [mapping data fields to entities in Microsoft Sentinel](https://learn.microsoft.com/en-us/azure/sentinel/map-data-fields-to-entities#how-to-map-entities). |
| 116 | + |
| 117 | + |
| 118 | +## Screenshots |
| 119 | + |
| 120 | +### Playbook Example Screenshots |
| 121 | + |
| 122 | +<p align="center"> |
| 123 | + <img src="./Images/MDTI-Automated-Triage_Light.png" alt="MDTI-Automated-Triage Light" width="400"/> |
| 124 | + <br/> |
| 125 | + <em>MDTI-Automated-Triage Light</em> |
| 126 | +</p> |
| 127 | + |
| 128 | +<p align="center"> |
| 129 | + <img src="./Images/MDTI-Automated-Triage_Dark.png" alt="MDTI-Automated-Triage Dark" width="400"/> |
| 130 | + <br/> |
| 131 | + <em>MDTI-Automated-Triage Dark</em> |
| 132 | +</p> |
| 133 | + |
| 134 | + |
| 135 | +## References |
| 136 | +- [Microsoft Defender Threat Intelligence Documentation](https://learn.microsoft.com/en-us/defender/threat-intelligence/what-is-microsoft-defender-threat-intelligence-defender-ti) |
| 137 | +- [Reputation Scoring](https://learn.microsoft.com/en-us/defender/threat-intelligence/reputation-scoring) |
0 commit comments