Take the 2-minute tour ×
Information Security Stack Exchange is a question and answer site for Information security professionals. It's 100% free, no registration required.

How to do a virus scan before post attachments in asp.net application,when they find a virus on to give up post attachments,otherwise proceed to upload.

I wonder if there are any APIs out there where you can send a file for scanning? I mean could we possibly upload, send off to a third party for scanning then receive a response?

share|improve this question

3 Answers 3

My advise is to configure a directory that your AV scans whenever a file appears there.

Save your attachment there, and attempt to read it after it's been saved. If it can't be read after it's been saved there, or if it doesn't exist there anymore, then it is a potential virus that needs to be examined further.

share|improve this answer

You can use the VirusTotal Public API or some similar service - but there are two problems,

  1. The feedback is not immediate so to tell the user that his action was refused, you'd have to let him wait for a while
  2. You'd have to upload the file to 3rd party server, which could be a privacy and bandwidth issue

Another approach is to scan the upload folder and check if file was deleted by antivirus - the feedback won't be instant either.

share|improve this answer
1  
I agree with your analysis. However, I don't think VirusTotal is suitable in this context. One of the restrictions is "it can not be used as a substitute for antivirus products", which sounds like it would prohibit its use here. In addition, there is another restriction worth mentioning: the VirusTotal API is only for free services, not commercial products or services. There are also bandwidth limits which could be an issue. –  D.W. Apr 16 '12 at 19:40

virusade.com is currently in beta testing right now, which is a service to send a file to for scanning. Final pricing has not been determined yet, but it will be suitable for commercial services, vs virustotal which is intended only for personal, non-commercial use.


NOTE:This post is a product promotion by the developer.

share|improve this answer
1  
welcome to Information Security. Please see the FAQ - if you are promoting your own service or product, you must disclose your connection with it. Besides that, can you expand a bit on how this is a solution to the question? –  AviD Oct 18 '12 at 17:02

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.