Home

Clam AntiVirus 0.93 User Manual

image

Contents

1. Clam AntiVirus 0 93 User Manual Contents Contents 1 Introduction Ld Features si ee hee oe AREAS DAR 1 2 Mailing lists and IRC channel 1 3 TE sce oe ae aaa dra 2 Base package 21 Supported platos i ua oos B E ERROR eb cd 2 2 Bitlaty DICEAPPS A 2 2 24 5 6 3 2 oder ood Ro Eo pO Eod d 3 Installation AL Reg irements ses pue gde AA Y 3 936 BE ee HS 3 2 Installing on shell account 2 4 249 EE 3 xe X Ses 3 3 Adding new system user and group 22 2246 24 855 825 gn 3 4 Compilation of base package 3 5 Compilation with clamav milter enabled 4 Configuration 4 3sclamid 3 4 244 44 6 465 56 ber EE ed BS Cats 4 1 1 On access scanning ue 933 59x ESE SSS EG A 42 lompe e soc meis Saw dae De ee DEORE ERS EOS Z5 NES EEE Oe TEC EE Se EES A HESS 4 4 Setting Up auto updating 224464 644684 444884 25 E 4 4 1 Closest mirrors 4 554 563848 e 3 bee es 5 Usage 5 1 Clamdaemon 52 Clamdscan EE roy 30v RG a ES 5 3 Claim kO a eso ea g a HE ee Nov 3 534 KEE AAA Sel sClamisCan 236 a ow Perhe Gee dae Ob eb ob cee amp 542 CAMA e ceux oom eo o Wow woe 3s we A SE SS 6 LibClamAV GL LiCENCS uaa e eor Bee S Re RES XE USE eA 0 2 Supported formats A acc eci ara x dee AA doa xXx 6 2 1 Executables ee a 6 2 2 Mail tiles sda dx a ek oe EE P 3 X a 6 2 3 Archives and compressed files ae rn nn do Ch Gin lA N oo oo Ge Nel Contents 2 6 24 Documents
2. Craig Jackson e Stuart Jones e Jason Judge e Keith http www textpad com e Ewald Kicker http www very clever com e Brad Koehn e Christina Kuratli http www virusprotect ch e Logic Partners Inc http www logicpartners com e Mark Lotspaih http www lotcom org e Michel Machado http oss digirati com br e Olivier Marechal e Matthew McKenzie e Durval Menezes http www durval com br e Micro Logic Systems http www mls nc e Midcoast Internet Solutions e Mimecast http www mimecast com e Kazuhiro Miyaji e Bozidar Mladenovic e Paul Morgan e Tomas Morkus e The Names Database http static namesdatabase com LibClamAV EJ e Names Directory http www namesdir com e Michael Nolan http www michaelnolan co uk e Jorgen Norgaard e Numedeon Inc creators of Whyville http www whyville net e Oneworkspace com http www oneworkspace com e Online Literature http www couol com e Origin Solutions http www originsolutions com au e outermedia GmbH http www outermedia de e Kevin Pang http www freebsdblog org e Alexander Panzhin e Passageway Communications http www passageway com e Dan Pelleg http www libagent org e Thodoris Pitikaris e Paul Rantin e Thomas J Raef http www ebasedsecurity com e Luke Reeves http www neuro tech net e RHX http www rhx it e Stefano Rizzetto e Roaring Penguin Software I
3. along with this program if not write to the Free Software Foundation Inc 51 Franklin Street Fifth Floor Boston MA 02110 1301 USA ClamAV and Clam AntiVirus are trademarks of Sourcefire Inc Introduction ES 1 Introduction Clam AntiVirus is an open source GPL anti virus toolkit for UNIX designed espe cially for e mail scanning on mail gateways It provides a number of utilities including a flexible and scalable multi threaded daemon a command line scanner and advanced tool for automatic database updates The core of the package is an anti virus engine available in a form of shared library 1 1 Features e Licensed under the GNU General Public License Version 2 e POSIX compliant portable e Fast scanning e Supports on access scanning Linux and FreeBSD only e Detects over 230 000 viruses worms and trojans including Microsoft Office macro viruses mobile malware and other threats e Scans within archives and compressed files also protects against archive bombs built in support includes Zip including SFX RAR including SFX ARJ including SFX Tar Gzip Bzip2 MS OLE2 MS Cabinet Files including SFX MS CHM Compiled HTML MS SZDD compression format BinHex SIS SymbianOS packages Autolt e Supports Portable Executable 32 64 bit files compressed or obfuscated with Introduction E AsPack UPX FSG Petite PeSpin N
4. drivel com gt Jerome Limozin jerome limozin net LibClamAV e Mike Loewen lt mloewen sturgeon cac psu edu gt e Roger Lucas lt roger planbit co uk gt e David Luyer lt david_luyer pacific net au gt e Richard Lyons lt frob clamav webcentral com au gt e David S Madole lt david madole net gt e Thomas Madsen lt tm softcom dk gt e Bill Maidment bill maidment com au e Joe Maimon jmaimon ttec com e David Majorel dm 1agoon nc e Andrey V Malyshev lt amal krasn ru gt e Fukuda Manabu fukuda cri mw co jp e Stefan Martig lt sm officeco ch gt e Alexander Marx lt mad ml madness at gt e Andreas Marx http www av test org e Chris Masters lt cmasters insl co uk gt e Fletcher Mattox lt fletcher cs utexas edu gt e Serhiy V Matveyev lt matveyev uatele com gt e Reinhard Max lt max suse de gt e Brian May lt bam debian org gt e Ken McKittrick lt klmac usadatanet com gt e Chris van Meerendonk cvm castel nl e Andrey J Melnikoff lt temnota kmv ru gt e Damian Menscher lt menscher uiuc edu gt e Denis De Messemacker lt ddm clamav net gt e Jasper Metselaar lt jasper formmailer net gt LibClamAV e Arkadiusz Miskiewicz lt misiek pld linux org gt e Ted Mittelstaedt lt tedm toybox placo com gt e Mark Mielke lt mark mark mielke cc gt e John Miller lt contact glideslopesoftware co uk gt e Jo Mills lt Jonathan Mills frequentis com gt e Dustin Mollo lt dustin
5. lt cav gjs cc gt e Ole Stanstrup ole stanstrup dk e Adam Stein adam scan mc xerox com e Steve lt steveb webtribe net gt e Richard Stevenson richard endace com e Sven Strickroth sstrickroth gym oha de LibClamAV e Matt Sullivan lt matt sullivan gen nz gt e Dr Zbigniew Szewczak zssz mat uni torun pl e Joe Talbott lt josepht cstone net gt e Gernot Tenchio lt g tenchio telco tech de gt e Masahiro Teramoto lt markun onohara to gt e Daniel Theodoro lt dtheodoro ig com br gt e Ryan Thompson lt clamav sasknow com gt e Gianluigi Tiesi lt sherpya netfarm it gt e Yar Tikhiy lt yar comp chem msu su gt e Andrew Toller lt atoller connectfree co uk gt e Michael L Torrie torriem chem byu edu e Trashware trashware gmx net e Matthew Trent mt rent localaccess com gt e Reini Urban lt rurban x ray at gt e Daniel Mario Vega lt dv5a dc uba ar gt e Denis Vlasenko lt vda ilport com ua gt e Laurent Wacrenier lwa teaser fr e Charlie Watts cewatts brainstorminternet net e Florian Weimer lt fw deneb enyo de gt e Paul Welsh lt paul welshfamily com gt e Nicklaus Wicker lt n wicker cnk networks de gt e David Woakes lt david mitredata co uk gt e Troy Wollenslegel troy intranet org e ST Wong lt st wong cuhk edu hk gt e Dale Woolridge lt dwoolridge drh net gt 6 LibClamAV 6 7 David Wu lt dyw iohk com gt Takumi Yamane lt yamtak b s
6. mollo sonoma edu gt e Remi Mommsen lt remigius mommsen cern ch gt e Doug Monroe doug planetconnect com e Alex S Moore lt asmoore edge net gt e Tim Morgan lt tim sentinelchicken org gt e Dirk Mueller lt mueller kde org gt e Flinn Mueller lt flinn activeintra net gt e Hendrik Muhs lt Hendrik Muhs student uni magdeburg de gt e Simon Munton lt simon munton demon co uk gt e Farit Nabiullin http program farit ru e Nemosoft Unv nemosoft smcc demon nl e Wojciech Noworyta wnow konarski edu pl e Jorgen Norgaard lt jnp anneli dk gt e Fajar A Nugraha lt fajar telkom co id gt e Joe Oaks lt joe oaks hp com gt e Washington Odhiambo lt wash wananchi com gt e Masaki Ogawa lt proc mac com gt e John Ogness lt jogness antivir de gt e Phil Oleson lt oz nixil net gt e Jan Ondrej lt ondrejj salstar sk gt LibClamAV e Martijn van Oosterhout kleptog svana org e OpenAntiVirus Team http www OpenAntiVirus org e Tomasz Papszun tomek lodz tpsa pl e Eric Parsonage eric eparsonage com e Oliver Paukstadt pstadt stud fh heilbronn de e Christian Pelissier lt Christian Pelissier onera fr gt e Rudolph Pereira rudolph usyd edu au e Dennis Peterson dennispe inetnw com e Ed Phillips ed UDel Edu e Andreas Piesk Andreas Piesk heise de e Mark Pizzolato clamav devel subscriptions pizzolato net e Dean Plant lt dean plant roke co uk gt e Alex Plein
7. suite http www zimbra com 6 8 Graphics The ClamAV logo was created by Mia Kalenius and Sergei Pronin from Finndesign http www finndesign fi 6 9 OpenAntiVirus Our database includes the virus database about 7000 signatures from OpenAntiVirus http OpenAntiVirus org 7 Core Team e aCaB acab clamav net Italy Role virus database maintainer coder e Mike Cathey mike clamav net USA Role co sysadmin e Christoph Cordes ccordes clamav net Germany Role virus database maintainer e Diego d Ambra diego clamav net Denmark Role virus database maintainer e Luca Gibelli lt luca clamav net gt Italy Role sysadmin mirror coordinator e Nigel Horne n jh clamav net United Kingdom Role coder e Arnaud Jacques arnaud clamav net France Role virus database maintainer Core Team e Tomasz Kom tkojm clamav net Poland Role project leader coder e Tomasz Papszun lt tomek clamav net gt Poland Role various help e Sven Strickroth lt sven clamav net gt Germany Role virus database maintainer virus submission management e Edwin Torok lt edwin clamav net gt Romania Role coder e Trog lt trog clamav net gt United Kingdom Role coder
8. 140ej3Aya0cVpd9KA4XXevEO2eTTvzWNCAq0ZzWNdjc Verification OK 6 6 Contributors The following people contributed to our project in some way providing patches bug reports technical support documentation good ideas e lan Abbott abbotti mev co uk e Clint Adams lt schizo debian org gt e Sergey Y Afonin asy kraft s ru LibClamAV e Robert Allerstorfer roal anet at e Claudio Alonso cfalonso yahoo com e Kevin Amorin lt kamorin ccs neu edu gt e Kamil Andrusz lt wizz mniam net gt e Tayfun Asker lt tasker metu edu tr gt e Jean Edouard Babin lt Jeb jeb com fr gt e Marc Baudoin lt babafou babafou eu org gt e Scott Beck sbeck gossamer threads com e Rolf Eike Beer eike mail math uni mannheim de e Rene Bellora lt rbellora tecnoaccion com ar gt e Carlo Marcelo Arenas Belon carenas sajinet com pe e Joseph Benden lt joe thrallingpenguin com gt e Hilko Bengen bengen vdst ka inka de e Hank Beatty lt hbeatty starband net gt e Alexandre Biancalana lt ale seudns net gt e Patrick Bihan Faou lt patrick mindstep com gt e Martin Blapp lt mb imp ch gt e Dale Blount dale velocity net e Serge van den Boom svdb stack nl e Oliver Brandmueller ob e Gitt NET e Boguslaw Brandys brandys o2 pl e Igor Brezac lt igor ipass net gt e Mike Brudenell lt pmb1 york ac uk gt e Brian Bruns bruns 2mbit com e Len Budney 1budney pobox com LibClamA
9. ISION units Both functions have support for archive limits in order to protect against Denial of Service attacks struct cl limits unsigned long int maxscansize during the scanning of archives this size will never be exceeded Wi unsigned long int maxfilesize compressed files will only be decompressed and scanned up to this size Wi unsigned int maxreclevel maximum recursion level for archives unsigned int maxfiles maximum number of files to be scanned within a single archive Ki unsigned short archivememlim limit memory usage for some unpackers Ir The last argument options configures the scan engine and supports the following flags that can be combined using bit operators LibClamAV EN e CL_SCAN_STDOPT This is an alias for a recommended set of scan options You should use it to make your software ready for new features in the future versions of libclamav e CLSCAN RAW Use it alone if you want to disable support for special files e CLSCAN ARCHIVE This flag enables transparent scanning of various archive formats e CL SCAN BLOCKENCRYPTED With this flag the library will mark encrypted archives as viruses Encrypted Zip Encrypted RAR e CL SCAN MAIL Enable support for mail files e CL SCAN MAILURL The mail scanner will download and scan URLs listed in a mail body This flag should not be used on loaded servers Due to potential problems please do not enable it by defaul
10. V e Matt Butt lt mattb cre8tiv com gt e Christopher X Candreva chris westnet com e Eric I Lopez Carreon lt elopezc technitrade com gt e Ales Casar lt casar uni mb si gt e Jonathan Chen lt jon clamav spock org gt e Andrey Cherezov andrey cherezov koenig su e Alex Cherney alex cher id au e Tom G Christensen tgc statsbiblioteket dk e Nicholas Chua nicholas ncmbox net e Chris Conn cconn abacom com e Christoph Cordes lt ib precompiled de gt e Ole Craig lt olc cs umass edu gt e Eugene Crosser crosser rol ru e Calin A Culianu calin ajvar org e Damien Curtain damien pagefault org e Krisztian Czako slapic linux co hu e Diego d Ambra da softcom dk e Michael Dankov misha btrc ru e Yuri Dario lt mc6530 mclink it gt e David djgardner users sourceforge net e Maxim Dounin mdounin rambler co ru e Alejandro Dubrovsky lt s328940 student uq edu au gt e James P Dugal jpd louisiana edu e Magnus Ekdahl lt magnus debian org gt e Mehmet Ekiz lt ekizm tbmm gov tr gt LibClamAV e Jens Elkner lt elkner linofee org gt e Fred van Engen lt fred wooha org gt e Jason Englander lt jason englanders cc gt e Oden Eriksson lt oeriksson mandrakesoft com gt e Daniel Fahlgren lt fahlgren ardendo se gt e Andy Fiddaman lt af jeamland org gt e Edison Figueira Junior lt edison brc com br gt e David Ford lt david cert blue labs org gt e Martin Forss
11. accepts the same command line options as clamscan most of them are ignored because they must be enabled directly in clamd i e clamd conf 5 Usage 13 e scanned files must be accessible for clamd e it can t use external unpackers 5 3 Clamuko Clamuko is a special thread in clamd that performs on access scanning under Linux and FreeBSD and shares internal virus database with the daemon You must follow some important rules when using it e Always stop the daemon cleanly using the SHUTDOWN command or the SIGTERM signal In other case you can lose access to protected files until the system is restarted e Never protect the directory your mail scanner software uses for attachment un packing Access to all infected files will be automatically blocked and the scanner including clamd will not be able to detect any viruses In the result all infected mails may be delivered For example to protect the whole system add the following lines to clamd conf lamukoScanOnAccess lamukoIncludePath amukoExcludePath proc amukoExcludePath temporary dir of your mail scanning software 300 0 You can also use clamuko to protect files on Samba Netatalk but a far more better and safe idea is to use the samba vscan module NFS is not supported because Dazuko doesn t intercept NFS access calls 5 4 Output format 5 4 1 clamscan clamscan writes all regular program messages to stdout and errors warnings to stderr You can
12. acter is SCAN home zolw test home zolw test clam exe ClamAV Test File FOUND Connection closed by foreign host In the SCAN mode it closes the connection when the first virus is found 6 LibClamAV Kg SCAN home zolw test clam zip home zolw test clam zip ClamAV Test File FOUND CONTSCAN and MULTISCAN don t stop scanning in case a virus is found Error messages are printed in the following format SCAN no such file no such file Can t stat the file ERROR 6 LibClamAV Libclamav provides an easy and effective way to add a virus protection into your soft ware The library is thread safe and transparently recognizes and scans within archives mail files MS Office document files executables and other special formats 6 1 Licence Libclamav is licensed under the GNU GPL v2 licence This means you are not allowed to link commercial close source applications against it All software using libclamav must be GPL compliant 6 2 Supported formats 6 2 1 Executables The library has a built in support for 32 64 bit Portable Executable files and 32 bit ELF files Additionally it can handle PE files compressed or obfuscated with the following tools Aspack 2 12 UPX all versions FSG 1 3 1 31 1 33 2 0 Petite 2 x PeSpin 1 1 6You can still use clamd or clamscan instead 6 LibClamAV NsPack wwpack32 1 20 MEW Upack YOda Cryptor 1 3 6 2 2 Mail files Libclamav can handle almost ev
13. ause there are already too many clients using those time slots Proxy settings are only configurable via the configuration file and freshclam will require strict permission settings for the config file when HTTPProxyPassword is turned on PProxyServer myproxyserver com PProxyPort 1234 PProxyUsername myusernam PProxyPassword mypass D Hi Hi RH 5 Usage KO 4 4 1 Closest mirrors The DatabaseMi rror directive in the config file specifies the database server freshclam will attempt up to MaxAttempts times to download the database from The default database mirror is database clamav net but multiple directives are allowed In or der to download the database from the closest mirror you should configure freshclam to use db xx clamav net where xx represents your country code For example if your server is in Ascension Island you should have the following lines included in freshclam conf DNSDatabaseInfo current cvd clamav net DatabaseMirror db ac clamav net DatabaseMirror database clamav net The second entry acts as a fallback in case the connection to the first mirror fails for some reason The full list of two letters country codes is available at http www iana org cctld cctld whois htm 5 Usage 5 1 Clam daemon clamd is a multi threaded daemon that uses libclamav to scan files for viruses It may work in one or both modes listening on e Unix local socket e TCP socket The daemon is fully
14. c com e Ron DeFulio e Digirati http oss digirati com br e Steve Donegan http www donegan org e Dynamic Network Services Inc http www dyndns org e EAS Enterprises LLC e eCoupons com http www ecoupons com e Electric Embers http electricembers net e John T Ellis e Epublica e Bernhard Erdmann e David Eriksson http www 2good nu LibClamAV e Philip Ershler e Explido Software USA Inc http www explido us e David Farrick e Jim Feldman e Petr Ferschmann http petr ferschmann cz e Andries Filmer http www netexpo nl e The Free Shopping Cart people http www precisionweb net e Paul Freeman e Jack Fung e Stephen Gageby e Paolo Galeazzi e GANDI http www gandi net e Jeremy Garcia http www linuxquestions org e GBC Internet Service Center GmbH http www gbc net e GCS Tech http www gcstech net e GHRS http www ghrshotels com e Lyle Giese e Todd Goodman e Bill Gradwohl http www ycc com e Grain of Salt Consulting e Terje Gravvold e Hart Computer http www hart co jp e Pen Helm e Hosting Metro LLC http www hostingmetro com e IDEAL Software GmbH http www IdealSoftware com LibClamAV e Industry Standard Computers http www ISCnetwork com e Interact2Day http www interact2day com e Invisik Corporation http www invisik com e itXcel Internet Domain Registration http www itxcel com e
15. configurable via the clamd conf file gt clamd recognizes the following commands e PING Check the daemon s state should reply with PONG e VERSION Print program and database versions e RELOAD Reload the databases 5man 5 clamd conf 5 Usage 12 e SHUTDOWN Perform a clean exit e SCAN file directory Scan file or directory recursively with archive support enabled a full path is required e RAWSCAN file directory Scan file or directory recursively with archive and special file support disabled a full path is required e CONTSCAN file directory Scan file or directory recursively with archive support enabled and don t stop the scanning when a virus is found e MULTISCAN file directory Scan file in a standard way or scan directory recursively using multiple threads to make the scanning faster on SMP machines e STREAM Scan stream clamd will return a new port number you should connect to and send data to scan e SESSION END Start end a clamd session you can do multiple commands per TCP session WARNING due to the clamd implementation the RELOAD command will break the session and reacts on the special signals e SIGTERM perform a clean exit e SIGHUP reopen the log file e SIGUSR2 reload the database 5 2 Clamdscan clamdscan is a simple clamd client In many cases you can use it as a clamscan replacement however you must remember that e it only depends on clamd e although it
16. e SUID or SGID bits for Clam AntiVirus binaries 3 5 Compilation with clamav milter enabled libmilter and its development files are required To enable clamav milter configure ClamAV with configur nable milter 3Cygwin note If you have not etc passwd you can skip this point 4 Configuration EJ 4 Configuration 4 1 clamd Before you start using the daemon you have to edit the configuration file in other case clamd won t run clamd ERROR Please edit the example config file etc clamd conf This shows the location of the default configuration file The format and options of this file are fully described in the clamd conf 5 manual The config file is well commented and configuration should be straightforward 4 1 1 On access scanning One of the interesting features of clamd is on access scanning based on the Dazuko module available from http dazuko org This module is not required to run clamd furthermore you shouldn t run Dazuko on production systems At the moment Dazuko is avaliable for Linux and FreeBSD but the following information only covers Linux tar zxpvf dazuko a b c tar gz cd dazuko a b c make dazuko or make dazuko smp for smp kernels su insmod dazuko o cp dazuko o lib modules uname r misc depmod a Depending on your Linux distribution you may need to add a dazuko entry to etc modules or run the module during system s startup by adding sbin modprob
17. e configuration script of GMP 3 2 Installing on shell account To inst all ClamAV locally on an unprivileged shell account you need not create any additional users or groups Assuming your home directory is home gary you should build it as follows configure prefix home gary clamav disable clamav make make install To test cl your installation execute lamav bin freshclam cl lamav bin clamscan 3 Installation The disable clamav switch disables the check for existence of the clamav user and group but clamscan would still require an unprivileged account to work in a superuser mode 3 3 Adding new system user and group If you are installing ClamAV for the first time you have to add a new user and group to your system groupadd clamav useradd g clamav s bin false c Clam AntiVirus clamav Consult a system manual if your OS has not groupadd and useradd utilities Don t forget to lock access to the account 3 4 Compilation of base package Once you have created the clamav user and group please extract the archive zcat clamav x yz tar gz tar xvf cd clamav x yz Assuming you want to install the configuration files in etc configure and build the software as follows configure sysconfdir etc make su c make install In the last step the software is installed into the usr local directory and the config files into etc WARNING Never enable th
18. e dazuko to some startup file You must also create a new device 4 Configuration EJ cat proc devices grep dazuko 254 dazuko su c mknod m 600 dev dazuko c 254 0 Now configure Clamuko in clamd conf and read the 5 3 section 4 2 clamav milter Nigel Horne s clamav milter is a very efficient email scanner designed for Send mail It s written entirely in C and only depends on 1ibclamav or clamd You can find detailed installation instructions in the INSTALL file that comes with the clamav milter sources Basically to connect it with Sendmail add the following lines to etc mail sendmail mc INPUT MAIL FILTER clmilter S local var run clamav clmilter sock F T S 4m R 4m dnl define confINPUT MAIL FILTERS clmilter If you re running it in external mode check entry in clamd conf of the form LocalSocket var run clamav clamd sock Start clamav milter usr local sbin clamav milter lo var run clamav clmilter sock and restart sendmail 4 3 Testing Try to scan recursively the source directory clamscan r 1 scan txt clamav x yz It should find some test files in the clamav x yz test directory The scan result will be saved in the scan txt log file 4 To test clamd start it and use clamdscan or instead connect directly to its socket and run the SCAN command clamdscan 1 scan txt clamav x yz Please note that the scanned files must be accessible by the user running clamd
19. en maf appgate com e Brian J France list firehawksystems com e Free Oscar lt freeoscar wp pl gt e Martin Fuxa yeti email cz e Piotr Gackiewicz lt gacek intertele pl gt e Jeremy Garcia lt jeremy linuxquestions org gt e Dean Gaudet lt dean clamav arctic org gt e Michel Gaudet Michel Gaudet ehess fr e Philippe Gay ph gay free fr e Nick Gazaloff lt nick sbin org gt e Geoff Gibbs lt ggibbs hgmp mrc ac uk gt e Luca NERvOus Gibelli lt nervous nervous it gt e Scott Gifford sgifford suspectclass com e Wieslaw Glod lt wkg x2 p1 gt e Stephen Gran lt steve lobefin net gt e Koryn Grant koryn endace com e Matthew A Grant lt grantma anathoth gen nz gt LibClamAV e Christophe Grenier lt grenier cgsecurity org gt e Marek Gutkowski lt hobbit core segfault pl gt e Jason Haar lt Jason Haar trimble co nz gt e Hrvoje Habjanic lt hrvoje habjanic zg hinet hr gt e Michal Hajduczenia lt michalis mat uni torun pl gt e Jean Christophe Heger lt jcheger acytec com gt e Martin Heinz lt Martin hemag ch gt e Kevin Heneveld lt kevin northstar k12 ak us gt e Anders Herbjornsen lt andersh gar no gt e Paul Hoadley paulh logixsquad net e Robert Hogan lt robert roberthogan net gt e Przemyslaw Holowczyc doozer skc com pl e Thomas W Holt Jr lt twh cohesive net gt e James F Hranicky lt jfh cise ufl edu gt e Douglas J Hunley lt doug hunley homeip net gt e K
20. er lt pleiner zeitform de gt e Ant La Porte ant dvere net e Jef Poskanzer lt jef acme com gt e Christophe Poujol Christophe Poujol atosorigin com e Sergei Pronin sp finndesign fi e Thomas Quinot thomas cuivre fr eu org e Ed Ravin lt eravin panix com gt e Robert Rebbun robert desertsurf com e Brian A Reiter lt breiter wolfereiter com gt e Didi Rieder lt adrieder sbox tugraz at gt e Pavel V Rochnyack lt rpv fsf tsu ru gt e Rupert Roesler Schmidt r roesler schmidt uplink at e David Sanchez dsanchez veloxia com LibClamAV e David Santinoli david santinoli com e Vijay Sarvepalli vssarvep office uncg edu e Martin Schitter e Theo Schlossnagle lt jesus omniti com gt e Enrico Scholz lt enrico scholz informatik tu chemnitz de gt e Karina Schwarz k schwarz uplink at e Scsi lt scsi softland ru gt e Dr Matthew J Seaman lt m seaman infracaninophile co uk gt e Hector M Rulot Segovia lt Hector Rulot uv es gt e Omer Faruk Sen lt ofsen enderunix org gt e Sergey lt a_s_y sama ru gt e Tuomas Silen tuomas silen nodeta fi e David F Skoll lt dfs roaringpenguin com gt e Al Smith lt ajs clamav aeschi ch eu org gt e Sergey Smitienko lt hunter comsys com ua gt e Solar Designer solar openwall com e Joerg Sonnenberger joerg britannica bec de e Michal GiM Spadlinski http gim org pl e Kevin Spicer lt kevin kevinspicer co uk gt e GertJan Spoelman
21. ery mail file format including TNEF winmail dat at tachments 6 2 3 Archives and compressed files The following archive and compression formats are supported by internal handlers Zip 4 SEX RAR SEX Tar Gzip Bzip2 MS OLE2 MS Cabinet Files SFX MS CHM Compiled HTML MS SZDD compression format BinHex SIS SymbianOS packages Autolt 6 LibClamAV 6 2 4 Documents The most popular file formats are supported e MS Office and MacOffice files e RTF e PDF e HTML 6 2 5 Others Libclamav can handle various obfuscators encoders files vulnerable to security risks such as e JPEG exploit detection RIFF exploit detection e uuencode e ScrEnc obfuscation CryptFF 6 3 API 6 3 1 Header file Every program using libclamav must include the header file clamav h include lt clamav h gt 6 3 2 Database loading The following set of functions provides an interface for loading the virus database const char cl_retdbdir void int cl_load const char path struct cl_engine engine unsigned int signo unsigned int options 6 LibClamAV 18 cl_retdbdir returns the default hardcoded path to the directory with ClamAV databases cl_load loads a single database file or all databases from a directory if path points to a directory The second argument is used for passing in the engine structure which should be previously initialized with NULL A number of loaded signatures wil
22. ession com gt Youza Youzovic lt youza post cz gt Anton Yuzhaninov lt citrin rambler co ru gt Leonid Zeitlin 1z europe com ZMan Z x86zman go a way dyndns org Andoni Zubimendi andoni lpsat net Donors We ve received financial support from in alphabetical order ActiveIntra net Inc http www activeintra net Advance Healthcare Group http www ahgl com au Allied Quotes http www AlliedQuotes com American Computer amp Electronic Services Corp http www acesnw com Amnesty International Swiss Section http www amnesty ch Steve Anderson Anonymous donor from Colorado US Arudius http arudius sourceforge net Peter Ashman Atlas College http www atlascollege nl Australian Payday Cash Loans http www cashdoctors com au AWD Online http www awdonline com BackupAssist Backup Software http www backupassist com Dave Baker Bear and Bear Consulting Inc http www bear consulting com LibClamAV ES e Aaron Begley e Craig H Block e Norman E Brake Jr e Josh Burstyn e By Design http www by design net e Canadian Web Hosting http www canadianwebhosting com e cedarcreeksoftware com http www cedarcreeksoftware com e Ricardo Cerqueira e Thanos Chatziathanassiou e Cheahch from Singapore e Conexim Australia business web hosting http www conexim com au e Alan Cook e Joe Cooper e CustomLogic LLC http www customlogi
23. ios xx a E EE ERE EER EOS 8h ES 17 0 20 OEPS ae oo GS OE Soe Soak amp c de be aes 17 0 3 API uus c ee cca eo ELE ORC eee Sees pL Ad SOE Oe 08 17 63 1 HeaderBl 454a 39 9o 9x9 ok Yo Gee ox 17 0 32 Database loading os ke s S aa X096 See ESR x 17 6 3 3 Error handling ss ivi Qo UO REC v Xy x xs 18 6 3 4 Engine structure estara ERES 19 6 4 Database reloading 2 AN oo o 4545 4465 4484 19 6 4 1 Data scan functions ooa RR 20 64 2 Memory 4 4 4 44 ox AAN X os 22 6 4 3 clamav config 6 463 645 So Dae GSS ee He SR ES 22 GAA EKampl aros ra 23 6 5 EVOCA uou uox sacs RU DRE er A qeu E REUS REOR RR 23 00 COMODIDAD A Oe A 23 Oo DIODOS dee a a a 34 o TE 40 6 0 Open Ant VIS ass bow re 6 69 Soo ie a E Res e E 40 7 Core Team 40 ClamAV User Manual 2007 2008 Sourcefire Inc 2002 2007 Tomasz Kojm This document is distributed under the terms of the GNU General Public License v2 Clam AntiVirus is free software you can redistribute it and or modify it under the terms of the GNU General Public License as published by the Free Software Foundation either version 2 of the License or at your option any later version This program is distributed in the hope that it will be useful but WITHOUT ANY WARRANTY without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE See the GNU General Public License for more details You should have received a copy of the GNU General Public License
24. l be added to signo The last argument can pass the following flags e CL_DB_STDOPT This is an alias for a recommended set of scan options e CL_DB_PHISHING Load phishing signatures e CL_DB_PHISHING_URLS Initialize the phishing detection module and load wdb and pdb files e CL_DB_PUA Load signatures for Potentially Unwanted Applications e CLDB_CVDNOTMP Load CVD files directly without unpacking them into a temporary directory cl_load returns 0 CL_SUCCESS on success and a negative value on failure struct cl_engine engine NULL unsigned int sigs 0 int ret ret cl load cl retdbdir amp engine amp sigs CL DB STDOPT 6 3 3 Error handling Use c1 strerror to convert error codes into human readable messages The function returns a statically allocated string if ret printf cl load error s n cl strerror ret exit 1 7Remember to initialize the virus counter variable with 0 6 LibClamAV 19 6 3 4 Engine structure When all required databases are loaded you should prepare the detection engine by calling cl_build In the case of failure you should free the memory occupied by the engine with cl_free int cl_build struct cl engine engine void cl_free struct cl_engine engine In our example if ret cl_build engine printf cl_build error s n cl strerror ret cl_free engine exit 1 6 4 Database reloading The most important thing is t
25. nc http www roaringpenguin com e Luke Rosenthal e Jenny Sfstrm http PokerListings com e School of Engineering University of Pennsylvania http www seas upenn edu e Tim Scoff e Seattle Server http www seattleserver com LibClamAV EJ e Software Workshop Inc http www softwareworkshop com e Solutions In A Box http www siab com au e Stephane Rault e SearchMain http www searchmain com e Olivier Silber e Fernando Augusto Medeiros Silva http www linuxplace com br e Sollentuna Fria Gymnasium Sweden http www sfg se e StarBand http www starband com e Stroke of Color Inc e Synchro Sistemas de Informacao http synchro com br e Sahil Tandon e The Spamex Disposable Email Address Service http www spamex com e Brad Tarver e TGT Tampermeier amp Grill Steuerberatungs und Wirtschaftstreuhand OEG http www tgt at e Per Reedtz Thomsen e William Tisdale e Up Time Technology http www uptimetech com e Ulfi e Jeremy Vanderburg http www jeremytech com e Web arbyte Online Marketing http www webarbyte de e Webzone Srl http www webzone it e Markus Welsch http www linux corner net e Julia White http www convert tools com e Nicklaus Wicker 7 Core Team EU David Williams http kayakero net e Glenn R Williams Kelly Williams e XRoads Networks http xroadsnetworks com Zimbra open source collaboration
26. o keep the internal instance of the database up to date You can watch database changes with the cl_stat family of functions int cl statinidir const char dirname struct cl stat dbstat int cl statchkdir const struct cl stat dbstat int cl statfree struct cl stat dbstat Initialization struct cl stat dbstat memset amp dbstat 0 sizeof struct cl stat cl statinidir dbdir amp dbstat To check for a change you just need to call cl statchkdir and check its return value 0 no change 1 some change occured if cl statchkdir amp dbstat 1 reload database cl statfree amp dbstat 6 LibClamAV EN cl statinidir cl retdbdir amp dbstat Remember to reset the cl stat structure after reload 6 4 1 Data scan functions It s possible to scan a file or descriptor using int cl scanfile const char filename const char virname unsigned long int scanned const struct cl engine engine const struct cl limits limits unsigned int options int cl scandesc int desc const char virname unsigned long int scanned const struct cl engine engine const struct cl limits limits unsigned int options Both functions will store a virus name under the pointer virname the virus name is part of the engine structure and must not be released directly If the third argument scanned is not NULL the functions will increase its value with the size of scanned data in CL COUNT PREC
27. or you will get an error To get more info on clamscan options run man clamscan 4 Configuration 10 4 4 Setting up auto updating freshclam is the automatic database update tool for Clam AntiVirus It can work in two modes e interactive on demand from command line e daemon silently in the background freshclam is advanced tool it supports scripted updates instead of transferring the whole CVD file at each update it only transfers the differences between the latest and the current database via a special script database version checks through DNS proxy servers with authentication digital signatures and various error scenarios Quick test run freshclam as superuser with no parameters and check the output If every thing is OK you may create the log file in var log owned by clamav or another user freshclam will be running as touch var log freshclam log chmod 600 var log freshclam log chown clamav var log freshclam log Now you should edit the configuration file freshclam conf and point the UpdateLog File directive to the log file Finally to run freshclam in the daemon mode execute freshclam d The other way is to use the cron daemon You have to add the following line to the crontab of root or clamav user N usr local bin freshclam quiet to check for a new database every hour N should be a number between 3 and 57 of your choice Please don t choose any multiple of 10 bec
28. r ret 6 4 Memory Because the engine structure occupies a few megabytes of system memory you should release it with cl free if you no longer need to scan files 6 4 3 clamav config Use clamav config to check compilation information for libclamav zolw localhost S clamav config libs L usr local lib lz 1bz2 lgmp lpthread zolw localhost clamav config cflags I usr local include g 02 6 LibClamAV EJ 6 4 4 Example You will find an example scanner application in the clamav sources example Don t forget that all programs based on libclamav must be linked against it gcc Wall exl c o exl lclamav 6 5 CVD format CVD ClamAV Virus Database is a digitally signed tarball containing one or more databases The header is a 512 bytes long string with colon separated fields ClamAV VDB build time version number of signatures functionality level required MD5 checksum digital signature builder name build time sec sigtool info displays detailed information on CVD files zolw localhost usr local share clamav sigtool i daily cvd File daily cvd Build time 10 Mar 2008 10 45 0000 Version 6191 Signatures 59084 Functionality level 26 Builder ccordes MD5 6e6e29dae36b4b7315932c921e568330 Digital signature zz9irc9irupR3zT7yX6J4O0R6XdFPUat4HIM9ERn3kACOWpcMFxq Fs4toG5WJsHda0Jj921UusZ 7wAgY jpailNr jFfXHsJxvOdBkS5 XWMnt 30T1ctNgqmiF RLU6VOVeT
29. s e FreeBSD OpenBSD e Mac OS X Some features may not be available on your operating system If you are successfully running Clam AntiVirus on a system not listed above please let us know 2 2 Binary packages You can find the up to date list of binary packages at our website http www clamav net download packages Installation from a port is recommended 3 Installation 3 Installation 3 1 Requirements The following elements are required to compile ClamAV e 7 lib and zlib devel packages e gcc compiler suite tested with 2 9x 3 x and 4 x series If you are compiling with higher optimization levels than the default one O2 for gcc be aware that there have been reports of misoptimizations The build system of ClamAV only checks for bugs affecting the default settings it is your responsibility to check that your compiler version doesn t have any bugs The following packages are optional but highly recommended e bzip2 and bzip2 devel library e GNUMP3 It s very important to install the GMP package because it allows freshclam to verify the digital signatures of the virus databases and scripted updates If fresh clam was compiled without GMP support it will display SECURITY WARN ING NO SUPPORT FOR DIGITAL SIGNATURES on every update You can download GNU MP at http www Swox com gmp A note for Solaris SPARC users you must set the ABI system variable to 32 e g setenv ABI 32 before running th
30. sPack wwpack32 MEW Upack YOda Cryptor e Supports almost all mail file formats e Support for other special files formats includes HTML RTF PDF Files encrypted with CryptFF and ScrEnc uuencode TNEF winmail dat e Advanced database updater with support for scripted updates digital signatures and DNS based database version queries 1 2 Mailing lists and IRC channel If you have a trouble installing or using ClamAV try asking on our mailing lists There are four lists available e clamav announce lists clamav net info about new versions moderated e clamav users lists clamav net user questions e clamav devel lists clamav net technical discussions e clamav virusdb lists clamav net database update announcements moderated Subscribers are not allowed to post to the mailing list 2 Base package S You can subscribe and search the mailing list archives at http www clamav net support ml Alternatively you can try asking on the clamav IRC channel launch your favourite irc client and type server irc freenode net join clamav 1 3 Virus submitting If you have got a virus which is not detected by your ClamAV with the latest databases please submit the sample at our website http www clamav net sendvirus 2 Base package 2 1 Supported platforms Most popular UNIX operating systems are supported Clam AntiVirus 0 9x was tested on e GNU Linux e Solari
31. t but make it optional e CL SCAN OLE2 Enables support for OLE2 containers used by MS Office and msi files e CL SCAN PDF Enables scanning within PDF files e CL SCAN PE This flag enables deep scanning of Portable Executable files and allows libclamav to unpack executables compressed with run time unpackers e CL SCAN ELF Enable support for ELF files e CL SCAN BLOCKBROKEN libclamav will try to detect broken executables and mark them as Broken Executable e CL SCAN HTML This flag enables HTML normalisation including ScrEnc decryption e CL SCAN ALGORITHMIC Enable algorithmic detection of viruses 6 LibClamAV 22 e CL_SCAN_PHISHING_BLOCKSSL Phishing module always block SSL mismatches in URLs e CL SCAN PHISHING BLOCKCLOAK Phishing module always block cloaked URLs All functions return 0 CL CLEAN when the file seems clean CL VIRUS when a virus is detected and another value on failure struct cl limits limits const char virname memset amp limits 0 sizeof struct cl limits limits maxfiles 10000 limits maxscansize 100 1048576 100 MB imits maxfilesize 10 1048576 10 MB limits maxreclevel 16 if ret cl scanfile tmp test exe amp virname NULL engine amp limits CL STDOPT CL VIRUS printf Virus detected s n virname else printf No virus detected n if ret CL CLEAN printf Error s n cl strerro
32. urt Huwig lt kurt iku netz de gt e Andy Igoshin lt ai vsu ru gt e Michal Jaegermann lt michal harddata com gt e Christophe Jaillet lt christophe jaillet wanadoo fr gt e Jay lt sysop clamav coronastreet net gt e Stephane Jeannenot lt stephane jeannenot wanadoo frz e Per Jessen lt per computer org gt e Dave Jones lt dave kalkbay co za gt e Jesper Juhl lt juhl dif dk gt e Kamil Kaczkowski lt kamil kamil eisp pl gt LibClamAV Alex Kah lt alex narfonix com gt Stefan Kaltenbrunner lt stefan kaltenbrunner cc gt Lloyd Kamara lt 1 kamara imperial ac uk gt Stefan Kanthak lt stefan kanthak fujitsu siemens com gt Kazuhiko lt kazuhiko fdiary net gt Jeremy Kitchen lt kitchen scriptkitchen com gt Tomasz Klim lt tomek euroneto pl gt Robbert Kouprie robbert exx nl Martin Kraft lt martin kraft fal de gt Petr Kristof lt Kristof P fce vutbr cz gt Henk Kuipers henk opensourcesolutions nl Nigel Kukard lt nkukard lbsd net gt Eugene Kurmanin lt smfs users sourceforge net gt Dr Andrzej Kurpiel akurpiel mat uni torun pl Mark Kushinsky mark mdspc com Mike Lambert 1ambert jeol com Thomas Lamy Thomas Lamy in online net Stephane Leclerc sleclerc aliastec net Marty Lee lt marty maui co uk gt Dennis Leeuw dleeuw made it com Martin Lesser admin debian bettercom de Peter N Lewis peter stairways com au Matt Leyda mf leyda e one com James Lick lt jlick
33. use the option stdout to redirect all program messages to stdout Warnings and error messages from 1ibclamav are always printed to stderr A typical output from clamscan looks like this tmp test removal tool exe Worm Sober FOUND tmp test md5 o OK tmp test blob c OK 5 Usage tmp test message c OK tmp test error hta VBS Inor D FOUND When a virus is found its name is printed between the filename and FOUND strings In case of archives the scanner depends on libclamav and only prints the first virus found within an archive ZO ma welocal host tmp clamscan malware zip lware zi ip Worm Mydoom U FOUND TIP You can force clamscan to list all infected files in an archive using no archive this option disables transparent decompressors built into libclamav and enabling ex ternal decompressors unzip unrar zolw Archive inf inf inf tmp cl tmp cl tmp cl localhost tmp clamscan no archive unzip malware zip tmp malware zip lating testl exe lating test2 exe lating test3 exe lamav 77e7bfdbb2d3872b testl exe Worm Mydoom U FOUND lamav 77e7bfdbb2d3872b test2 exe Trojan Taskkill A FOUND lamav 77e7bfdbb2d3872b test3 exe Worm Nyxem D FOUND tmo malware zip Infected Archive FOUND 5 4 2 clamd The output format of clamd is very similar to clamscan zolw localhost telnet localhost 3310 Trying 127 0 0 1 Connected to localhost Escape char

Download Pdf Manuals

image

Related Search

Related Contents

  Ver. 2.64 User`s Manual  Gitzo GK2580TQD tripod  Operation and Maintenance Instructions Envistar Top  DanoTech MO42C-401  808nm Diode Hair Removal Laser User Guide      Mode d`emploi SKU : CHAR-RSV-PHONE  ADXL345 (Rev. 0) - SparkFun Electronics  

Copyright © All rights reserved.
Failed to retrieve file