Microsoft-Defender-for-Cloud/Workflow automation
Salam Bashir 9b337066ee D4Storage MoveMaliciousBlobEventTrigger copy only if eTags match 2024-11-19 21:42:37 +02:00
..
Activity log Alerts for DDoS changing deployment links 2021-08-06 14:27:27 +02:00
Add-HostNameTagEC2Arc Add-HostNameTagEC2Arc 2023-08-28 18:22:06 -04:00
Add-PathAACPolicy Updating images 2020-10-13 08:17:13 +03:00
Ask-Remove-MalwareBlob Archive malwareblob automations 2023-06-22 13:25:31 -04:00
Assign-MDCRecommendationsbyAzureActivity Assign-MDCRecommendationsbyAzureActivity 2022-06-08 21:59:34 -04:00
AttackPath-Sentinel-Incident-Enrich Add files via upload 2023-07-12 05:16:54 -04:00
Audit Workflow Automation via policy Fix the links in readme files 2020-07-02 11:42:27 +03:00
AzureSiteRecovery-RansomwareProtection Minor improvements in ASR scripts 2023-10-31 20:48:16 +05:30
Block-Suspicious-DNS-Activity Small clarification to readme 2022-03-23 13:20:52 +00:00
BlockBruteforceAttack Changing default for additional info 2023-02-07 09:36:37 +01:00
BlockSqlBruteforceAttack Updated to new name of MDFC 2022-02-15 14:39:15 +00:00
Configure Workflow Automation in scale via policy update descriptions in Workflow Automation and Export policies 2020-05-12 15:00:54 +03:00
Configure-MDE Updated images and links 2021-01-03 17:33:01 +02:00
ContainerImageScanning_Notification Updated Json 2020-11-17 23:13:41 -06:00
Create-ExemptionsByResourceTag Update readme.md 2022-05-16 10:13:35 -05:00
Create-MDEDeviceTagArc arc servers set mde device tag 2022-12-17 00:09:11 -05:00
Create-MDEDeviceTagAzure Create MDE Device Tags from Azure Defender for Servers 2022-12-16 01:06:02 -05:00
Create-SNOWCRfromASCRec Fixed typo in service-now connection api 2020-04-13 14:51:34 -04:00
Create-SNOWIncfromASCAlert initial commit 2020-04-13 14:50:58 -04:00
Create-SNOWVulnIncident updated logic 2023-10-05 13:04:14 -04:00
Defender for API Update Readme.md 2023-11-15 19:40:03 +00:00
Delete Blob LogicApp Defender for Storage Update ReadMe.md 2024-11-06 14:18:29 -08:00
Disable-AAD-Account-Revoke-Tokens Update README.md 2022-03-24 09:57:41 -04:00
Enable-ASCJITVM Added new json with links to gov cloud 2021-10-05 14:04:53 -05:00
Enable-MDETVM Enable-MDETVM workflow automation 2022-01-13 20:23:41 +00:00
Enable-NSG-OnSubnet fixed links and spelling errors 2022-12-14 07:37:11 -08:00
Export-ASCDataToEventHub fixed typos and added link 2020-07-14 19:27:57 +02:00
Export-ASCRecommendationsToCSV Export-ASCRecommendationsToCSV 2020-04-30 17:35:07 +00:00
Export-ComplianceData Update readme.md 2021-03-23 09:54:41 +01:00
Extend-AlertSuppressionRulesAboutToExpire minor changes to readme.md 2021-10-05 12:56:15 +01:00
Install-VulnAssesmentAgent fixing issue #385 2021-06-04 09:59:16 +02:00
Isolate-ASCAlertAzureVM New WFA Isolate Azure VM 2020-03-24 17:40:32 -04:00
Isolate-MDATPMachineAlert Update readme.md 2020-04-16 17:11:26 -04:00
Move Malicious Blob FunctionApp Defender for Storage D4Storage MoveMaliciousBlobEventTrigger copy only if eTags match 2024-11-19 21:42:37 +02:00
Notify-ASCAlertsAzureResource Move WFAs into 2020-03-22 16:42:23 -04:00
Notify-ASCAlertsbyAzureActivity update params 2021-11-15 19:15:04 -05:00
Notify-ASCRecommendationsAzureResource Move WFAs into 2020-03-22 16:42:23 -04:00
Notify-ASCRecommendationsResourceTag Update readme.md 2021-12-01 15:55:14 +01:00
Notify-ASCRecommendationsbyAzureActivity Notify-ASCRecommendationsbyAzureActivity 2020-08-27 14:34:54 -04:00
Notify-AverageTimeGraph-TimeIndicators Update Readme.Md 2021-06-01 07:52:17 -07:00
Notify-AzDefenderAlertIPEntity-GreyNoiseCommunity Notify-AzDefenderAlertIPEntity-GreyNoiseCommunity 2021-08-12 01:27:53 -04:00
Notify-MDCRecommendationChangeActivity new mdc notify recommend 2023-06-09 16:40:20 -04:00
Notify-NewAttackPath Update azuredeploy.json 2023-06-12 08:26:09 -04:00
Notify-ResourceExemption corrected metadata in parameters definition 2020-10-13 10:49:48 +02:00
Notify-SQLVulnerabilityReport Update azuredeploy.json 2024-10-07 09:35:34 -07:00
Notify-StaleResources adding time indicators automation 2021-05-11 10:44:06 +02:00
Open-DevOpsTaskAlert Update azuredeploy.json 2020-04-13 10:51:12 -04:00
Open-DevOpsTaskRecommendation Update azuredeploy.json 2020-06-26 08:16:54 -04:00
Open-JIRA-Ticket Intial Commit 2020-04-08 07:59:36 -04:00
Open-JIRAIssueAlert Update azuredeploy.json 2020-04-13 10:51:46 -04:00
Post-SlackMessage Update readme.md 2020-04-13 12:24:19 -04:00
Post-SlackMessageAlert Update azuredeploy.json 2020-04-13 10:52:14 -04:00
Post-TeamsMessage Updated links and images 2021-01-03 17:44:07 +02:00
Post-TeamsMessageAlert Update readme.md 2024-01-04 06:58:30 -06:00
Protect Azure VM Backup from Ransomware Adding steps for custom role 2022-12-09 15:32:44 +05:30
Regulatory Compliance changing deployment links 2021-08-06 14:27:27 +02:00
Remove-KeyVault-AccessPolicies-RBACPermissions Fixed URIs in Azure Deploy links 2022-06-17 12:32:59 +01:00
Remove-MalwareBlob Archive malwareblob automations 2023-06-22 13:25:31 -04:00
Request-ResourceExemption updating readme.md 2021-01-26 12:36:34 +01:00
Run-MDATPAntivirus Run-MDATPAntivirus 2020-04-16 17:13:10 -04:00
Secure Storage Remediation changing deployment links 2021-08-06 14:27:27 +02:00
Send-O365EmailRecommendation Updated links and images 2021-01-03 17:44:07 +02:00
Send-WeeklyComplianceReport Update readme.md 2021-03-23 09:55:05 +01:00
SubscriptionManagement Update Readme.md 2023-05-31 13:38:17 -07:00
Sync-AzureVMTags-MDEDeviceTags Create MDE Device Tags from Azure Defender for Servers 2022-12-16 01:06:02 -05:00
Upgrade Pricing Tier changing deployment links 2021-08-06 14:27:27 +02:00
images Added Images Folder with Download icon 2022-03-31 11:21:21 -07:00
CODEOWNERS Add Miri as requiered reviewer to the workflow automation folder in GitHub 2020-09-21 18:18:53 +03:00
README.md Corrected image path in README 2022-03-31 11:21:57 -07:00

