Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Setup and Use ClamAV (anti-virus) with Azure

I want to scan the files that are uploaded to my Azure blob. It looks like ClamAV (www.clamav.net) is probably the way to go. I see instructions on how to install on a Windows server, but what would my procedure be for a site hosted on Azure? I am using ASP.NET MVC.

like image 200
Vince Avatar asked Nov 06 '22 02:11

Vince


1 Answers

Disclaimer: I haven't used ClamAV. Having said that...

You should be able to install it during a startup task (with elevated privileges). I looked at the ClamAV wiki, and it appears that the msi has a silent-install:

msiexec /i clamAV.msi /qr

You'll need to change that last parameter to /qn to force "no user interface."

The challenge will be scanning blobs. You'll need to copy files from their blobs to a local directory in your VM instance, and then run clamdscan on that file (basing off the wiki).

I haven't tried this, but the basic premise should hold up: Install anything requiring an MSI as a startup task (probably needs elevated mode).

like image 178
David Makogon Avatar answered Nov 09 '22 17:11

David Makogon