Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Any ideas about how to check Azure's blob storage for viruses?

Our application stores files uploaded from our customers to blob storage. These files are exchanged between different parties (our customers and their suppliers). Is there a way to check the uploaded files for viruses? The Antimalware service seems to just check virtual machines, but I cannot get any information about using it to check files as a service.

A great solution would be if we could store such a file in Azure Storage as an "on hold" file till it is checked. Then we would need a service to check this file and returns the result. If the file is virus-free we could then move it to the final destination.

like image 492
Raul Avatar asked Jan 19 '17 11:01

Raul


People also ask

Does Azure scan for viruses?

Microsoft Antimalware for Azure is a free real-time protection that helps identify and remove viruses, spyware, and other malicious software.

How do I check Azure blob storage?

View a blob container's contentsOpen Storage Explorer. In the left pane, expand the storage account containing the blob container you wish to view. Expand the storage account's Blob Containers. Right-click the blob container you wish to view, and - from the context menu - select Open Blob Container Editor.


4 Answers

Azure Storage is just... storage. There are no utilities built in, such as antivirus. You'd need to do your antivirus check on your own. Since antivirus tools typically only work with local OS storage, you'd need to place your "on hold" content (as you referred to it) on a local disk somewhere that you have antivirus installed and then copy to blob storage once your antivirus check is done.

How you accomplish managing this, and which software you use, is up to you. But VMs, App Services, and Cloud Services (web/worker roles) all have local disks available.

like image 62
David Makogon Avatar answered Sep 23 '22 02:09

David Makogon


As the other answer states Azure Storage is just storage. There are a couple of ways you could do this though,

The first solution would be to run your own anti-virus and use this either as a gateway or programatically download the file from the Blob storage, check the file and then take the appropriate action. It's possible to run something like ClamAV to do this yourself.

Alternatively you could use a third party service like AttachmentScanner (which is exactly what you mention in your comment) which will accept a URL or a direct file upload. With Azure you can generate a temporary url pointing to the file with an expiration of a few minutes, pass the URL to AttachmentScanner and then take the appropriate action depending on the result.

like image 29
Steve Smith Avatar answered Sep 22 '22 02:09

Steve Smith


I read an article about virus scanning for blob storage. Might be useful for you. This guy is using an azure function trigger for the blob to catch the changes and sending the blob file to a virus scanner. The virus scanner is running in a docker container. Full implementation details are available in the link below

https://peterrombouts.nl/2019/04/15/scanning-blob-storage-for-viruses-with-azure-functions-and-docker/

like image 1
CodeBuggy Avatar answered Sep 23 '22 02:09

CodeBuggy


You can use Azure Defender for Storage to detect following:

  • Suspicious access patterns - such as successful access from a Tor exit node or from an IP considered suspicious by Microsoft Threat Intelligence
  • Suspicious activities - such as anomalous data extraction or unusual change of access permissions
  • Upload of malicious content - such as potential malware files (based on hash reputation analysis) or hosting of phishing content

And to enable it you need to go to Advanced security: enter image description here

like image 1
Krzysztof Madej Avatar answered Sep 21 '22 02:09

Krzysztof Madej