Antivirus for file uploads in Azure Blob Storage

hampton123 1,175 Reputation points
2024-01-29T15:33:57.57+00:00

I have an API that uses Azure Functions, and consumers use it to upload and download files from our Azure Storage account. I want to be able to block any malicious uploads to our storage account, and I was thinking that enabling Microsoft Defender for Storage on the storage account would be the way to go. I do not want viruses or malicious software to be uploaded. Would this be okay to check for malicious uploads, or should I incorporate a SDK into my Azure Function on top of Microsoft Defender to check for viruses?

Azure Storage
Azure Storage
Globally unique resources that provide access to data management services and serve as the parent namespace for the services.
3,530 questions
Azure Blob Storage
Azure Blob Storage
An Azure service that stores unstructured data in the cloud as blobs.
3,192 questions
Microsoft Security | Microsoft Defender | Microsoft Defender for Cloud
{count} votes

2 answers

Sort by: Most helpful
  1. Saravanan Ganesan 1,830 Reputation points MVP
    2024-01-29T17:27:51.8266667+00:00

    Hi Hampton ,

    Enabling Microsoft Defender for Storage on your Azure Storage account is a solid step to enhance security. It provides advanced threat protection by analyzing the content being uploaded. However, for additional security, you may consider incorporating an SDK within your Azure Function. This allows you to implement custom checks or validations specific to your application's requirements. Combining Microsoft Defender for Storage with an SDK can create a multi-layered defense, offering more comprehensive protection against malicious uploads, including viruses and other potential threats. Always stay updated on security best practices and leverage available tools to ensure a robust defense mechanism. Regards , Saravanan Ganesan


  2. Anand Prakash Yadav 7,855 Reputation points Microsoft External Staff
    2024-02-02T12:24:10.1633333+00:00

    Hello hampton123,

    Thank you for posting your query here!

    To scan files for viruses before uploading them to Azure Blob Storage, you may consider Microsoft Defender Antivirus: Microsoft provides APIs for integrating Microsoft Defender Antivirus with your applications. You can find more information on Microsoft's documentation. https://learn.microsoft.com/en-us/azure/defender-for-cloud/defender-for-storage-malware-scan

    Or else you would typically need to integrate with a third-party antivirus solution or develop your own scanning mechanism. There are various antivirus software vendors that offer APIs or SDKs that you can use to perform real-time scanning of files for viruses. Some popular antivirus solutions that offer APIs include:

    Symantec Endpoint Protection: Symantec offers APIs and SDKs for integrating their antivirus solutions into applications.

    McAfee VirusScan: McAfee provides APIs for integrating their virus scanning capabilities.

    ClamAV: ClamAV is an open-source antivirus engine that you can integrate into your application for scanning files for viruses.

    Before implementing any antivirus solution, make sure to thoroughly review the documentation and understand how to use the API or SDK effectively.

    Doc which can help you: https://docs.microsoft.com/en-us/azure/storage/blobs/

    https://azure.microsoft.com/en-us/services/security-center/

    However, please note that for now there is no Azure SDK specifically available in Azure Functions service.

    Similar post: https://learn.microsoft.com/en-us/answers/questions/99942/virus-scanning-on-uploaded-file-to-azure-block-sto?page=1#answers

    Do let us know if you have any further queries. I’m happy to assist you further.

    Please do not forget to "Accept the answer” and “up-vote” wherever the information provided helps you, this can be beneficial to other community members.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.