Would like to hear your suggestion to implement anti-virus Java API to scan uploaded document/files before storing them into database.
I'm not sure if it is really an option, but just in case it makes sense.
If you write your uploaded file to disk before storing it into database, you can use the 'corporative' command line antivirus tool or any other of your choice.
I can't answer to the "good" part of the question, but I did find this thread from a few years ago. A couple of tools mentioned there are Metascan and OpenAntivirus which might at least get you started.
Also, according to this, Postini uses Authentium which does offer an SDK. That might be worth looking at.
I haven't tried any of these products and I can't vouch for them. I'm just sharing what I found.
And, of course, command-line access is available for most (all?) major AV products.
Check this out, I believe it can be changed to in-stream-scan easily:
Java API to Detect Virus Using ClamAV Antivirus
http://nsinfra.blogspot.ca/2011/06/java-api-to-detect-virus-using-clamav.html
ClamAV is an open source (GPL) antivirus engine designed for detecting Trojans, viruses, malware and other malicious threats. It provides a high performance mutli-threaded scanning daemon, command line utilities for on demand file scanning, and an intelligent tool for automatic signature updates.
The source code of Clam AV is written in C.
For more detail about ClamAV refer: www.clamav.net
This post describes the approach of scanning files to detect trojans, viruses, malware and other malicious threats using java APIs.
There is a toolkit company in San Francisco called OPSWAT which offers their file multiscanning product (Metascan) in 3 packages. They offer one month free trial and support. I set up a pilot program and tested their application which was impressive. You can select from a laundry list of sample codes such as ASP.NET and PHP. A live demo of their product is at www.filterbit.com. Their page is here.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With