ClamAV: Unterschied zwischen den Versionen

Aus Foxwiki
Keine Bearbeitungszusammenfassung
Keine Bearbeitungszusammenfassung
Zeile 1: Zeile 1:
ClamAV® — Is an open source antivirus engine for detecting trojans, viruses, malware & other malicious threats.
ClamAV is an open source antivirus engine for detecting trojans, viruses, malware & other malicious threats.


==Installation==
==Installation==
ClamAV can be installed by issuing the following command in the terminal:
ClamAV can be installed by issuing the following command in the terminal
  # apt-get install clamav clamav-daemon
  # apt-get install clamav clamav-daemon
Note
Note
Zeile 9: Zeile 9:
* ClamAV needs to have up to date virus signatures to work effectively.
* ClamAV needs to have up to date virus signatures to work effectively.
* To configure your ClamAV install change the line '?DatabaseMirror db.local.clamav.net' - the 'local' needs to be changed to your country code.
* To configure your ClamAV install change the line '?DatabaseMirror db.local.clamav.net' - the 'local' needs to be changed to your country code.
==Viren suchen==
Um nach Viren zu suchen, öffnet man die Konsole und gibt den Befehl ein :
clamscan
Man kann auch Schalter hinzufügen:
"-i" --> zeigt nur infizierte Dateien an (und nicht alle gescannten)
"-r" --> Scannt alle Unterverzeichnisse rekursiv
"--remove" --> entfernt infizierte Dateien (Achtung!Nicht leichtfertig benutzen!)
"-h" --> zeigt alle Optionen von clamscan an
"--move=VERZEICHNIS" --> Verschiebt alle infizierten Dateien in das Verzeichnis VERZEICHNIS.


==Scanning for viruses==
==Scanning for viruses==
Zeile 27: Zeile 17:
Note: If you would like ClamAV to remove the infected files add the --remove option.
Note: If you would like ClamAV to remove the infected files add the --remove option.


By default ClamAV will not scan files larger than 20Mb. In order to override that setting the options --max-filesize=2000M --max-scansize=2000M must be appended to the command. Where the size 2000M may be replaced as necessary by the user. An example is provided bellow.
==Optionen==
"-i" --> zeigt nur infizierte Dateien an (und nicht alle gescannten)
"-r" --> Scannt alle Unterverzeichnisse rekursiv
"--remove" --> entfernt infizierte Dateien (Achtung!Nicht leichtfertig benutzen!)
"-h" --> zeigt alle Optionen von clamscan an
"--move=VERZEICHNIS" --> Verschiebt alle infizierten Dateien in das Verzeichnis VERZEICHNIS.
 
* By default ClamAV will not scan files larger than 20Mb.  
* In order to override that setting the options --max-filesize=2000M --max-scansize=2000M must be appended to the command.  
* Where the size 2000M may be replaced as necessary by the user.  
An example is provided bellow.
  $ clamscan --max-filesize=2000M --max-scansize=2000M --recursive=yes --infected /home
  $ clamscan --max-filesize=2000M --max-scansize=2000M --recursive=yes --infected /home
Note: Making ClamAV fully scan each and every file in your home folder may take up a lot of time (2+ hours) depending on the amount of files in your homer folder.
Note
* Making ClamAV fully scan each and every file in your home folder may take up a lot of time (2+ hours) depending on the amount of files in your homer folder.


==Quarantäne==
==Quarantäne==
Zeile 36: Zeile 37:


==Grafische Benutzeroberfläche==
==Grafische Benutzeroberfläche==
Mit ClamTK steht sogar eine Grafische Benutzeroberfläche zu verfügung.
* Mit ClamTK steht sogar eine Grafische Benutzeroberfläche zu Verfügung.
Diese wird mit "apt install clamtk" installiert
===Installation===
apt install clamtk


[[Bild:Screenshot clamtk.png]]
[[Bild:Screenshot clamtk.png]]


==Beispiel==
==Beispiele==
* Da die Konsole das wesentlich bessere Arbeitsmittel ist, wird hier die Variante mit der Konsole erklärt.
* Um alles zu scannen und nur die Viren die gefunden worden sind angezeigt zu bekommen muss man die Schalter: "-i ; -r" anfügen
* Wenn man an dem Punkt angelangt ist wo die ganze Aktion schon Installiert ist,kann man nun versuchen etwas zu scannen und die bösen bösen Viren zu beseitigen.
clamscan -ri ~  
* Zunächst läd man sich die unschädlichen Testviren: "eicar" herunter, auch beim bäcker um die ecke zu erhalten in allen 3 Ausführungen.
*die tilde ist dafür da das alles von dem gerade eingelogten Benutzer gescannt wird
* Nachdem man sich diese herunter geladen hat fängt man  munter an zu scannen.
 
