Forensicsantivirusvirus-scanningdaemonfreshclammalware-detection

ClamAV

Clam AntiVirus is an open-source anti-virus toolkit for Unix providing command-line scanning, multi-threaded daemon, and automatic virus database updates. It supports scanning files, emails, archives, executables, and documents for malware.

Description

ClamAV is designed primarily for integration with mail servers to scan attachments for viruses. The main package offers a command-line scanner (clamscan), while clamav-daemon provides a scalable multi-threaded daemon for fast scanning, including on-access and remote capabilities. Additional tools like freshclam automate virus database updates from the internet, or clamav-data for offline use.

Key features include support for numerous archive formats (Zip, Tar, Gzip, etc.), mail formats, ELF/PE executables (including compressed/obfuscated), and document types like Microsoft Office, PDF, HTML, and RTF. It relies on libclamav for core scanning functionality, which other software can also use.

Use cases involve malware detection in emails, filesystems, and networks, especially in server environments. Tools like clamdscan client remote scanning via daemon, clamonacc for on-access scanning, and clamsubmit for reporting false positives/negatives enhance its utility.

How It Works

ClamAV uses libclamav library for signature-based detection, loading virus databases updated via freshclam. The clamscan tool performs on-demand multi-threaded scans supporting archives, emails, executables, and documents. The clamd daemon handles concurrent scans with on-access (via clamonacc), remote access over TCP/Unix sockets, and integration with MTAs via clamav-milter. Bytecode signatures enable advanced detection, with clambc for testing. Limits on scan time, file sizes, recursion prevent resource exhaustion.

Installation

bash
sudo apt install clamav

Flags

--help -hShow this help
--version -VShow version
--verbose -vBe verbose
--database=FILE/DIR -d FILE/DIRLoad virus database from FILE or load all supported db files from DIR
--max-filesize=#nFiles larger than this will be skipped and assumed clean
--config-file=FILE -c FILERead configuration from FILE
--daemon -dRun in daemon mode
--foreground -FRun in foreground; do not daemonize

Examples

Display help for bytecode analysis tool
clambc -h
Display help for command-line scanner
clamscan -h
Display help for file submission utility
clamsubmit -h
Display help for signature management tool
sigtool -h
Display help for configuration utility
clamconf -h
Display help for anti-virus daemon
clamd -h
Display help for virus database updater
freshclam -h
Display help for daemon client scanner
clamdscan -h
Updated 2026-04-16kali.org ↗