Java and .NET components, FTP, TELNET, SMTP, POP3, IMAP, HTTP, SSH
Home Search Knowledge Base Support

Support

Click here for access to live sales support.

For technical support please submit a ticket to the Help Desk.

 

Java and .NET Help

iTunes Gift Card Offer

For a limited time get a $50.00 iTunes gift card free with qualifying purchase.

Click for details.


News

JSCAPE Secure FTP Server 7.0 Released
08/20/2010 03:31 AM

JSCAPE launches Employee Giving Program
07/03/2010 08:26 AM

SSH Factory 3.6 Released
07/03/2010 06:22 AM

Secure iNet Factory 8.5 Released
07/03/2010 06:07 AM

Secure FTP Factory 8.5 Released
07/03/2010 06:03 AM

Secure FTP Applet 6.2 Released
06/10/2010 02:23 PM

more...


Tutorials

Enabling Phone Authentication
04/08/2009 11:24 AM

Detecting and Handling Brute Force Password Attacks
01/29/2009 09:44 AM

Creating a Domain
12/15/2008 11:33 AM

Public key authentication with SFTP
10/02/2008 07:59 AM

Formatting MimeMessages using .NET
09/14/2008 04:31 PM

Communicating with an IMAP4 server in .NET
09/14/2008 03:54 PM

more...


Articles

Open up corporate data to your partners
08/03/2010 10:01 PM

Access vital corporate documents on the go
07/01/2010 02:15 PM

SFTP and Encryption
05/17/2010 09:52 PM

Streamlining web uploads with ZIP archives
12/14/2009 10:11 AM

Using regular expressions in complex trigger conditions
09/08/2009 07:42 AM

Using custom forms to automate business processes
07/03/2009 08:51 AM

more...


Feedback

Request a feature or component

Request a Java or .NET component


 

JSCAPE Secure FTP Server - Automatic Virus Scanning using ClamAV

Overview

If you are like most organizations then your FTP server accepts file uploads from both internal users (employees) and external users (customers and business partners). In addition to ensuring that data is transmitted securely via encryption protocols such as FTPS and/or PGP, you should also take measures to verify that the data received does not contain a virus or trojan.

The purpose of this tutorial is to demonstrate how you can automatically perform virus scans whenever a file is uploaded to your server. This tutorial focuses specifically on using the open-source ClamAV virus scanning software in a Linux environment. ClamAV is also available for Windows however you may use any anti-virus scanning software that can be invoked from the command line.

Prerequisites

Download and install JSCAPE Secure FTP Server

Download and install ClamAV

Updating virus definition files

Like most anti-virus software ClamAV uses a database of virus definition signatures to detect viruses. In order to maximize virus protection it is recommended that these definition files be updated frequently and automatically. The virus definition signatures for ClamAV may be easily updated using the freshclam command. However, to have these signatures updated automatically we will need to create a trigger. This trigger will invoke the freshclam command every 24 hours at 1 a.m.

1. Open JSCAPE Secure FTP Server Manager and click on the Triggers node.

2. Click the "Add" button to begin adding a new trigger.

3. In the "Name" field enter "Clamav Virus Definition Update" and in the "Event Type" field select the "Current Time" option. Click "Next" to continue.

ftp server virus scanning

4. Set the condition to "Hour EQUALS 1 AND Minute Equals 0". Click "Next" to continue.

ftp server virus scanning

5. Select the "Action Type" of "Run Process" and set the "Program" field to the full path of the freshclam binary. Click "OK" to continue.

ftp server virus scanning

Scanning uploaded files for viruses

Now that we have added the trigger for automatically updating the virus definitions, our next step is to add a trigger that will automatically scan files for viruses when they are uploaded.

1. In Triggers node of JSCAPE Secure FTP Server click the "Add" button to begin adding a new trigger.

2. Enter "Clamav Virus Scan" in the "Name" field and "File Upload" in the "Event Type" field. Click "Next" to continue.

2. Set the condition to "Success EQUALS true". Click "Next" to continue.

3. Set the "Action Type" field to "Run Process", the "Program" field to the full path of the clamscan binary, and the "Arguments" field to the arguments to pass to the clamscan binary. The --move=/opt/JSCAPE_Secure_FTP_Server/users/infected argument specifies the directory that infected files should be moved to. The %LocalPath% variable represents the uploaded file to be scanned.

Receiving notification on quarantined files

To be notified when an infected file is detected we will use a Directory Monitor combined with a Trigger.

1. In Directory Monitors node of JSCAPE Secure FTP Server Manager click on the "Add" button to begin adding a new monitor.

2. In "Name" field enter "Infected Files" and in "Directory" field enter the directory that infected files are moved to that are detected by ClamAV.

3. Check the "Monitor file add" button to only monitor files that are added to this directory.

4. Click "OK" to add the monitor.

5. Next we need to add a trigger to notify us via email when a new file is added to the infected directory. Go to the Triggers node in JSCAPE Secure FTP Server Manager and click on the "Add" button.

6. In the "Name" field enter "Clamav Virus Quarantined". For the "Event Type" field select "Directory Monitor File Added". Click "Next" to continue.

7. Set the Condition to "Monitor EQUALS Infected Files". Click "Next" to continue.

8. In the "Action Type" field select "Send Email". Complete the necessary fields for your SMTP server and email message. Click "OK" to finish.

9. At this point you should have 3 triggers and a directory monitor. Click "Apply" to save settings and begging detecting infected files.

Summary

In this tutorial you learned how to detect, quarantine and send an email notification for any virus infected files uploaded to the server using triggers. JSCAPE Secure FTP Server is ideal for automating virtually any file transfer business processes. To experience more Download JSCAPE Secure FTP Server .