* Dafür öffnet man die Konsole und tippt mit viel Euphorie den Befehl "clamscan" ein.
[[Datei:Screenshot clamscan.png]]
* Nun scannt ClamAV den Ordner in dem man sich befindet.
* Möchte man alles durch die Bank weg scannen muss man tolle Schalter anfügen.
* Um alles zu scannen und nur die Viren die gefunden worden sind angezeigt zu bekommen muss man die Schalter: "-i ; -r" anfügen. Dass sieht dann so aus:
** clamscan -ri ~ (die tilde ist dafür da das alles von dem gerade eingelogten Benutzer durchgescannt wird).
** [[Datei:Screenshot clamscan.png]]


==ClamAV Daemon==
==ClamAV Daemon==
* Der Daemon läuft dann als Dienst im Hintergrund.
* Der Daemon läuft als Dienst im Hintergrund
* Bei der Installation wird ein entsprechendes Startskript unter /etc/init.d/clamav-daemon angelegt und der Dienst automatisch gestartet.
* Bei der Installation wird ein entsprechendes Startskript unter /etc/init.d/clamav-daemon angelegt und der Dienst automatisch gestartet. (FIXME)
* Das Skript kann über die üblichen Parametern start, stop und restart bedient werden.
** Das Skript kann über die üblichen Parametern start, stop und restart bedient werden.
* Konfiguration des Daemon (d.h. welche Aktionen bei Virenfund ausgeführt werden, Scantiefe, Scanoptionen, etc.) sind in der Datei /etc/clamav/clamd.conf hinterlegt.
* Konfiguration des Daemon
* clamd kann auch mittels: "dpkg-reconfigure clamav-base" konfiguriert werden.
** welche Aktionen bei Virenfund ausgeführt werden, Scantiefe, Scanoptionen, etc.
** sind in der Datei /etc/clamav/clamd.conf hinterlegt
* clamd kann auch konfiguriert werden mit
dpkg-reconfigure clamav-base


==Links==
==Links==

Version vom 15. Dezember 2019, 20:22 Uhr

ClamAV is an open source antivirus engine for detecting trojans, viruses, malware & other malicious threats.

Installation

ClamAV can be installed by issuing the following command in the terminal

# apt-get install clamav clamav-daemon

Note

  • It is recommended to restart your machine after the installation, so that the virus signature database updates and informs ClamAV about the update.
  • How to change freshclam configuration
  • ClamAV needs to have up to date virus signatures to work effectively.
  • To configure your ClamAV install change the line '?DatabaseMirror db.local.clamav.net' - the 'local' needs to be changed to your country code.

Scanning for viruses

ClamAV is able to scan separate files or if necessary entire directories. An example of a command is demonstrated bellow. To scan a file:

$ clamscan file

To scan a directory (In this instance your home directory):

$ clamscan --recursive=yes --infected /home

Note: If you would like ClamAV to remove the infected files add the --remove option.

Optionen

"-i" --> zeigt nur infizierte Dateien an (und nicht alle gescannten) "-r" --> Scannt alle Unterverzeichnisse rekursiv "--remove" --> entfernt infizierte Dateien (Achtung!Nicht leichtfertig benutzen!) "-h" --> zeigt alle Optionen von clamscan an "--move=VERZEICHNIS" --> Verschiebt alle infizierten Dateien in das Verzeichnis VERZEICHNIS.

  • By default ClamAV will not scan files larger than 20Mb.
  • In order to override that setting the options --max-filesize=2000M --max-scansize=2000M must be appended to the command.
  • Where the size 2000M may be replaced as necessary by the user.

An example is provided bellow.

$ clamscan --max-filesize=2000M --max-scansize=2000M --recursive=yes --infected /home

Note

  • Making ClamAV fully scan each and every file in your home folder may take up a lot of time (2+ hours) depending on the amount of files in your homer folder.

Quarantäne

  • Man kann gescannte Dateien mit: "--move=VERZEICHNIS" in den Ordner Verzeichnis legen.
  • Praktischerweise kombiniert man: "-r" mit "--move=VERZEICHNIS" um alles in einen sogesehenden Quarantäne Ordner zu legen.

Grafische Benutzeroberfläche

  • Mit ClamTK steht sogar eine Grafische Benutzeroberfläche zu Verfügung.

Installation

apt install clamtk

Beispiele

  • Um alles zu scannen und nur die Viren die gefunden worden sind angezeigt zu bekommen muss man die Schalter: "-i ; -r" anfügen
clamscan -ri ~ 
  • die tilde ist dafür da das alles von dem gerade eingelogten Benutzer gescannt wird

Datei:Screenshot clamscan.png

ClamAV Daemon

  • Der Daemon läuft als Dienst im Hintergrund
  • Bei der Installation wird ein entsprechendes Startskript unter /etc/init.d/clamav-daemon angelegt und der Dienst automatisch gestartet. (FIXME)
    • Das Skript kann über die üblichen Parametern start, stop und restart bedient werden.
  • Konfiguration des Daemon
    • welche Aktionen bei Virenfund ausgeführt werden, Scantiefe, Scanoptionen, etc.
    • sind in der Datei /etc/clamav/clamd.conf hinterlegt
  • clamd kann auch konfiguriert werden mit
dpkg-reconfigure clamav-base

Links