Home
Clam AntiVirus 0.92rc2 User Manual
Contents
1. 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 ex1 lclamav 6 LibClamAV EJ 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 Build time 11 Feb 2007 19 28 40000 Version 2553 of signatures 6063 Functionality level 9 Builder ccordes MD5 7 337b409249elldea3ef fb04dd352f2 Digital signature 6Ybd2eeDHBAs8raaEwmayqzoab5ysGDNnQ5Cc89mS2VCmljRXZP ke itmkTyYQTc rgJc2uQPrtNvzvUxRpsniwoyZ gIkPniCLnqVCYOOytwtmirivbrV8 j Okzxb9nHd450UQqj Z3rLbS7T5HCbRX3uE0JX1tAo642Gq9ACH9FC 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 Ian Abbott abbotti mev co uk e Clint Adams lt schizo debian org gt e Sergey Y Afonin asy kraft s ru e Robert Allerstorfer roal anet at e Claudio Alonso lt cfalonso yahoo com gt e Kevin Amorin lt
2. ClamAV and Clam AntiVirus are trademarks of Sourcefire Inc 1 Introduction EE 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 158 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 e Supports Portable Executable 32 64 bit files compressed or obfuscated with UPX 1 Introduction E FSG Petite NsPack wwpack32 MEW Upack YOda Cryptor e Supports almost all mail file formats e Support for other special files formats includes HTML RTF PDF Files encryp
3. Clam AntiVirus 0 92rc2 User Manual Contents Contents 1 Introduction A AAA IN 12 Mailing lists and IRC channel 4 2 22 bed Rn 1 3 Varus SUDIDIEUDIB s es ee he PR SERRE ESSE SHS REE 2 Base package 2 1 Supported platforms ucc exer a E Ue axo wee Boe 22 Binary PACKAGES e op e a eB amp Se BR w BAK 3 Installation 3 1 Requirements ec s os pee ee a OS a e eS ae Ae 3 2 Installing on shell account 24 2 54254 4 546544 39 3993 3 3 Adding new system user and group 0 344 Compilation of base package e ENN n 3 5 Compilation with clamav milter enabled 4 Configuration ZI Cli ASIA 4 1 1 On access scanning ko wk vos eS Rae eS SS 4 2 clamav milter os accom 2 omm Soe ce br OR Soy dida ak 4 3 TESS IU Qus ee ee Oe HK 44 Setting up auto updating 2 2o rr t o Rm xu MAA Closes mttOtsS 2 5 une er ad ee ee deo dere es 5 Usage Sb Clam daemon EE 52 Clamdscan eyes oe ce ed ede EO 3 9 ACA sit ye hs ee ee we A RS a ee Oe A 54 O tp tformat CERE 20 ASC sr gos rita re aanp A RS a SUA 542 UAT cuc ea eB do Gh Bee BO NON 6 LibClamAV 6l JILOCA o NO aoe aoe 0 2 Supported TOMAS eeh Ron dong Rw Sep AR OI Ex c t bles s cercar ica Sore reen ech 6 2 2 Malles Zeg cR ub Dd KE wok ew 9 5 e a Sex E 6 2 Archives and compressed files eu EELER oo oo Gi No Contents 2 624 Doc ments 0664464066445 245 Reena Ghee ES 16 O20 SNCS 2344244544 bbe bee been a deena eee 17
4. 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 1uca clamav net Italy Role sysadmin mirror coordinator e Nigel Horne lt njh clamav net gt United Kingdom Role coder e Arnaud Jacques arnaud clamav net France Role virus database maintainer e Tomasz Kojm lt tkojm clamav net gt Poland Role project leader coder e Tomasz Papszun tomek clamav net Poland Role various help e Sven Strickroth sven clamav net Germany Role virus database maintainer virus submission management e Edwin Torok edwin clamav net Romania Role coder e Trog lt trog clamav net gt United Kingdom Role coder
5. 63 API uos fic acces Seah Se Oe Oe Secs ke se Oe 17 Gal HeoaderhBle i424 e 4k 625444 SE Row RE 17 6 3 2 Database loading o c s es cosa toeo epos mea iee Seen 17 6 3 3 AA b Eng oie Slee em e hend 18 6 3 4 Engine structure PPP 18 6 4 Database reloading e o oo a 19 6 4 1 Data scan functions x ooa a 19 6 4 2 MEMO vs pe o rr Gk HEEN 22 6 4 3 clamayv config Ea a a ae 22 644 Example 2 cas eh ed hag Be gE Eus 22 Den CVD format s g osoa a emie moi ee ee wk wo ee Sk ee dera 23 0 0 EOBECIDULDOES 5 a9 o oe ge ia ae ea ta a 3 ee e 23 6 7 DODOS PIC 34 o A A AN 40 609 OPERARIOS es cee rett RUE aa ao HY OES ER s 40 7 Core Team 40 ClamAV User Manual 2002 2007 Tomasz Kom 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 along with this program if not write to the Free Software Foundation Inc 51 Franklin Street Fifth Floor Boston MA 02110 1301 USA
6. 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 Aaron Begley Craig H Block Norman E Brake Jr Josh Burstyn By Design http www by design net LibClamAV EJ 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 customlogic 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 e Philip Ershler
7. www searchmain com e Olivier Silber LibClamAV EJ 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 e David Williams http kayakero net e Glenn R Williams e Kelly Williams e XRoads Networks http xroadsnetworks com e Zimbra open source collaboration suite http www zimbra com 7 Core Team EU 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
8. 20 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 EJ 3 Installation 3 1 Requirements The following elements are required to compile ClamAV e zlib and zlib devel packages e gcc compiler suite tested with 2 9x 3 x and 4 x series 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 the configuration script of GMP 3 2 Installing on shell account To install 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 your installation execute clamav bin freshclam clamav bin clamscan The disable clamav switch disables the check for existence of the clamav user and group but cla
9. 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 lt dsanchez veloxia com gt e David Santinoli lt david santinoli com gt e Vijay Sarvepalli lt vssarvep office uncg edu gt e Martin Schitter e Theo Schlossnagle lt jesus omniti com gt e Enrico Scholz lt enrico scholz informatik tu chemnitz de gt LibClamAV Karina Schwarz lt k schwarz uplink at gt Scsi lt scsi softland ru gt Dr Matthew J Seaman lt m seaman infracaninophile co uk gt Hector M Rulot Segovia lt Hector Rulot uv es gt Omer Faruk Sen lt ofsen enderunix org gt Sergey lt a_s_y sama ru gt Tuomas Silen tuomas silen nodeta fi David F Skoll lt dfs roaringpenguin com gt Al Smith lt ajs clamav aeschi ch eu org gt Sergey Smitienko lt hunter comsys com ua gt Solar Designer solar openwall com Joerg Sonnenberger lt joerg britannica bec de gt Michal GiM Spadlinski http gim org pl Kevin Spicer lt kevin kevinspicer co uk gt GertJan Spoelman lt cav gjs cc gt Ole Stanstrup ole stanstrup dk Adam Stein adam scan mc xerox com Steve steveb webtribe net Richard Stevenson richard endace com Sven Strickroth sstrickroth gym oha de Matt Sullivan lt matt sullivan gen nz gt Dr Zbigniew Szewczak lt zssz mat uni torun pl gt Joe Talbott lt josepht cstone net gt Gernot Tenchio lt g tenchio telc
10. clamscan malware zip malware zip 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 localhost tmpS clamscan no archive unzip malware zip Archive tmp malware zip inflating testl exe inflating test2 exe inflating test3 exe tmp clamav 77e7bfdbb2d3872b testl exe Worm Mydoom U FOUND tmp clamav 77e7bfdbb2d3872b test2 exe Trojan Taskkill A FOUND tmp clamav 77e7bfdbb2d3872b test3 exe Worm Nyxem D FOUND tmp 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 character 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 an
11. com au gt e Joe Maimon lt jmaimon ttec com gt 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 k1mac usadatanet com gt e Chris van Meerendonk cvm castel nl e Andrey J Melnikoff temnota kmv ru e Damian Menscher menscher uiuc edu e Denis De Messemacker ddm clamav net e Jasper Metselaar jasper formmailer net e Arkadiusz Miskiewicz lt misiek pld linux org gt e Ted Mittelstaedt tedm toybox placo com e Mark Mielke lt mark mark mielke cc gt e John Miller contact glideslopesoftware co uk e Jo Mills lt Jonathan Mills frequentis com gt LibClamAV e Dustin Mollo lt dustin 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 mueller kde org e Flinn Mueller lt flinn activeintra net gt e Hendrik Muhs Hendrik Muhs student uni magdeburg de e Simon Munton simon munton demon co uk e Farit Nabiullin http p
12. 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 CH 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 use the option stdout to redirect all program messages to stdout Warnings and error messages from libclamav 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 14 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 zolw localhost tmp
13. 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 1000 max files 6 LibClamAV 22 limits maxfilesize 10 1048576 maximum size of archived or compressed file files exceeding this limit will be ignored S 5 maximum recursion level for archives limits maxreclevel limits maxmailrec 64 maximum recursion level for mail files limits maxratio 200 maximum compression ratio 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 Wn if ret CL CLEAN printf Error s n cl strerror ret 6 4 Memory Because the engine structure consumes a few megabytes of system memory you should release it with c1 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 clamav config libs L usr local lib lz 1bz2 lgmp lpthread zolw localhost clamav config cflags I usr local include g 02
14. ction returns a statically allocated string 1f ret printf cl_load error s n cl strerror ret exit 1 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 exrE T 5 6 LibClamAV 19 6 4 Database reloading The most important thing is to 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 if cl statchkdir amp dbstat 1 reload database cl statfree amp dbstat 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 E ed int cl scanfile const char filename cons
15. d 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 UPX all versions FSG 1 5 1 31 1 53 2 0 Petite 2 x NsPack wwpack32 1 20 6 You can still use clamd or clamscan instead 6 LibClamAV MEW Upack SUE Y Oda Cryptor 1 3 6 2 2 Mail files Libclamav can handle almost every 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 SFX RAR SFX Tar Gzip Bzip2 MS OLE2 MS Cabinet Files SFX MS CHM Compiled HTML MS SZDD compression format BinHex SIS SymbianOS packages 6 2 4 Documents The most popular file formats are supported MS Office and MacOffice files RTF PDF HTML 6 LibClamAV 6 2 5 Others Libclamav can handle various obfuscators encoders files vulnerable to security risks such as e JPEG exploit detection e RIFF exploi
16. 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 lt calin ajvar org gt e Damien Curtain damien pagefault org e Krisztian Czako lt slapic linux co hu gt e Diego d Ambra da softcom dk e Michael Dankov misha btrc ru e Yuri Dario lt mc6530 mclink it gt e David lt djgardner users sourceforge net gt 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 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 oeriksson mandrakesoft com e Daniel Fahlgren lt fahlgren ardendo se gt LibClamAV 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 Forssen lt maf appgate com gt e Brian J France lt list firehawksystems com gt e Free Oscar lt freeoscar wp pl gt e Martin Fuxa lt yeti email cz gt 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 lt ph gay free fr gt e Nick Gazaloff lt nick sbin org gt e Geoff G
17. e Explido Software USA Inc http www explido us e David Farrick e Jim Feldman e Petr Ferschmann http petr ferschmann cz LibClamAV 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 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 Craig Jackson LibClamAV 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 Menez
18. es 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 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 LibClamAV ES 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 Inc 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 e Software Workshop Inc http www softwareworkshop com e Solutions In A Box http www siab com au e Stephane Rault e SearchMain http
19. ibbs 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 wkg x2 pl e Stephen Gran steve lobefin net e Koryn Grant koryn endace com e Matthew A Grant grantma anathoth gen nz e Christophe Grenier lt grenier cgsecurity org gt e Marek Gutkowski hobbit core segfault pl e Jason Haar Jason Haar trimble co nz e Hrvoje Habjanic lt hrvoje habjanic zg hinet hr gt e Michal Hajduczenia lt michalis mat uni torun pl gt LibClamAV 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 lt doozer skc com pl gt 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 Kurt 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
20. kamil kamil eisp pl gt e Alex Kah lt alex narfonix com gt e Stefan Kaltenbrunner lt stefan kaltenbrunner cc gt e Lloyd Kamara lt 1 kamara imperial ac uk gt e Stefan Kanthak stefan kanthak fujitsu siemens com e Kazuhiko lt kazuhiko fdiary net gt LibClamAV e Jeremy Kitchen lt kitchen scriptkitchen com gt e Tomasz Klim lt tomek euroneto pl gt e Robbert Kouprie robbert exx nl e Martin Kraft martin kraft fal de e Petr Kristof Kristof P fce vutbr cz e Henk Kuipers lt henk opensourcesolutions nl gt e Nigel Kukard nkukard lbsd net e Eugene Kurmanin lt smfs users sourceforge net gt e Dr Andrzej Kurpiel akurpiel mat uni torun pl e Mark Kushinsky mark mdspc com e Mike Lambert lambert jeol com e Thomas Lamy Thomas Lamy in online net e Stephane Leclerc lt sleclerc aliastec net gt e Marty Lee lt marty maui co uk gt e Dennis Leeuw dleeuw made it com e Martin Lesser admin debian bettercom de e Peter N Lewis peter stairways com au e Matt Leyda mfleyda e one com e James Lick lt jlick drivel com gt e Jerome Limozin jerome limozin net e Mike Loewen lt mloewen sturgeon cac psu edu gt e Roger Lucas roger planbit co uk e David Luyer david luyer pacific net au e Richard Lyons lt frob clamav webcentral com au gt e David S Madole lt david madole net gt LibClamAV e Thomas Madsen lt tm softcom dk gt e Bill Maidment lt bil1l maidment
21. kamorin ccs neu edu gt e Kamil Andrusz lt wizz mniam net gt e Tayfun Asker lt tasker metu edu tr gt LibClamAV 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 lt eike mail math uni mannheim de gt 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 lt bengen vdst ka inka de gt e Hank Beatty hbeatty starband net 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 e Matt Butt mattb cre8tiv com 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 LibClamAV e Andrey Cherezov lt andrey cherezov koenig su gt e Alex Cherney lt alex cher id au gt e Tom G Christensen tgc statsbiblioteket dk e Nicholas Chua nicholas ncmbox net e Chris Conn lt cconn abacom com gt
22. ks 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 because 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 HTTPProxyServer myproxyserver com HTTPProxyPort 1234 HTTPProxyUsername myusername HTTPProxyPassword mypass 5 Usage EH 4 4 1 Closest mirrors The DatabaseMirror directive in the config file specifies the database server freshclam will attempt up to MaxAttempts times to download the database from The defaul
23. mscan would still require an unprivileged account to work in a superuser mode 3 Installation 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 the 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 configure enable 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 locati
24. nnect 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 clama 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 or you will get an error 4To get more info on clamscan options run man clamscan 4 Configuration KO 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 chec
25. o tech de gt Masahiro Teramoto lt markun onohara to gt LibClamAV e Daniel Theodoro lt dtheodoro ig com br gt e Ryan Thompson clamav sasknow com 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 lt torriem chem byu edu gt e Trashware lt trashware gmx net gt e Matthew Trent lt 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 lt cewatts brainstorminternet net gt 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 e David Wu lt dyw iohk com gt e Takumi Yamane yamtak b session com e Youza Youzovic lt youza post cz gt e Anton Yuzhaninov lt citrin rambler co ru gt e Leonid Zeitlin 1z europe com 6 LibClamAV 6 7 ZMan Z x86zman go a way dyndns org Andoni Zubimendi andoni lpsat net Donors We ve received financial support from in alphabetical order Activelntra net Inc http www activeintra net Advance Healthcare Group http www ahgl com au
26. oftware ready for new features in the future versions of libclamav CL SCAN RAW Use it alone if you want to disable support for special files CL SCAN ARCHIVE This flag enables transparent scanning of various archive formats CL SCAN BLOCKENCRYPTED With this flag the library will mark encrypted archives as viruses Encrypted Zip Encrypted RAR CL SCAN BLOCKMAX Mark archives as viruses if maxfiles maxfilesize or maxreclevel limit is reached CL SCAN MAIL Enable support for mail files 6 LibClamAV EN e CLSCAN_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 default but make it optional e CLSCAN_OLE2 Enables support for OLE2 containers used by MS Office and msi files e CLSCAN_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 CLSCAN_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 e CL SCAN PHISHING DOMAINLIST Phishing module restrict URL scanning to domains from pdf RECOMMENDED e CL SCAN
27. on 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 modprobe 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 co
28. ory 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 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
29. rogram farit ru e Nemosoft Unv nemosoft smcc demon nl e Wojciech Noworyta lt wnow konarski edu pl gt 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 ondrejj salstar sk e Martijn van Oosterhout kleptog svana org e OpenAntiVirus Team http www OpenAntiVirus org e Tomasz Papszun lt tomek lodz tpsa pl gt e Eric Parsonage eric eparsonage com e Oliver Paukstadt pstadt stud fh heilbronn de LibClamAV e Christian Pelissier lt Christian Pelissier onera fr gt e Rudolph Pereira lt rudolph usyd edu au gt e Dennis Peterson lt dennispe inetnw com gt e Ed Phillips ed UDel Edu e Andreas Piesk lt Andreas Piesk heise de gt e Mark Pizzolato lt clamav devel subscriptions pizzolato net gt e Dean Plant lt dean plant roke co uk gt e Alex Pleiner lt pleiner zeitform de gt e Ant La Porte lt ant dvere net gt e Jef Poskanzer lt jef acme com gt e Christophe Poujol lt Christophe Poujol atosorigin com gt e Sergei Pronin lt sp finndesign fi gt e Thomas Quinot lt thomas cuivre fr eu org gt e Ed Ravin lt eravin panix com gt e Robert Rebbun lt robert desertsurf com gt e Brian A Reiter lt breiter wolfereiter com gt e Didi
30. t 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 reshclam 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 configurable via the clamd conf file 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 direct
31. t 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 6 LibClamAV EN Both functions will save 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 1s not NULL the functions will increase its value with the size of scanned data in CL_COUNT_PRECISION units Both functions have support for archive limits in order to protect against Denial of Service attacks stru E ct cl limits unsigned int maxreclevel maximum recursion level for archives unsigned int maxfiles maximum number of files to be scanned within a single archive d unsigned int maxmailrec maximum recursion level for mail files unsigned int maxratio maximum compression ratio unsigned long int maxfilesize compressed files larger than this limit will not be scanned Wi unsigned short archivememlim limit memory usage for some unpackers The last argument options configures the scan engine and supports the following flags that can be combined using bit operators CL_SCAN_STDOPT This is an alias for a recommended set of scan options You should use it to make your s
32. t detection e uuencode 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 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 will 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 7Remember to initialize the virus counter variable with 0 6 LibClamAV KE e CL_DB_PHISHING Load phishing signatures e CL DB PHISHING URLS Initialize the phishing detection module and load wdb and pdb files cl loadreturns 0 CL SUCCESS on success and a non 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 cl_strerror to convert error codes into human readable messages The fun
33. ted 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 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 Subscribers are not allowed to post to the mailing list 2 Base package 8 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 90 was tested on GNU Linux e Solaris FreeBSD e OpenBSD e MacOS 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
Download Pdf Manuals
Related Search
Related Contents
Séptimo - Sangre y Componentes Seguros II GUÍA RÁPIDA Pioneer F20 Operation Manual Télécharger le dossier de presse de l`année 2013 PB360G Vertical Floating Ball Holder MANUAL DO USUÁRIO RP-250 Manual 237 Holdings animatrices de groupe : théorie et pratiques Gembird A4-R8A mice Copyright © All rights reserved.
Failed to retrieve file