nicholaschua

clamd.conf

Nov 4th, 2013
147
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 17.49 KB | None | 0 0
  1. ##
  2. ## Example config file for the Clam AV daemon
  3. ## Please read the clamd.conf(5) manual before editing this file.
  4. ##
  5.  
  6.  
  7. # Comment or remove the line below.
  8. #Example
  9.  
  10. # Uncomment this option to enable logging.
  11. # LogFile must be writable for the user running daemon.
  12. # A full path is required.
  13. # Default: disabled
  14. LogFile /var/log/clamav/clamd.log
  15.  
  16. # By default the log file is locked for writing - the lock protects against
  17. # running clamd multiple times (if want to run another clamd, please
  18. # copy the configuration file, change the LogFile variable, and run
  19. # the daemon with --config-file option).
  20. # This option disables log file locking.
  21. # Default: no
  22. #LogFileUnlock yes
  23.  
  24. # Maximum size of the log file.
  25. # Value of 0 disables the limit.
  26. # You may use 'M' or 'm' for megabytes (1M = 1m = 1048576 bytes)
  27. # and 'K' or 'k' for kilobytes (1K = 1k = 1024 bytes). To specify the size
  28. # in bytes just don't use modifiers. If LogFileMaxSize is enabled, log
  29. # rotation (the LogRotate option) will always be enabled.
  30. # Default: 1M
  31. LogFileMaxSize 0
  32.  
  33. # Log time with each message.
  34. # Default: no
  35. LogTime yes
  36.  
  37. # Also log clean files. Useful in debugging but drastically increases the
  38. # log size.
  39. # Default: no
  40. #LogClean yes
  41.  
  42. # Use system logger (can work together with LogFile).
  43. # Default: no
  44. LogSyslog yes
  45.  
  46. # Specify the type of syslog messages - please refer to 'man syslog'
  47. # for facility names.
  48. # Default: LOG_LOCAL6
  49. #LogFacility LOG_MAIL
  50.  
  51. # Enable verbose logging.
  52. # Default: no
  53. #LogVerbose yes
  54.  
  55. # Enable log rotation. Always enabled when LogFileMaxSize is enabled.
  56. # Default: no
  57. #LogRotate yes
  58.  
  59. # Log additional information about the infected file, such as its
  60. # size and hash, together with the virus name.
  61. #ExtendedDetectionInfo yes
  62.  
  63. # This option allows you to save a process identifier of the listening
  64. # daemon (main thread).
  65. # Default: disabled
  66. PidFile /var/run/clamav/clamd.pid
  67.  
  68. # Optional path to the global temporary directory.
  69. # Default: system specific (usually /tmp or /var/tmp).
  70. TemporaryDirectory /var/tmp
  71.  
  72. # Path to the database directory.
  73. # Default: hardcoded (depends on installation options)
  74. DatabaseDirectory /var/clamav
  75.  
  76. # Only load the official signatures published by the ClamAV project.
  77. # Default: no
  78. #OfficialDatabaseOnly no
  79.  
  80. # The daemon can work in local mode, network mode or both.
  81. # Due to security reasons we recommend the local mode.
  82.  
  83. # Path to a local socket file the daemon will listen on.
  84. # Default: disabled (must be specified by a user)
  85. LocalSocket /var/run/clamav/clamd.sock
  86.  
  87. # Sets the group ownership on the unix socket.
  88. # Default: disabled (the primary group of the user running clamd)
  89. #LocalSocketGroup virusgroup
  90.  
  91. # Sets the permissions on the unix socket to the specified mode.
  92. # Default: disabled (socket is world accessible)
  93. #LocalSocketMode 660
  94.  
  95. # Remove stale socket after unclean shutdown.
  96. # Default: yes
  97. FixStaleSocket yes
  98.  
  99. # TCP port address.
  100. # Default: no
  101. TCPSocket 3310
  102.  
  103. # TCP address.
  104. # By default we bind to INADDR_ANY, probably not wise.
  105. # Enable the following to provide some degree of protection
  106. # from the outside world.
  107. # Default: no
  108. TCPAddr 127.0.0.1
  109.  
  110. # Maximum length the queue of pending connections may grow to.
  111. # Default: 200
  112. MaxConnectionQueueLength 30
  113.  
  114. # Clamd uses FTP-like protocol to receive data from remote clients.
  115. # If you are using clamav-milter to balance load between remote clamd daemons
  116. # on firewall servers you may need to tune the options below.
  117.  
  118. # Close the connection when the data size limit is exceeded.
  119. # The value should match your MTA's limit for a maximum attachment size.
  120. # Default: 25M
  121. #StreamMaxLength 10M
  122.  
  123. # Limit port range.
  124. # Default: 1024
  125. #StreamMinPort 30000
  126. # Default: 2048
  127. #StreamMaxPort 32000
  128.  
  129. # Maximum number of threads running at the same time.
  130. # Default: 10
  131. MaxThreads 50
  132.  
  133. # Waiting for data from a client socket will timeout after this time (seconds).
  134. # Default: 120
  135. ReadTimeout 300
  136.  
  137. # This option specifies the time (in seconds) after which clamd should
  138. # timeout if a client doesn't provide any initial command after connecting.
  139. # Default: 5
  140. #CommandReadTimeout 5
  141.  
  142. # This option specifies how long to wait (in miliseconds) if the send buffer is full.
  143. # Keep this value low to prevent clamd hanging
  144. #
  145. # Default: 500
  146. #SendBufTimeout 200
  147.  
  148. # Maximum number of queued items (including those being processed by MaxThreads threads)
  149. # It is recommended to have this value at least twice MaxThreads if possible.
  150. # WARNING: you shouldn't increase this too much to avoid running out of file descriptors,
  151. # the following condition should hold:
  152. # MaxThreads*MaxRecursion + (MaxQueue - MaxThreads) + 6< RLIMIT_NOFILE (usual max is 1024)
  153. #
  154. # Default: 100
  155. #MaxQueue 200
  156.  
  157. # Waiting for a new job will timeout after this time (seconds).
  158. # Default: 30
  159. #IdleTimeout 60
  160.  
  161. # Don't scan files and directories matching regex
  162. # This directive can be used multiple times
  163. # Default: scan all
  164. #ExcludePath ^/proc/
  165. #ExcludePath ^/sys/
  166.  
  167. # Maximum depth directories are scanned at.
  168. # Default: 15
  169. #MaxDirectoryRecursion 20
  170.  
  171. # Follow directory symlinks.
  172. # Default: no
  173. #FollowDirectorySymlinks yes
  174.  
  175. # Follow regular file symlinks.
  176. # Default: no
  177. #FollowFileSymlinks yes
  178.  
  179. # Scan files and directories on other filesystems.
  180. # Default: yes
  181. #CrossFilesystems yes
  182.  
  183. # Perform a database check.
  184. # Default: 600 (10 min)
  185. #SelfCheck 600
  186.  
  187. # Execute a command when virus is found. In the command string %v will
  188. # be replaced with the virus name.
  189. # Default: no
  190. #VirusEvent /usr/local/bin/send_sms 123456789 "VIRUS ALERT: %v"
  191.  
  192. # Run as another user (clamd must be started by root for this option to work)
  193. # Default: don't drop privileges
  194. User clamav
  195.  
  196. # Initialize supplementary group access (clamd must be started by root).
  197. # Default: no
  198. AllowSupplementaryGroups yes
  199.  
  200. # Stop daemon when libclamav reports out of memory condition.
  201. #ExitOnOOM yes
  202.  
  203. # Don't fork into background.
  204. # Default: no
  205. #Foreground yes
  206.  
  207. # Enable debug messages in libclamav.
  208. # Default: no
  209. #Debug yes
  210.  
  211. # Do not remove temporary files (for debug purposes).
  212. # Default: no
  213. #LeaveTemporaryFiles yes
  214.  
  215. # Permit use of the ALLMATCHSCAN command. If set to no, clamd will reject
  216. # any ALLMATCHSCAN command as invalid.
  217. # Default: yes
  218. #AllowAllMatchScan no
  219.  
  220. # Detect Possibly Unwanted Applications.
  221. # Default: no
  222. #DetectPUA yes
  223.  
  224. # Exclude a specific PUA category. This directive can be used multiple times.
  225. # See http://www.clamav.net/support/pua for the complete list of PUA
  226. # categories.
  227. # Default: Load all categories (if DetectPUA is activated)
  228. #ExcludePUA NetTool
  229. #ExcludePUA PWTool
  230.  
  231. # Only include a specific PUA category. This directive can be used multiple
  232. # times.
  233. # Default: Load all categories (if DetectPUA is activated)
  234. #IncludePUA Spy
  235. #IncludePUA Scanner
  236. #IncludePUA RAT
  237.  
  238. # In some cases (eg. complex malware, exploits in graphic files, and others),
  239. # ClamAV uses special algorithms to provide accurate detection. This option
  240. # controls the algorithmic detection.
  241. # Default: yes
  242. #AlgorithmicDetection yes
  243.  
  244.  
  245. ##
  246. ## Executable files
  247. ##
  248.  
  249. # PE stands for Portable Executable - it's an executable file format used
  250. # in all 32 and 64-bit versions of Windows operating systems. This option allows
  251. # ClamAV to perform a deeper analysis of executable files and it's also
  252. # required for decompression of popular executable packers such as UPX, FSG,
  253. # and Petite. If you turn off this option, the original files will still be
  254. # scanned, but without additional processing.
  255. # Default: yes
  256. ScanPE yes
  257.  
  258. # Certain PE files contain an authenticode signature. By default, we check
  259. # the signature chain in the PE file against a database of trusted and
  260. # revoked certificates if the file being scanned is marked as a virus.
  261. # If any certificate in the chain validates against any trusted root, but
  262. # does not match any revoked certificate, the file is marked as whitelisted.
  263. # If the file does match a revoked certificate, the file is marked as virus.
  264. # The following setting completely turns off authenticode verification.
  265. # Default: no
  266. #DisableCertCheck yes
  267.  
  268. # Executable and Linking Format is a standard format for UN*X executables.
  269. # This option allows you to control the scanning of ELF files.
  270. # If you turn off this option, the original files will still be scanned, but
  271. # without additional processing.
  272. # Default: yes
  273. ScanELF yes
  274.  
  275. # With this option clamav will try to detect broken executables (both PE and
  276. # ELF) and mark them as Broken.Executable.
  277. # Default: no
  278. DetectBrokenExecutables yes
  279.  
  280.  
  281. ##
  282. ## Documents
  283. ##
  284.  
  285. # This option enables scanning of OLE2 files, such as Microsoft Office
  286. # documents and .msi files.
  287. # If you turn off this option, the original files will still be scanned, but
  288. # without additional processing.
  289. # Default: yes
  290. ScanOLE2 yes
  291.  
  292.  
  293. # With this option enabled OLE2 files with VBA macros, which were not
  294. # detected by signatures will be marked as "Heuristics.OLE2.ContainsMacros".
  295. # Default: no
  296. #OLE2BlockMacros no
  297.  
  298. # This option enables scanning within PDF files.
  299. # If you turn off this option, the original files will still be scanned, but
  300. # without decoding and additional processing.
  301. # Default: yes
  302. #ScanPDF yes
  303.  
  304. # This option enables scanning within SWF files.
  305. # If you turn off this option, the original files will still be scanned, but
  306. # without decoding and additional processing.
  307. # Default: yes
  308. #ScanSWF yes
  309.  
  310.  
  311. ##
  312. ## Mail files
  313. ##
  314.  
  315. # Enable internal e-mail scanner.
  316. # If you turn off this option, the original files will still be scanned, but
  317. # without parsing individual messages/attachments.
  318. # Default: yes
  319. ScanMail yes
  320.  
  321. # Scan RFC1341 messages split over many emails.
  322. # You will need to periodically clean up $TemporaryDirectory/clamav-partial directory.
  323. # WARNING: This option may open your system to a DoS attack.
  324. # Never use it on loaded servers.
  325. # Default: no
  326. #ScanPartialMessages yes
  327.  
  328.  
  329. # With this option enabled ClamAV will try to detect phishing attempts by using
  330. # signatures.
  331. # Default: yes
  332. #PhishingSignatures yes
  333.  
  334. # Scan URLs found in mails for phishing attempts using heuristics.
  335. # Default: yes
  336. #PhishingScanURLs yes
  337.  
  338. # Always block SSL mismatches in URLs, even if the URL isn't in the database.
  339. # This can lead to false positives.
  340. #
  341. # Default: no
  342. #PhishingAlwaysBlockSSLMismatch no
  343.  
  344. # Always block cloaked URLs, even if URL isn't in database.
  345. # This can lead to false positives.
  346. #
  347. # Default: no
  348. #PhishingAlwaysBlockCloak no
  349.  
  350. # Allow heuristic match to take precedence.
  351. # When enabled, if a heuristic scan (such as phishingScan) detects
  352. # a possible virus/phish it will stop scan immediately. Recommended, saves CPU
  353. # scan-time.
  354. # When disabled, virus/phish detected by heuristic scans will be reported only at
  355. # the end of a scan. If an archive contains both a heuristically detected
  356. # virus/phish, and a real malware, the real malware will be reported
  357. #
  358. # Keep this disabled if you intend to handle "*.Heuristics.*" viruses
  359. # differently from "real" malware.
  360. # If a non-heuristically-detected virus (signature-based) is found first,
  361. # the scan is interrupted immediately, regardless of this config option.
  362. #
  363. # Default: no
  364. #HeuristicScanPrecedence yes
  365.  
  366. ##
  367. ## Data Loss Prevention (DLP)
  368. ##
  369.  
  370. # Enable the DLP module
  371. # Default: No
  372. #StructuredDataDetection yes
  373.  
  374. # This option sets the lowest number of Credit Card numbers found in a file
  375. # to generate a detect.
  376. # Default: 3
  377. #StructuredMinCreditCardCount 5
  378.  
  379. # This option sets the lowest number of Social Security Numbers found
  380. # in a file to generate a detect.
  381. # Default: 3
  382. #StructuredMinSSNCount 5
  383.  
  384. # With this option enabled the DLP module will search for valid
  385. # SSNs formatted as xxx-yy-zzzz
  386. # Default: yes
  387. #StructuredSSNFormatNormal yes
  388.  
  389. # With this option enabled the DLP module will search for valid
  390. # SSNs formatted as xxxyyzzzz
  391. # Default: no
  392. #StructuredSSNFormatStripped yes
  393.  
  394.  
  395. ##
  396. ## HTML
  397. ##
  398.  
  399. # Perform HTML normalisation and decryption of MS Script Encoder code.
  400. # Default: yes
  401. # If you turn off this option, the original files will still be scanned, but
  402. # without additional processing.
  403. #ScanHTML yes
  404.  
  405.  
  406. ##
  407. ## Archives
  408. ##
  409.  
  410. # ClamAV can scan within archives and compressed files.
  411. # If you turn off this option, the original files will still be scanned, but
  412. # without unpacking and additional processing.
  413. # Default: yes
  414. ScanArchive yes
  415.  
  416. # Mark encrypted archives as viruses (Encrypted.Zip, Encrypted.RAR).
  417. # Default: no
  418. ArchiveBlockEncrypted no
  419.  
  420.  
  421. ##
  422. ## Limits
  423. ##
  424.  
  425. # The options below protect your system against Denial of Service attacks
  426. # using archive bombs.
  427.  
  428. # This option sets the maximum amount of data to be scanned for each input file.
  429. # Archives and other containers are recursively extracted and scanned up to this
  430. # value.
  431. # Value of 0 disables the limit
  432. # Note: disabling this limit or setting it too high may result in severe damage
  433. # to the system.
  434. # Default: 100M
  435. #MaxScanSize 150M
  436.  
  437. # Files larger than this limit won't be scanned. Affects the input file itself
  438. # as well as files contained inside it (when the input file is an archive, a
  439. # document or some other kind of container).
  440. # Value of 0 disables the limit.
  441. # Note: disabling this limit or setting it too high may result in severe damage
  442. # to the system.
  443. # Default: 25M
  444. #MaxFileSize 30M
  445.  
  446. # Nested archives are scanned recursively, e.g. if a Zip archive contains a RAR
  447. # file, all files within it will also be scanned. This options specifies how
  448. # deeply the process should be continued.
  449. # Note: setting this limit too high may result in severe damage to the system.
  450. # Default: 16
  451. #MaxRecursion 10
  452.  
  453. # Number of files to be scanned within an archive, a document, or any other
  454. # container file.
  455. # Value of 0 disables the limit.
  456. # Note: disabling this limit or setting it too high may result in severe damage
  457. # to the system.
  458. # Default: 10000
  459. #MaxFiles 15000
  460.  
  461. # Maximum size of a file to check for embedded PE. Files larger than this value
  462. # will skip the additional analysis step.
  463. # Note: disabling this limit or setting it too high may result in severe damage
  464. # to the system.
  465. # Default: 10M
  466. #MaxEmbeddedPE 10M
  467.  
  468. # Maximum size of a HTML file to normalize. HTML files larger than this value
  469. # will not be normalized or scanned.
  470. # Note: disabling this limit or setting it too high may result in severe damage
  471. # to the system.
  472. # Default: 10M
  473. #MaxHTMLNormalize 10M
  474.  
  475. # Maximum size of a normalized HTML file to scan. HTML files larger than this
  476. # value after normalization will not be scanned.
  477. # Note: disabling this limit or setting it too high may result in severe damage
  478. # to the system.
  479. # Default: 2M
  480. #MaxHTMLNoTags 2M
  481.  
  482. # Maximum size of a script file to normalize. Script content larger than this
  483. # value will not be normalized or scanned.
  484. # Note: disabling this limit or setting it too high may result in severe damage
  485. # to the system.
  486. # Default: 5M
  487. #MaxScriptNormalize 5M
  488.  
  489. # Maximum size of a ZIP file to reanalyze type recognition. ZIP files larger
  490. # than this value will skip the step to potentially reanalyze as PE.
  491. # Note: disabling this limit or setting it too high may result in severe damage
  492. # to the system.
  493. # Default: 1M
  494. #MaxZipTypeRcg 1M
  495.  
  496.  
  497. ##
  498. ## Clamuko settings
  499. ##
  500.  
  501. # Enable Clamuko. Dazuko must be configured and running. Clamuko supports
  502. # both Dazuko (/dev/dazuko) and DazukoFS (/dev/dazukofs.ctrl). DazukoFS
  503. # is the preferred option. For more information please visit www.dazuko.org
  504. # Default: no
  505. #ClamukoScanOnAccess yes
  506.  
  507. # The number of scanner threads that will be started (DazukoFS only).
  508. # Having multiple scanner threads allows Clamuko to serve multiple
  509. # processes simultaneously. This is particularly beneficial on SMP machines.
  510. # Default: 3
  511. #ClamukoScannerCount 3
  512.  
  513. # Don't scan files larger than ClamukoMaxFileSize
  514. # Value of 0 disables the limit.
  515. # Default: 5M
  516. #ClamukoMaxFileSize 10M
  517.  
  518. # Set access mask for Clamuko (Dazuko only).
  519. # Default: no
  520. #ClamukoScanOnOpen yes
  521. #ClamukoScanOnClose yes
  522. #ClamukoScanOnExec yes
  523.  
  524. # Set the include paths (all files inside them will be scanned). You can have
  525. # multiple ClamukoIncludePath directives but each directory must be added
  526. # in a seperate line. (Dazuko only)
  527. # Default: disabled
  528. #ClamukoIncludePath /home
  529. #ClamukoIncludePath /students
  530.  
  531. # Set the exclude paths. All subdirectories are also excluded. (Dazuko only)
  532. # Default: disabled
  533. #ClamukoExcludePath /home/bofh
  534.  
  535. # With this option you can whitelist specific UIDs. Processes with these UIDs
  536. # will be able to access all files.
  537. # This option can be used multiple times (one per line).
  538. # Default: disabled
  539. #ClamukoExcludeUID 0
  540.  
  541. # With this option enabled ClamAV will load bytecode from the database.
  542. # It is highly recommended you keep this option on, otherwise you'll miss detections for many new viruses.
  543. # Default: yes
  544. #Bytecode yes
  545.  
  546. # Set bytecode security level.
  547. # Possible values:
  548. # None - no security at all, meant for debugging. DO NOT USE THIS ON PRODUCTION SYSTEMS
  549. # This value is only available if clamav was built with --enable-debug!
  550. # TrustSigned - trust bytecode loaded from signed .c[lv]d files,
  551. # insert runtime safety checks for bytecode loaded from other sources
  552. # Paranoid - don't trust any bytecode, insert runtime checks for all
  553. # Recommended: TrustSigned, because bytecode in .cvd files already has these checks
  554. # Note that by default only signed bytecode is loaded, currently you can only
  555. # load unsigned bytecode in --enable-debug mode.
  556. #
  557. # Default: TrustSigned
  558. #BytecodeSecurity TrustSigned
  559.  
  560. # Set bytecode timeout in miliseconds.
  561. #
  562. # Default: 5000
  563. # BytecodeTimeout 1000
Advertisement
Add Comment
Please, Sign In to add comment