README.md

Workflow automation in Microsoft Defender for Cloud

This folder contains sample security playbooks for security automation, orchestration and response (SOAR)

These playbooks can be easily integrated with Azure Security Center using Workflow Automation feature. Learn more>

Each folder contains a security playbook ARM template that uses Microsoft Security Center triggers.

After selecting a playbook, in the Azure portal:

  1. Search for deploy a custom template
  2. Click build your own template in the editor
  3. Paste the contents from the GitHub playbook
  4. Click Save
  5. Fill in needed data and click purchase

Once deployment is complete, you will need to authorize each connection.

  1. Click the Azure Security Center connection resource
  2. Click edit API connection
  3. Click Authorize
  4. Sign in
  5. Click Save
  6. Repeat steps for other connections
  • For Azure Log Analytics Data Collector, you will need to add the workspace ID and Key You can now edit the playbook in Logic apps.

Contribute Logic App Playbooks

Instructions for templatizing a playbook

Option 1: Azure Logic App/Playbook ARM Template Generator

  1. Download tool and run the PowerShell script
    Download

  2. Extract the folder and open "Playbook_ARM_Template_Generator.ps1" either in Visual Studio Code/Windows PowerShell/PowerShell Core

    Note
    The script runs from the user's machine. You must allow PowerShell script execution. To do so, run the following command:

    Set-ExecutionPolicy -Scope Process -ExecutionPolicy Bypass  
    
  3. Script prompts you to enter your Azure Tenant Id

  4. You are prompted to authenticate with credentials, once the user is authenticated, you will be prompted to choose

    • Subscription
    • Playbooks
  5. After selecting playbooks, script prompts to select location on your local drive to save ARM Template. ARM Template gets generated under <<PlaybookName>> folder

