Latest Version: 1.0.0 - Release Date: 19-06-2025
This project is an integration between Microsoft Defender for Endpoint and Joe Sandbox. The connector will collect alerts and related evidences, and query or submit these samples into Joe Sandbox. The connector will enrich your Microsoft Defender Alerts with Joe Sandbox analysis data (Score, Detection, Threatname and a link to the full analysis)
- The connector is built using Azure logic app, Azure functions app and Azure Storage.
- Azure Logic app
SubmitDefenderAlertsToJoeSandboxmonitors the alerts from MS Defender as soon any AV/EDR alerts are generated. If any AV/EDR alert is found, it will send the alert details to the Azure function appJoeSandboxDefender. - Azure function app
JoeSandboxDefenderchecks if the alert contains a file and checks if the file hash has already been analyzed by Joe Sandbox. - If the hash was already analysed, the system checks if user configure to reanalyse the hash in configuration step, if yes it resubmits that to Joe Sandbox to reanalyze, if not it skips re-examining it.
- Azure function app
JoeSandboxDefenderrequests the file from Microsoft Defender by starting a live response session. - Microsoft Defender starts a live response session that run PowerShell code on the endpoint. The PowerShell moves the files out of quarantine to a temporary folder before sending to Azure storage(joesandbox-defender-quarantine-files) container.
- Azure function app
JoeSandboxDefendermonitors the Azure storage(joesandbox-defender-quarantine-files) container and submits the quarantine file to Joe Sandbox. - Azure function app
JoeSandboxDefenderwill wait till the submission is completed and When the Joe Sandbox analysis is done JoeSandbox results are sent back to the Azure function appJoeSandboxDefender. - The Azure function app
JoeSandboxDefenderpost the results as a note within the relevant defender alert. - If configured to send IOCs, the Azure function app
JoeSandboxDefenderprovides the IOCs as the indicators to Microsoft Defender that may use them for automatically alerting or blocking.
- Azure Logic app
Note: This solution can only analyze files quarantined by Defender Antivirus or flagged by Defender EDR. It cannot access files that were removed or blocked by Defender, and It cannot access files if the Threat is still active in the system.
you can verify on the endpoint, Windows Security > Protection History shows, if a threat was blocked (removed or restricted) or quarantined or active.
To improve alert enrichment, set the remediation action to "Quarantine: Moves files to quarantine" for all threat levels via Intune or Group Policy.
Note: Some threats may still be blocked by other mechanisms (e.g., EDR in block mode, active threat blocking).
- Microsoft Defender for Endpoint.
- Joe Sandbox Cloud Pro or Basic API key
- Microsoft Azure
-
Azure functions with Flex Consumption plan. Reference: https://learn.microsoft.com/en-us/azure/azure-functions/flex-consumption-plan
Note: Flex Consumption plans are not available in all regions, please check if the region your are deploying the function is supported, if not we suggest you to deploy the function app with premium plan.
-
Azure functions Premium plan. Reference: https://learn.microsoft.com/en-us/azure/azure-functions/functions-premium-plan
-
Azure Logic App with Consumption plan. Reference: https://learn.microsoft.com/en-us/azure/logic-apps/logic-apps-pricing#consumption-multitenant
-
Azure storage with Standard general-purpose v2.
-
- Open https://portal.azure.com/ and search
Microsoft Entra IDservice.
- Click
Add->App registration.
- Enter the name of application, select supported account types, and click on
Register.
- In the application overview you can see
Application Name,Application IDandTenant ID.
- After creating the application, we need to set API permissions for connector. For this purpose,
- Click
Manage->API permissionstab - Click
Add a permissionbutton - Select
APIs my organization uses - Search
WindowsDefenderATPand click the search result
- Click
- On the next page, select
Application Permissionsand check the permissions according to the table below. Then, clickAdd permissionsbutton below.
| Category | Permission Name | Description |
|---|---|---|
| Alert | Alert.Read.All | Needed to retrieve alerts and related evidence |
| Alert | Alert.ReadWrite.All | Needed to enrich alerts with sample information |
| Machine | Machine.LiveResponse | Needed to gather evidences from machines |
| Machine | Machine.Read.All | Needed to retrieve information about machines |
| Ti | Ti.Read.All | Needed to retrieve indicators |
| Ti | Ti.ReadWrite | Needed to retrieve and submit indicators (application specific) |
| Ti | Ti.ReadWrite.All | Needed to retrieve and submit indicators (general) |
| Library | Library.Manage | Needed to upload custom ps1 script for retrieving AV related evidences |
- After setting only the necessary permissions, click the
Grant admin consent for ...button to approve permissions.
- We need secrets to access programmatically. For creating secrets
- Click
Manage->Certificates & secretstab - Click
Client secretstab - Click
New client secretbutton - Enter description and set expiration date for secret
- Click
- Use Secret
ValueandSecret IDto configure connector.
Reference
- Open https://security.microsoft.com
- Open
Settingspage andEndpointstab. - Open
Advanced features. - Activate
Live Response,Live Response for ServersandLive Response unsigned script executionoptions.
| Fields | Description |
|---|---|
| Subscription | Select the appropriate Azure Subscription |
| Resource Group | Select the appropriate Resource Group |
| Region | Based on Resource Group this will be auto populated |
| Function Name | Please provide a function name if needed to change the default value |
| Azure Client ID | Enter the Azure Client ID created in the App Registration Step |
| Azure Client Secret | Enter the Azure Client Secret created in the App Registration Step |
| Azure Tenant ID | Enter the Azure Tenant ID of the App Registration |
| Azure Storage Connection String | Please leave this empty |
| Azure Storage Account Key | Please leave this empty |
| App Insights Workspace Resource ID | Go to Log Analytics workspace -> Settings -> Properties, Copy Resource ID and paste here |
| JoeSandbox Base URL | JoeSandbox Base URL. |
| JoeSandbox API Key | JoeSandbox API Key |
| JoeSandbox Resubmit | If true, the files will be resubmitted to JoeSandbox analyser, even if the file hash was found in JoeSandbox |
| JoeSandbox API Retry Timeout | Provide maximum time to wait in minutes, when JoeSandbox API is not responding |
| JoeSandbox API Max Retry | Provide number of retries, when JoeSandbox API is not responding |
| JoeSandbox Analysis Job Timeout | Provide maximum time to wait in minutes, when JoeSandbox Job submissions is not responding |
| Defender API Retry Timeout | Provide maximum time to wait in minutes, when Microsoft Defender API is not responding. |
| Defender API Max Retry | Provide number of retries, when Microsoft Defender API is not responding |
| Machine Availability Timeout | Provide maximum time to wait in minutes, when the machine is not responding |
| Machine Availability Retry | Provide number of retries, when machine is not responding |
- Once you provide the above values, please click on
Review + createbutton.
- Open https://portal.azure.com/ and search
Storage accountsservice.
-
Open the storage account, the name starts with
joesecurity. -
Go to
Security + networking->Access keys, CopyConnection stringand save it temporarily for next steps.
- Go to
Security + networking->Access keys, CopyKeyand save it temporarily for next steps.
- Open https://portal.azure.com/ and search
Function Appservice.
- Open the JoeSandbox FunctionApp name starts with
JoeSandboxDefender. - Go to
Settings->Environment variables, double-clickAzureStorageConnectionStringand provide theconnection stringvalue copied in the previous step and click onsave. - Go to
Settings->Environment variables, double-clickAzureStorageAccountKeyand provide theKeyvalue copied in the previous step and click onsave. - Click on
Apply->Confirmbuttons.
- Go to
Overview-> click onRestart.
-
This playbook is mandatory. The Logic App collects the Defender Alerts and sends to JoeSandbox Function App Connector for further processing.
-
Click on below button to deploy:
-
On the next page, provide the appropriate
SubscriptionandResource groupand click onReview & create.Note: When deploying the function app if you chose a different name, please kindly provide the same name here as well.
-
Once the deployment is complete, go to newly deployed logic app, click on edit. The logic app will open in a designer mode.
-
Click on the
WDATP Trigger, click onAdd new.
- On the next page, choose
AuthenticationasService principal, and provide theClientId,Client SecretandTenantvalues created via Entra ID app registration previously.
- Click on
Alerts - Get single Alertaction, click onChange connectionand select the connection created above.
-
If you would like to filter the Defender alerts based on alert severity or alert status, click on
Parameters, and set theDefenderAlertSeverityandDefenderAlertStatusproperty values accordingly. -
Allowed values for
DefenderAlertSeverityparameter are listed below, kindly note all values are case-sensitive- High
- Medium
- Low
- Informational
- UnSpecified
-
For example, if you want to filter the alert by "Medium" and "High" severity, you need to set the value as ["Medium","High"].
-
Allowed values for
DefenderAlertStatusparameter are listed below, kindly note all values are case-sensitive- New
- InProgress
- Resolved
- Unknown
-
For example, if you want to filter the alert by "New", you need to set the value as ["New"].
- Save the Logic App.
-
Defender for storage will remove any malware uploaded to a Blob storage. If you are using Microsoft Defender for Storage you need to exclude the JoeSandbox storage.
-
Open https://portal.azure.com/ and search
Storage accountsservice.
- Open the storage account, the name starts with
joesecurity. - Go to
Microsoft Defender For Cloud->settings, disable theMicrosoft Defender For Storageand click onsave.
- Logic App
SubmitDefenderAlertsToJoeSandboxruns will fail after 2 minutes. This is a expected behaviour and is not an issue.
- To debug and check logs, follow these steps:
| Version | Release Date | Release Notes |
|---|---|---|
| 1.0.0 | 19-06-2025 |
|





























