Latest Version: 1.1.0 - Release Date: 11/12/2025
This project is an integration between Microsoft Defender for Endpoint and VMRay products: FinalVerdict and TotalInsight. The connector collects alerts and related evidences, and query or submit these samples into VMRay Sandbox. It allows the SOC team to better understand the threat behind the alert. It accelerates the triage of alerts by adding comments to the alert in MS Defender Console with the analysis of the sample. It improves protection by extracting IOCs from the different stage of the attack and submiting them as Defender indicators.
- The connector is built using Azure logic app, Azure functions app and Azure Storage.
- Azure Logic app
SubmitDefenderAlertsToVMRaymonitors 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 appVMRayDefender. - Azure function app
VMRayDefenderchecks if the alert contains a file or a URL and checks if the file hash or the URL has already been analyzed by VMRay. - If the hash/URL was already analysed, the system checks the setting VmrayResubmitAfter (default 7 days). if the last submission was older than this value, it resubmits the sample to VMRay. If not it uses results from previous submission.
- For file, Azure function app
VMRayDefenderrequests the file from Microsoft Defender by starting a live response session. For URL, it gets it directly from the alert evidence. - For file, 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(vmray-defender-quarantine-files) container.
- For file, Azure function app
VMRayDefendermonitors the Azure storage(vmray-defender-quarantine-files) container and submits the quarantine file to VMRay. - Azure function app
VMRayDefenderwill wait till the submission of the file or URL is completed. When the VMRay analysis is done VMRay results are sent back to the Azure function appVMRayDefender. - The Azure function app
VMRayDefenderpost the results as a note within the relevant defender alert. - If configured to send IOCs, the Azure function app
VMRayDefenderprovides the IOCs as the indicators to Microsoft Defender that use them for automatically alerting or blocking. - If configured to update Defender Incident tags, it will add a tag with the most severe VMRay alert within the incident, as well as a tag with each threat name identified by VMRay.
- Azure Logic app
Important: This solution can only analyze files quarantined by Defender Antivirus, flagged by Defender EDR or downloaded from a URL (child sample). It cannot access files that were removed or blocked outright.
- Microsoft Defender for Endpoint.
- VMRay Analyzer, VMRay FinalVerdict, VMRay TotalInsight.
- 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. ** Reference: https://learn.microsoft.com/en-us/azure/azure-functions/flex-consumption-how-to?tabs=azure-cli%2Cvs-code-publish&pivots=programming-language-python#view-currently-supported-regions
- 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.
-
In VMRay Console, you must create a Connector API key by following the steps below:
- Create a user dedicated to this API key (to avoid that the API key is deleted if an employee leaves)
- Create a role that allows to "View shared submission, analysis and sample" and "Submit sample, manage own jobs, reanalyse old analyses and regenerate analysis reports".
- Assign this role to the created user
- Login as this user and create an API key by opening Settings > Analysis > API Keys.
- Please save the keys, which will be used in configuring the Azure Function.
Open https://portal.azure.com/ and search
Microsoft Entra IDservice.
Click on
Addand selectApp registration.
Enter the name of application, select supported account types, and click on
Register.
In the application overview you can find
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 for
WindowsDefenderATPand click on search result.
On the next page, select
Application permissionsand check the permissions listed in the table below. Then click onAdd permissions.
| Category | Permission Name | Description |
|---|---|---|
| Alert | Alert.ReadWrite.All | Needed to retrieve and 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.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 |
Follow the same steps as above to provide permission for
Microsoft Graph API
| Category | Permission Name | Description |
|---|---|---|
| SecurityAlert.ReadWrite.All | Alert.ReadWrite.All | Read and write to all security alerts |
| SecurityIncident.ReadWrite.All | Incident.ReadWrite | Read and write to all security incidents |
After setting only the necessary permissions, click the
Grant admin consent forbutton to approve permissions.
We need secrets for programmatic access. Here's how to create them.
- Click
Manage > Certificates & secretstab.- Click
Client secretstab.- Click
New client secretbutton.- Enter description and set expiration date for secret.
Use Secret
ValueandSecret IDto configure connector.
Reference
- Open https://security.microsoft.com
- Go to
Settings>Endpointstab.- Select
Advanced features.- Enable
Live Response,Live Response for ServersandLive Response unsigned script execution.
- Set the remediation actions to "Quarantine: Moves files to quarantine" for all threat levels via Intune (or Group Policy). In Intunes, go to Endpoint security/Antivirus, open the policy, scroll down to Defender policy under configuration, check the remediation settings.
- Check “Disable Local Admin Merge” setting in Intunes Antivirus policy: if set to "Enable Local Admin Merge (Default)", no change is needed. if set to “Disable Local Admin Merge”, add to your global exclusion the path: c:\temp\vmray_quarantined_files
Click on below button to deploy:
Click on below button to deploy:
On the next page, please provide the values accordingly.
| 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 for now. |
| Azure Storage Account Key | Please leave this empty for now. |
| App Insights Workspace Resource ID | Go to Log Analytics workspace > Settings > Properties, Copy Resource ID and paste here. |
| Vmray Base URL | VMRay Base URL, either https://eu.cloud.vmray.com or https://us.cloud.vmray.com |
| Vmray API Key | VMRay API Key |
| Vmray Resubmit After | Resubmit when the previous analysis is older than X days. The value represents the number of days (range 0–100), where 0 means resubmit every time. |
| Vmray API Retry Timeout | Provide maximum time to wait in minutes, when VMRay API is not responding. |
| Vmray API Max Retry | Provide number of retries, when VMRay API is not responding. |
| Vmray Analysis Job Timeout | Provide maximum time to wait in minutes, when VMRay 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. |
| Create Indicators In Defender | If true, Indicators will be created in Microsoft Defender. |
| Indicator Expiration In Days | Please specify the number of days the indicator should remain valid. |
| Add Tags To Incident | If true, VMRay verdict and threat names will be added to incidents tag in Defender console. If you do not triage from the incident view, set it to false. |
| Vmray Sample Verdict | Based on the selection, Indicators will be created in Microsoft Defender. |
| Defender Indicator Action For Malicious IP Address URL | The action that is taken if the indicator is Malicious URL or IP Address discovered in the organization. |
| Defender Indicator Action For Suspicious IP Address URL | The action that is taken if the indicator is Suspicious URL or IP Address discovered in the organization. |
| Defender Indicator Action For Malicious File | The action that is taken if the indicator is Malicious File discovered in the organization. |
| Defender Indicator Action For Suspicious File | The action that is taken if the indicator is Suspicious File discovered in the organization. |
| Defender Indicator Alert | True if the creation of an indicator should generate an alert. False if the creation of an indicator shouldn't generate an alert. |
Once you enter the values, please click on
Review + createbutton.
Open https://portal.azure.com/ and search
Storage accountsservice.
- Open the storage account (name starts with
vmraystorage).- Go to
Security + networking>Access keys.- Copy the
Connection stringand save it temporarily for the next steps.
- Go to
Security + networking>Access keys.- Copy the
Keyand save it temporarily for the next steps.
Open https://portal.azure.com/ and search
Function Appservice.
- Open the VMRay FunctionApp name starts with
vmraydefender.- 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>Confirm.
Go to
Overview, click onRestart.
This playbook is required. The Logic App collects Defender alerts and sends them to the VMRay 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: If you chose a different name when deploying the Function App, please enter that name here.
Once the deployment is complete, go to newly deployed logic app, click on
edit. The logic app will open in a designer mode.
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.
Click on below button to deploy
Note: If you chose a different name when deploying the Function App, please enter that name here.
Enter all the required values.
From the deployment page, click on the
wdatpAPI connection.
Go to
General → Edit API Connection
Click
Authorize, select your account, and then clickSave.
Go to the newly deployed Logic App.
Go to
Workflow → Connections → JSON View
Update the following fields:
subscriptionIdresourceGroupNamelocationfunctionAppNamefunctionKey
Go to your Function App in Azure.
Select
VMRayDefenderNote: If you chose a different name when while deployment, select on that name.
Click on Function Keys and copy the
keyvalue.
Click
Saveafter updating the JSON.
Open the Logic App in Designer mode.
Select the trigger;
Triggers - Trigger when new WDATP alert occurs
Set Authentication:
- Type: Service Principal
- Enter values for
Client IDClient SecretTenant ID
Click on
Get single alertaction:
- Click
Change connection- Select the previously created connection
Scroll to the Function App section at the bottom of the Logic App.
Click
Change connection.
Select
Add new, then choose your Function App.
Click
Saveat the top of the workflow.
- 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 VMRay storage.
- Open https://portal.azure.com/ and search
Storage accountsservice.
- Open the storage account, the name starts with
vmraystorage. - Go to
Microsoft Defender For Cloud>settings, disable theMicrosoft Defender For Storageand click onsave.
Logic App
SubmitDefenderAlertsToVMRayruns will fail after 2 minutes. This is a expected behaviour and is not an issue.
- To debug and check logs after receiving an email, follow these steps:
| Version | Release Date | Release Notes |
|---|---|---|
| 1.1.0 | 11-12-2025 |
|
| 1.0.0 | 26-05-2025 |
|
| 1.0.0-beta.2 | 25-03-2025 |
|
| 1.0.0-beta.1 | 07-02-2025 |
Initial Release |
Please redeploy the Function App, following the instructions given in the document.
Please redeploy the Logic App, following the instructions given in the document.





