Option 2: Manual

Once you have created a playbook that you want to export to share, go to the Logic App resource in Azure.

Note: this is the generic instructions there may be other steps depending how complex or what connectors are used for the playbook.

  1. Click Export Template from the resource menu
  2. Copy the contents of the template
  3. Using VS code, create a new JSON file
  4. Paste the code into the new file
  5. In the parameters section, you can remove all parameters and add the following. You might need to add additional parameters if your logic app has items in the workflow that need to be changed, like API key.
    "parameters": {
        "PlaybookName": {
            "defaultValue": "PlaybookName",
            "type": "string"
        },
        "UserName": {
            "defaultValue": "<username>@<domain>",
            "type": "string"
        }
    },
  • You need a playbook name and username that will be used for the connections.
  1. In the variables section, you will need to create a variable for each connection the playbook is using like,
    "variables": {
        "AzureADConnectionName": "[concat('azuread-', parameters('PlaybookName'))]",
        "AzureSentinelConnectionName": "[concat('azuresentinel-', parameters('PlaybookName'))]"
    },
  • The variables will be the connection names. Here we are creating a connection name using the connection (AzureAD) and "-" and the playbook name.
  1. Next, you will need to add resources to be created for each connection.
   "resources": [
        {
            "type": "Microsoft.Web/connections",
            "apiVersion": "2016-06-01",
            "name": "[variables('AzureADConnectionName')]",
            "location": "[resourceGroup().location]",
            "properties": {
                "displayName": "[parameters('UserName')]",
                "customParameterValues": {},
                "api": {
                    "id": "[concat('/subscriptions/', subscription().subscriptionId, '/providers/Microsoft.Web/locations/', resourceGroup().location, '/managedApis/azuread')]"
                }
            }
        },
  • The name is using the variable we created. The location is using the resource group that was selected as part of the deployment. The displayname is using the Username parameter. Lastly, you can build the string for the id using strings plus properties of the subscription and resource group. Repeat for each connection needed.
  1. You will need to add a dependsOn section to the Microsoft.Logic/workflows resource. This will ensure the connection resources are created before the workflow.
 "dependsOn": [
                "[resourceId('Microsoft.Web/connections', variables('AzureADConnectionName'))]",
                "[resourceId('Microsoft.Web/connections', variables('AzureSentinelConnectionName'))]"
            ],

  1. In the Microsoft.Logic/workflows resource under paramters / $connections, there will be a value for each connection. You will need to update each like the following.
"parameters": {
                    "$connections": {
                        "value": {
                            "azuread": {
                                "connectionId": "[resourceId('Microsoft.Web/connections', variables('AzureADConnectionName'))]",
                                "connectionName": "[variables('AzureADConnectionName')]",
                                "id": "[concat('/subscriptions/', subscription().subscriptionId, '/providers/Microsoft.Web/locations/', resourceGroup().location, '/managedApis/azuread')]"
                            },
                            "azuresentinel": {
                                "connectionId": "[resourceId('Microsoft.Web/connections', variables('AzureSentinelConnectionName'))]",
                                "connectionName": "[variables('AzureSentinelConnectionName')]",
                                "id": "[concat('/subscriptions/', subscription().subscriptionId, '/providers/Microsoft.Web/locations/', resourceGroup().location, '/managedApis/azuresentinel')]"
                            }
                        }
                    }
                }

  • The connectionId will use a string and variable. The Connection name is the variable. The id is the string we used early for the id when creating the resource.
  1. Save the JSON and contribute to the repository.

Questions

You can submit any questions or requests here. Please also refer to our Wiki, as it will provide you with further information.

Contributing

This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.microsoft.com.

When you submit a pull request, a CLA-bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA.

This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments.