Microsoft Defender for Storage on-upload malware scanning
In brief
The article now clarifies enablement prerequisites and supported configuration methods, adds an overview of upload triggers and scanning stages, and updates links to costs, results, limitations, and privacy information.
What Defender admins need to know
Administrators can use the revised guidance to find setup requirements and operational details; no configuration change is required.
Summaries are generated from the documentation change itself.
Documentation change
The comparison below shows only the changed extract. Use the full-page view for complete context.
On-upload malware scanning
On-upload malware scanning in Microsoft Defender for Storage
On-upload malware scanning in Microsoft Defender for Storage automatically scans blobs when they're uploaded or modified, providing fast detection of malicious content. This cloud-native, SaaS-based solution uses Microsoft Defender Antivirus to perform comprehensive malware scans, ensuring your storage accounts remain secure without the need for extra infrastructure or maintenance.
By integrating on-upload scanning into your storage accounts, you can:
Common use cases for on-upload malware scanning
On-upload malware scanning supports a variety of scenarios, including:
Web applications: Secure user-generated content uploads in web applications such as tax apps, CV upload sites, and receipt uploads.
Content distribution: Protect assets like images and videos shared at scale through content hubs or CDNs (Content Delivery Networks), which can be common malware distribution points.
Compliance requirements: Meet regulatory standards, such as NIST (glossary definition), SWIFT, HIPAA and DORA, by scanning untrusted content, especially for regulated industries.
Third-party integration: Ensure third-party data, such as content from business partners or contractors, is scanned to prevent security risks.
Collaborative platforms: Ensure safe collaboration across teams and organizations by scanning shared content.
Enable on-upload malware scanning
You can enable on-upload malware scanning by using the Azure portal, PowerShell, Infrastructure as Code templates, or the REST API. Before you begin, review the following prerequisites.
Prerequisites
Before you enable on-upload malware scanning, make sure the following prerequisites are met:
Permissions: Owner or Contributor role on the subscription or storage account, or specific roles with the permissions required for Defender for Storage.
Defender for Storage: Must be enabled on the subscription or individual storage accounts.
Microsoft.EventGrid provider: Must be registered in the Azure Subscription.
Using PowerShell
Directly with the REST API
When malware scanning is enabled, an Event Grid System Topic resource is automatically created in the same resource group as the storage account. This Event Grid System Topic resource is used by the malware scanning service to listen to blob upload triggers.
For detailed instructions, see Deploy Microsoft Defender for Storage.
Malware scanning is billed per GB scanned. To provide cost predictability, malware scanning supports setting a cap on the amount of GB scanned in a single month per storage account.
The capping mechanism sets a monthly scanning limit, measured in gigabytes (GB), for each storage account. This monthly scanning limit serves as an effective cost control measure. If a predefined scanning limit is reached for a storage account within a single calendar month, the scanning operation automatically halts. ThisThe scanning halt occurs once the threshold is reached, with up to a 20-GB deviation. Files aren't scanned for malware beyond this point.after the monthly scanning limit is reached. The cap resets at the end of every month at midnight UTC. Updating the cap typically takes up to an hour to take effect.
By default, a limit of 10 TB (10,000 GB) is established if no specific capping mechanism is defined.
How malware scanning works
The following sections explain how on-upload malware scanning is triggered and how the scanning pipeline processes blobs.
On-upload malware scanning flow
On-upload scans are triggered by any operation that results in a BlobCreated or in a BlobRenamed event, as specified in the Azure Blob Storage as an Event Grid source documentation. These operations include:
Scanning process
When a blob upload or modification is detected, the scanning process consists of the following stages:
- Event detection: When a
BlobCreatedor aBlobRenamedevent occurs, the malware scanning service detects the change. - Blob retrieval: The service securely reads the blob content within the same region as your storage account.
- In-memory scanning: The content is scanned in-memory using Microsoft Defender Antivirus with up-to-date malware definitions.
Shared aspects with on-demand scanning
The following sections are applicableapply to both on-demand and on-upload malware scanning.
- Additional costs for malware scanning: Azure Storage read operations, blob indexing, and Event Grid notifications.
- View and consume malware scan results: Methods such as Blob index tags, Defender for Cloud security alerts, Event Grid events, and Log Analytics.
- Malware remediation automation: Automate actions like blocking, deleting, or moving files based on scan results.
- Supported content and limitations for malware scanning: Covers supported file types, sizes, encryption, and region limitations.
- Malware scanning access and data privacy: Details on how the service accesses and processes your data, including privacy considerations.
- Handling false positives and false negatives: Steps for submitting files for review and creating suppression rules.
- Blob scans and impact on IOPS: Learn how scans trigger further read operations and update blob index tags.
Best practices and tips
Use the following best practices to improve protection, cost management, and operational response:
- Set cost control caps for storage accounts, particularly those with high upload traffic, to manage and optimize expenses effectively.
- Use Log Analytics to track scan history for compliance and auditing purposes.
- If your use case requires a malware remediation mechanism, consider using either the built-in soft delete malicious blobs feature or setting up automated remediation (for example, quarantine or deletion actions) using Event Grid and Logic Apps. For detailed setup guidance, see Set up remediation in malware scanning.
Next steps
To learn more about malware scanning in Microsoft Defender for Storage, see the following articles:
@@ -1,14 +1,17 @@ --- title: Microsoft Defender for Storage on-upload malware scanning description: Learn how on-upload malware scanning in Microsoft Defender for Storage provides real-time detection and protection against malicious content.-ms.date: 09/16/2025+ms.date: 07/03/2026 ms.topic: how-to+ms.custom: msecd-doc-authoring-1013 #customer intent: As a security administrator, I want to understand on-upload malware scanning so that I can secure my storage accounts from malicious uploads. ai-usage: ai-assisted --- # On-upload malware scanning +## On-upload malware scanning in Microsoft Defender for Storage+ On-upload malware scanning in Microsoft Defender for Storage automatically scans blobs when they're uploaded or modified, providing fast detection of malicious content. This cloud-native, SaaS-based solution uses Microsoft Defender Antivirus to perform comprehensive malware scans, ensuring your storage accounts remain secure without the need for extra infrastructure or maintenance. By integrating on-upload scanning into your storage accounts, you can:@@ -23,9 +26,11 @@ Malware upload is a top threat for cloud storage, as malicious files can enter a ## Common use cases for on-upload malware scanning +On-upload malware scanning supports a variety of scenarios, including:+ - **Web applications:** Secure user-generated content uploads in web applications such as tax apps, CV upload sites, and receipt uploads. - **Content distribution:** Protect assets like images and videos shared at scale through content hubs or CDNs (Content Delivery Networks), which can be common malware distribution points.-- **Compliance requirements:** Meet regulatory standards, such as [NIST](defender-for-cloud-glossary.md#nist), SWIFT, HIPAA and DORA, by scanning untrusted content, especially for regulated industries.+- **Compliance requirements:** Meet regulatory standards, such as [NIST (glossary definition)](defender-for-cloud-glossary.md#nist), SWIFT, HIPAA and DORA, by scanning untrusted content, especially for regulated industries. - **Third-party integration:** Ensure third-party data, such as content from business partners or contractors, is scanned to prevent security risks. - **Collaborative platforms:** Ensure safe collaboration across teams and organizations by scanning shared content.@@ -37,9 +42,13 @@ Malware upload is a top threat for cloud storage, as malicious files can enter a ## Enable on-upload malware scanning +You can enable on-upload malware scanning by using the Azure portal, PowerShell, Infrastructure as Code templates, or the REST API. Before you begin, review the following prerequisites.+ ### Prerequisites -- **Permissions:** Owner or Contributor role on the subscription or storage account, or specific roles with the [necessary permissions](support-matrix-defender-for-storage.md).+Before you enable on-upload malware scanning, make sure the following prerequisites are met:++- **Permissions:** Owner or Contributor role on the subscription or storage account, or specific roles with the [permissions required for Defender for Storage](support-matrix-defender-for-storage.md). - **Defender for Storage:** Must be enabled on the subscription or individual storage accounts. - **Microsoft.EventGrid provider**: Must be registered in the Azure Subscription.@@ -52,7 +61,7 @@ To [enable and configure malware scanning](tutorial-enable-storage-plan.md) acro - Using [PowerShell](defender-for-storage-powershell-enablement.md) - Directly with the [REST API](defender-for-storage-rest-api-enablement.md?tabs=enable-subscription) -When malware scanning is enabled, an Event Grid System Topic resource is automatically created in the same resource group as the storage account. This is used by the malware scanning service to listen to blob upload triggers.+When malware scanning is enabled, an Event Grid System Topic resource is automatically created in the same resource group as the storage account. This Event Grid System Topic resource is used by the malware scanning service to listen to blob upload triggers. For detailed instructions, see [Deploy Microsoft Defender for Storage](tutorial-enable-storage-plan.md). @@ -60,7 +69,7 @@ For detailed instructions, see [Deploy Microsoft Defender for Storage](tutorial- Malware scanning is billed per GB scanned. To provide cost predictability, malware scanning supports setting a cap on the amount of GB scanned in a single month per storage account. -The [capping mechanism](tutorial-enable-storage-plan.md#setup-and-configuration-options) sets a monthly scanning limit, measured in gigabytes (GB), for each storage account. This serves as an effective cost control measure. If a predefined scanning limit is reached for a storage account within a single calendar month, the scanning operation automatically halts. This halt occurs once the threshold is reached, with up to a 20-GB deviation. Files aren't scanned for malware beyond this point. The cap resets at the end of every month at midnight UTC. Updating the cap typically takes up to an hour to take effect.+The [capping mechanism](tutorial-enable-storage-plan.md#setup-and-configuration-options) sets a monthly scanning limit, measured in gigabytes (GB), for each storage account. This monthly scanning limit serves as an effective cost control measure. If a predefined scanning limit is reached for a storage account within a single calendar month, the scanning operation automatically halts. The scanning halt occurs once the threshold is reached, with up to a 20-GB deviation. Files aren't scanned for malware after the monthly scanning limit is reached. The cap resets at the end of every month at midnight UTC. Updating the cap typically takes up to an hour to take effect. By default, a limit of 10 TB (10,000 GB) is established if no specific capping mechanism is defined. @@ -99,6 +108,8 @@ Filter Types: ## How malware scanning works +The following sections explain how on-upload malware scanning is triggered and how the scanning pipeline processes blobs.+ ### On-upload malware scanning flow On-upload scans are triggered by any operation that results in a `BlobCreated` or in a `BlobRenamed` event, as specified in the [Azure Blob Storage as an Event Grid source](/azure/event-grid/event-schema-blob-storage) documentation. These operations include:@@ -112,6 +123,8 @@ On-upload scans are triggered by any operation that results in a `BlobCreated` o ### Scanning process +When a blob upload or modification is detected, the scanning process consists of the following stages:+ 1. **Event detection:** When a `BlobCreated` or a `BlobRenamed` event occurs, the malware scanning service detects the change. 1. **Blob retrieval:** The service securely reads the blob content within the same region as your storage account. 1. **In-memory scanning:** The content is scanned in-memory using Microsoft Defender Antivirus with up-to-date malware definitions.@@ -126,13 +139,13 @@ On-upload malware scanning has specific throughput and capacity limits to ensure ### Shared aspects with on-demand scanning -The following sections are applicable to both [on-demand](on-demand-malware-scanning.md) and on-upload malware scanning.+The following sections apply to both [on-demand](on-demand-malware-scanning.md) and on-upload malware scanning. -- [Additional costs](introduction-malware-scanning.md#additional-costs): Azure Storage read operations, blob indexing, and Event Grid notifications.-- [Viewing and consuming scan results](introduction-malware-scanning.md#malware-scan-results): Methods such as Blob index tags, Defender for Cloud security alerts, Event Grid events, and Log Analytics.+- [Additional costs for malware scanning](introduction-malware-scanning.md#additional-costs): Azure Storage read operations, blob indexing, and Event Grid notifications.+- [View and consume malware scan results](introduction-malware-scanning.md#malware-scan-results): Methods such as Blob index tags, Defender for Cloud security alerts, Event Grid events, and Log Analytics. - [Malware remediation automation](introduction-malware-scanning.md#automated-malware-remediation): Automate actions like blocking, deleting, or moving files based on scan results.-- [Supported content and limitations](introduction-malware-scanning.md#supported-content-and-limitations): Covers supported file types, sizes, encryption, and region limitations.-- [Access and data privacy](introduction-malware-scanning.md#access-and-data-privacy): Details on how the service accesses and processes your data, including privacy considerations.+- [Supported content and limitations for malware scanning](introduction-malware-scanning.md#supported-content-and-limitations): Covers supported file types, sizes, encryption, and region limitations.+- [Malware scanning access and data privacy](introduction-malware-scanning.md#access-and-data-privacy): Details on how the service accesses and processes your data, including privacy considerations. - [Handling false positives and false negatives](introduction-malware-scanning.md#handle-false-positives-and-false-negatives): Steps for submitting files for review and creating suppression rules. - [Blob scans and impact on IOPS](introduction-malware-scanning.md#blob-scans-and-impact-on-iops): Learn how scans trigger further read operations and update blob index tags. @@ -140,6 +153,8 @@ For detailed information on these topics, see the [Introduction to malware scann ## Best practices and tips +Use the following best practices to improve protection, cost management, and operational response:+ - Set cost control caps for storage accounts, particularly those with high upload traffic, to manage and optimize expenses effectively. - Use Log Analytics to track scan history for compliance and auditing purposes. - If your use case requires a malware remediation mechanism, consider using either the built-in soft delete malicious blobs feature or setting up automated remediation (for example, quarantine or deletion actions) using Event Grid and Logic Apps. For detailed setup guidance, see [Set up remediation in malware scanning](defender-for-storage-configure-malware-scan.md).@@ -149,6 +164,8 @@ For detailed information on these topics, see the [Introduction to malware scann ## Next steps +To learn more about malware scanning in Microsoft Defender for Storage, see the following articles:+ - [Introduction to malware scanning](introduction-malware-scanning.md) - [On-demand malware scanning](on-demand-malware-scanning.md) 