Number 5 of the 12 PCI compliance steps in the SAQ D is to “Use and regularly update anti-virus software or programs.” We all know that this *really* isn’t needed – but it’s in the PCI compliance requirements – so here’s an easy way to do it.
Install ClamAV:
sudo apt-get install clamav
And then create a simple bash script that will run clam and send you an email with a summary of the scan:
#! /bin/bash
sudo clamscan -i -r / | sendmail calvinfroedge@gmail.com
The -i flag tells clam you only want to know which files are infected (if any), the -r is to recurse into directories. The pipe then sendmail is to put the output from the clamscan into an email and send it to you.
I’m using SendGrid as my email provider, and it’s easy as hell to integrate with Postfix. Here’s how:
http://docs.sendgrid.com/documentation/get-started/integrate/examples/postfix/
Finally, schedule this to happen each day (or whatever). Put this in your contab (sudo crontab -e):
01 04 * * * /bin/viruscheck
And that’s it! You’ve just fulfilled step 5 of PCI compliance = )

2 Comments
Don’t forget to run freshclam every once in a while as well…
Good point! I suppose this should be set up with it’s own task to ensure clam stays updated. Thanks!