Stappenplan ClamAV
1. Installeer ClamAV via IPKG (ipkg install clamav) (duurt wel even...)
DiskStation> ipkg install clamav
Installing clamav (0.96-1) to root...
Downloading http://ipkg.nslu2-linux.org/feeds/optware/syno-e500/cross/unstable/clamav_0.96-1_powerpc.ipk
Configuring clamav
Configuring diffutils
update-alternatives: Linking //opt/bin/cmp to /opt/bin/diffutils-cmp
update-alternatives: Linking //opt/bin/diff to /opt/bin/diffutils-diff
update-alternatives: Linking //opt/bin/diff3 to /opt/bin/diffutils-diff3
update-alternatives: Linking //opt/bin/sdiff to /opt/bin/diffutils-sdiff
Successfully terminated.
2. Bezoek de ClamAV Website en download de handleiding
3. Start freshclam. Hiermee haal je de laatste versie van de database op.
DiskStation> freshclam
ClamAV update process started at Thu Nov 25 21:15:30 2010
Downloading main-53.cdiff [100%]
main.cld updated (version: 53, sigs: 846214, f-level: 53, builder: sven)
WARNING: Your ClamAV installation is OUTDATED!
WARNING: Current functionality level = 51, recommended = 53
DON'T PANIC! Read http://www.clamav.net/support/faq
WARNING: getfile: daily-10678.cdiff not found on remote server (IP: 217.19.16.188)
WARNING: getpatch: Can't download daily-10678.cdiff from database.clamav.net
Trying host database.clamav.net (80.69.69.11)...
WARNING: getfile: daily-10678.cdiff not found on remote server (IP: 80.69.69.11)
WARNING: getpatch: Can't download daily-10678.cdiff from database.clamav.net
Trying host database.clamav.net (81.26.223.45)...
WARNING: getfile: daily-10678.cdiff not found on remote server (IP: 81.26.223.45)
WARNING: getpatch: Can't download daily-10678.cdiff from database.clamav.net
WARNING: Incremental update failed, trying to download daily.cvd
Downloading daily.cvd [100%]
daily.cvd updated (version: 12319, sigs: 6685, f-level: 54, builder: ccordes)
WARNING: Your ClamAV installation is OUTDATED!
WARNING: Current functionality level = 51, recommended = 54
DON'T PANIC! Read http://www.clamav.net/support/faq
bytecode.cvd is up to date (version: 93, sigs: 16, f-level: 54, builder: edwin)
WARNING: Current functionality level = 51, recommended = 54
Please check if ClamAV tools are linked against the proper version of libclamav
DON'T PANIC! Read http://www.clamav.net/support/faq
Database updated (852915 signatures) from database.clamav.net (IP: 217.19.16.188)
4. Er komen wat meldingen voorbij die aangeven dat het niet de laatste versie is... Desondanks werkt e.e.a. wel
5. Met clamscan kun je vervolgens een scan uitvoeren:
DiskStation> clamscan
LibClamAV Warning: ***********************************************************
LibClamAV Warning: *** This version of the ClamAV engine is outdated. ***
LibClamAV Warning: *** DON'T PANIC! Read http://www.clamav.net/support/faq ***
LibClamAV Warning: ***********************************************************
LibClamAV Warning: ***********************************************************
LibClamAV Warning: *** This version of the ClamAV engine is outdated. ***
LibClamAV Warning: *** DON'T PANIC! Read http://www.clamav.net/support/faq ***
LibClamAV Warning: ***********************************************************
LibClamAV Warning: ***********************************************************
LibClamAV Warning: *** This version of the ClamAV engine is outdated. ***
LibClamAV Warning: *** DON'T PANIC! Read http://www.clamav.net/support/faq ***
LibClamAV Warning: ***********************************************************
/.upgrade_vol: OK
/.mkcert.serial: OK
/.rnd: OK
----------- SCAN SUMMARY -----------
Known viruses: 851690
Engine version: 0.96
Scanned directories: 1
Scanned files: 3
Infected files: 0
Data scanned: 0.00 MB
Data read: 0.00 MB (ratio 0.00:1)
Time: 18.365 sec (0 m 18 s)
DiskStation>
6. Je kunt een script bestand aanmaken om clamscan in bepaalde directories te laten scannen:
#!/bin/sh
INFECT_DIR="/volume1/public/infected"
LOG_DIR="/var/log/clamav"
LOG_FILE="/var/log/clamav/scan.log"
if [ ! -d "$LOG_DIR" ]; then
mkdir "$LOG_DIR"
fi
if [ ! -d "$INFECT_DIR" ]; then
mkdir "$INFECT_DIR"
fi
if [ ! -f "$LOG_FILE" ]; then
touch "$LOG_FILE"
chmod 644 "$LOG_FILE"
chown admin.users "$LOG_FILE"
fi
/opt/bin/clamscan -r /tmp --quiet --log="$LOG_FILE" --verbose --move="$INFECT_DIR"
In dit voorbeeld zal clamscan scannen in de directory /tmp en dit loggen naar /var/log/clamav/scan.log. Eventuele besmette bestanden worden in de directory /volume1/public/infected geplaatst
Je kunt natuurlijk zelf de diverse parameters aanpassen
Meerdere directories scan je door in de laatste regel in plaats van alleen /tmp bijvoorbeeld op te nemen: /tmp /root /volume1
Dan worden die drie directories gescand.
Dit kun je middels cron schedulen
Evenzo kun je het updaten van de database (raadzaam!) schedulen
Laat maar eens weten wat jullie ervaringen er mee zijn
Wizjos