locked
Virus Scanning functionality in Azure Storage RRS feed

  • Question

  • Hello Experts,

    I am working on a Project devloped in ASP.NET MVC2 and hosted environment is WindowsAzure.

    In this project i have a functionality to upload documents,images to Azure blob.

    I need a security check against potential Virus threat before upload of the Document take place.

    I get some information from below link , but it is not a real time approach,

    http://stackoverflow.com/questions/5121337/setup-and-use-clamav-anti-virus-with-azure

    Please revert if anybody has idea of this or any better suggetion. on this.

    Thanks

    bharat

    Tuesday, January 24, 2012 9:28 AM

Answers

  • Hi,

    Looks like the StackOverflow thread has already pointed out how to install a virus scan product using startup tasks. The next task is, does your virus scan product expose API or at least a command line interface that allows you to programmatically (or use a command) to scan a particular file? If it does, then you can save the file to your server’s local disk, invoke its API, or use Process.Start to start the virus scanning process. After it’s done, upload the file to blob.

    If there’s no API/command line exposed, I am not sure whether there is a very good solution. But I think all virus scanning products should be able to monitor disk change, so the moment you save the file to your server’s disk, the AV process will start to scan it. You can estimate how long does it take to scan the file (depends on its size). Then your web/worker role process waits for a particular amount of time, after which you assume the scan have been finished. Finally you can upload the file to blob.

     

    Best Regards,

    Ming Xu.


    Please mark the replies as answers if they help or unmark if not.
    If you have any feedback about my replies, please contact msdnmg@microsoft.com.
    Microsoft One Code Framework
    Wednesday, January 25, 2012 7:27 AM

All replies

  • Hi Bharat - thanks for the good question.

    Can you clarify the workflow?  Do users upload the documents/images directly to blob storage, or do you have a web role in the middle?  At what point does the virus check need to occur?


    -Jeff
    Wednesday, January 25, 2012 12:20 AM
  • Thanks for the update, Yes I have web role in between. The virus checking should be after User uploads doc from website.

    from Architecture stand point

    WebRole --> Upload Doc  <-- Virus Checking before visible to User (may be through Worker Role or inline function of WebRole)

    I hope it clears to you

    Bharat

    Wednesday, January 25, 2012 4:25 AM
  • Hi,

    Looks like the StackOverflow thread has already pointed out how to install a virus scan product using startup tasks. The next task is, does your virus scan product expose API or at least a command line interface that allows you to programmatically (or use a command) to scan a particular file? If it does, then you can save the file to your server’s local disk, invoke its API, or use Process.Start to start the virus scanning process. After it’s done, upload the file to blob.

    If there’s no API/command line exposed, I am not sure whether there is a very good solution. But I think all virus scanning products should be able to monitor disk change, so the moment you save the file to your server’s disk, the AV process will start to scan it. You can estimate how long does it take to scan the file (depends on its size). Then your web/worker role process waits for a particular amount of time, after which you assume the scan have been finished. Finally you can upload the file to blob.

     

    Best Regards,

    Ming Xu.


    Please mark the replies as answers if they help or unmark if not.
    If you have any feedback about my replies, please contact msdnmg@microsoft.com.
    Microsoft One Code Framework
    Wednesday, January 25, 2012 7:27 AM
  • Hi,

    I will mark the reply as an answer. If you find it no help, please feel free to unmark it and follow up.

    Thanks.

     

    Best Regards,

    Ming Xu.


    Please mark the replies as answers if they help or unmark if not.
    If you have any feedback about my replies, please contact msdnmg@microsoft.com.
    Microsoft One Code Framework
    Tuesday, January 31, 2012 3:29 PM