Virus Scanning Protection

The Enterprise File Fabric prevents the downloading and sharing of malicious files through a ‘scan on write’ approach. As files are uploaded they are scanned. If a virus is detected, the upload fails, and an error is returned immediately to the user or application.

The audit log (for add/update) captures successful and unsuccessful scans and uploads:

File solution-brief.pdf uploaded to My Cloud files/mybucket. Scanned with antivirus ClamAV 0.99.2/24143/

ClamAV is the officially supported virus scanner available for use with the File Fabric. ClamAV is a high performance multi-threaded daemon supporting many file formats including file and archive unpacking.

In High Availability environments each appliance serving web traffic will be required to run a local ClamAV service . Files added outside of the File Fabric, directly to the external storage and discovered through provider synchronization, are not scanned.

Service Configuration

ClamAV must first be enabled and configured on each web node.

1. Start and Enable ClamAV

SSH to the appliance as user smeconfiguser, then become root

su -

Use systemctl to start and enable ClamAV (that is, will startup on boot):

# systemctl enable clamd@scan
# systemctl start clamd@scan

Next verify that it is running and enabled:

# systemctl status clamd@scan
Loaded: loaded (/usr/lib/systemd/system/clamd@scan.server; enabled;... 
Active: active (running)

2. Verify Appliance Integration with ClamAV

The appliance configuration file can be found at:

/var/www/smestorage/public_html/config.inc.php

Verify that the settings below are configured as shown:

var $enableantivirus = 1;
var $clamavsocketpath = '/var/run/clamd.scan/clamd.sock';

Enabling ClamAV for Organizations

The virus scanning of uploads is a configuration option for organizations. The option is available when added to the user package.

1. Adding the ClamAV Option to a User Package

To make the ClamAV available as a configuration option for an organization tenant the feature must be added as an 'Extra option' in the User Package.

To make this change, login as the Appliance Administrator (appladmin). From the Main menu (the hamburger icon top right) select 'User Packages’. For the package you want to change select Edit (the pencil icon). Once you’ve selected 'ClamAV Antivirus Integration' choose Save.

2. Enabling Antivirus Scanning

An Organization Administrator can enable virus scanning for uploads under Organization > Policies > Security:

Troubleshooting

Checking ClamAV Service Logs

Once started the ClamAV service will generate log data.

To verify ClamAV has been running successfully check the last entries in the log:

$ tail /var/log/freshclam.log
...
Fri Feb 2 00:34:21 2018 -> SelfCheck: Database status OK

Configuration

ClamAV configuration settings can be found at:

/etc/clamd.d/scan.conf

Checking Virus Signatures are Fresh

The Freshclam application updates the antivirus signature database. It is preinstalled on the appliance and by default is scheduled to run once an hour.

To verify Freshclam has been running successfully check the last entries in the log:

tail /var/log/freshclam.log

To verify the connection to the online database (and update definitions) run as root:

freshclam

By default virus definitions are updated once an hour (see /etc/crontab).

47  *  *   *    * root /usr/bin/freshclam --quiet

Configuration

Freshclam can be configured through the file:

/var/www/smestorage/config/clamd/freshclam.conf

Error: Socket Operation Failed

If the ClamAV service is not running when the user uploads a file the user may see the following message:

Socket operation failed: No such file or directory (SOCKET_ENOENT)

Checking Virus Scans

Verify scans are operational through the audit trail. The policy “Audit File add/update” must be enabled by an administrator under Policies > Security > Audit > Events.

File solution-brief.pdf uploaded to My Cloud files/mybucket. Scanned with antivirus ClamAV 0.99.2/24143/

For a positive match the log looks like:

EICAR-testfile.txt failed to upload to myprovider/mybucket/myfolder . Antivirus ClamAV detected Eicar-Test-Signature(44d88612fea8a8f36de82e1278abb02f:68) infection. ClamAV version ClamAV 0.99.2/24211/

For a test virus file see https://en.wikipedia.org/wiki/EICAR_test_file.