And another
[mirror/dsa-puppet.git] / modules / samhain / files / common / samhainrc
1 #####################################################################
2 #
3 # Configuration file template for samhain.
4 #
5 #####################################################################
6
7 # -- empty lines and lines starting with '#', ';' or '//' are ignored
8 # -- boolean options can be Yes/No or True/False or 1/0 
9 # -- you can PGP clearsign this file -- samhain will check (if compiled
10 #    with support) or otherwise ignore the signature
11 # -- CHECK mail address
12 #
13 # To each log facility, you can assign a threshold severity. Only
14 # reports with at least the threshold severity will be logged
15 # to the respective facility (even further below).
16 #
17 #####################################################################
18 #
19 # SETUP for file system checking:
20
21 # (i)   There are several policies, each has its own section. Put files
22 #       into the section for the appropriate policy (see below).
23 # (ii)  Section [EventSeverity]: 
24 #       To each policy, you can assign a severity (further below).
25 # (iii) Section [Log]: 
26 #       To each log facility, you can assign a threshold severity. Only
27 #       reports with at least the threshold severity will be logged
28 #       to the respective facility (even further below).
29 #
30 #####################################################################
31
32 #####################################################################
33 #
34 # Files are defined with: file = /absolute/path
35 #
36 # Directories are defined with:                  dir = /absolute/path
37 # or with an optional recursion depth (N <= 99): dir = N/absolute/path
38 #
39 # Directory inodes are checked. If you only want to check files
40 # in a directory, but not the directory inode itself, use (e.g.):
41 #
42 # [ReadOnly]
43 # dir = /some/directory
44 # [IgnoreAll]
45 # file = /some/directory
46 #
47 # You can use shell-style globbing patterns, like: file = /path/foo*
48
49 ######################################################################
50
51 [Misc]
52 ##
53 ## Add or subtract tests from the policies
54 ## - if you want to change their definitions,
55 ##   you need to do that before using the policies
56 ##
57 # RedefReadOnly = (no default)
58 # RedefAttributes=(no default)
59 # RedefLogFiles=(no default)
60 # RedefGrowingLogFiles=(no default)
61 # RedefIgnoreAll=(no default)
62 # RedefIgnoreNone=(no default)
63 # RedefUser0=(no default)
64 # RedefUser1=(no default)
65
66 [Attributes]
67 ##
68 ## for these files, only changes in permissions and ownership are checked
69 ##
70 file=/etc/mtab
71 file=/etc/ssh_random_seed
72 file=/etc/asound.conf
73 file=/etc/resolv.conf
74 file=/etc/localtime
75 file=/etc/ioctl.save
76 file=/etc/passwd.backup
77 file=/etc/shadow.backup
78 file=/etc/postfix/prng_exch
79 file=/etc/adjtime
80 file=/etc/lvm/.cache
81 file=/etc/network/run/ifstate
82 file=/var/state/samhain/samhain_file
83 file=/etc/bind/db.debian.net
84 file=/etc/exim4/bsmtp
85
86
87 #
88 # There are files in /etc that might change, thus changing the directory
89 # timestamps. Put it here as 'file', and in the ReadOnly section as 'dir'.
90 #
91 file=/etc
92 file=/etc/ssh
93 file=/etc/network/run
94 file=/etc/bind
95
96 # These are the directories for the files we handle with puppet
97 file=/etc/samhain
98 file=/etc/munin
99 file=/etc/exim4
100 file=/etc/apt/apt.conf.d
101 file=/etc/apt/sources.list.d
102 file=/etc/puppet
103 file=/etc/default
104
105 [LogFiles]
106 ##
107 ## for these files, changes in signature, timestamps, and size are ignored 
108 ##
109 file=/var/run/utmp
110 file=/etc/motd
111
112
113
114 #####################################################################
115 #
116 # This would be the proper syntax for parts that should only be
117 #    included for certain hosts.
118 # You may enclose anything in a @HOSTNAME/@end bracket, as long as the
119 #    result still has the proper syntax for the config file.
120 # You may have any number of @HOSTNAME/@end brackets.
121 # HOSTNAME should be the fully qualified 'official' name 
122 #    (e.g. 'nixon.watergate.com', not 'nixon'), no aliases. 
123 #    No IP number - except if samhain cannot determine the 
124 #    fully qualified hostname.
125 #
126 # @HOSTNAME
127 # file=/foo/bar
128 # @end
129 #
130 # These are two examples for conditional inclusion/exclusion
131 # of a machine based on the output from 'uname -srm'
132 #
133 # $Linux:2.*.7:i666
134 # file=/foo/bar3
135 # $end
136 #
137 # !$Linux:2.*.7:i686
138 # file=/foo/bar2
139 # $end
140 #
141 #####################################################################
142
143 [GrowingLogFiles]
144 ##
145 ## for these files, changes in signature, timestamps, and increase in size
146 ##                  are ignored 
147 ##
148 file=/var/log/warn
149 file=/var/log/messages
150 file=/var/log/wtmp
151 file=/var/log/faillog
152 file=/var/log/auth.log
153 file=/var/log/daemon.log
154 file=/var/log/user.log
155 file=/var/log/kern.log
156 file=/var/log/syslog
157
158
159 [IgnoreAll]
160 ##
161 ## for these files, no modifications are reported
162 ##
163 ## This file might be created or removed by the system sometimes.
164 ##
165 file=/etc/resolv.conf.pcmcia.save
166 file=/etc/nologin
167 file=/etc/postfix/debian.db
168 file=/etc/postfix/debian
169 file=/etc/ssh/ssh_known_hosts
170 file=/etc/ssh/ssh-rsa-shadow
171 file=/var/lib/misc/ssh-rsa-shadow
172 file=/etc/.da-backup.trace
173 file=/etc/postfix/debianhosts
174 file=/etc/postfix/debianhosts.db
175
176 # We handle these files with puppet - please to not be bothering us
177 file=/etc/samhain/samhainrc
178 file=/etc/munin/munin-node.conf
179 file=/etc/exim4/blacklist
180 file=/etc/exim4/callout_users
181 file=/etc/exim4/exim4.conf
182 file=/etc/exim4/grey_users
183 file=/etc/exim4/helo-check
184 file=/etc/exim4/locals
185 file=/etc/exim4/localusers
186 file=/etc/exim4/rbllist
187 file=/etc/exim4/rcpthosts
188 file=/etc/exim4/rhsbllist
189 file=/etc/exim4/virtualdomains
190 file=/etc/exim4/whitelist
191 file=/etc/apt/sources.list.d/volatile.list
192 file=/etc/apt/sources.list.d/security.list
193 file=/etc/apt/sources.list.d/debian.org.list
194 file=/etc/apt/sources.list.d/debian.restricted.list
195 file=/etc/apt/sources.list.d/debian.list
196 file=/etc/apt/sources.list.d/backports.org.list
197 file=/etc/apt/apt.conf.d/local-recommends
198 file=/etc/puppet/puppet.conf
199 file=/etc/default/puppet
200
201 [IgnoreNone]
202 ##
203 ## for these files, all modifications (even access time) are reported
204 ##    - you may create some interesting-looking file (like /etc/safe_passwd),
205 ##      just to watch whether someone will access it ...
206 ##
207
208 [Prelink]
209 ##
210 ## Use for prelinked files or directories holding them
211 ##
212
213
214 [ReadOnly]
215 ##
216 ## for these files, only access time is ignored
217 ##
218 dir=/usr/bin
219 dir=/bin
220 dir=/boot
221 #
222 # SuSE (old) has the boot init scripts in /sbin/init.d/*, 
223 # so we go 3 levels deep
224 #
225 dir=3/sbin
226 dir=/usr/sbin
227 dir=/lib
228 dir=3/usr/lib
229 #
230 # RedHat and Debian have the bootinit scripts in /etc/init.d/* or /etc/rc.d/*, 
231 #        so we go 3 levels deep there too
232 #
233 dir=3/etc
234
235 # Various directories / files that may include / be SUID/SGID binaries
236 #
237 #
238 file=/usr/lib/pt_chown
239 # X11, in Debian X7 this is now a symlink
240 #dir=/usr/X11R6/bin
241 #dir=/usr/X11R6/lib/X11/xmcd/bin
242 # Apache:
243 #file=/usr/lib/apache/suexec
244 #file=/usr/lib/apache/suexec.disabled
245 # Extra directories:
246 #dir=/opt/gnome/bin
247 #dir=/opt/kde/bin
248
249 [User0]
250 [User1]
251 ## User0 and User1 are sections for files/dirs with user-definable checking
252 ## (see the manual) 
253
254
255 [EventSeverity]
256 ##
257 ## Here you can assign severities to policy violations.
258 ## If this severity exceeds the treshold of a log facility (see below),
259 ## a policy violation will be logged to that facility.
260 ##
261 ## Severity for verification failures.
262 ##
263 # SeverityReadOnly=crit
264 # SeverityLogFiles=crit
265 # SeverityGrowingLogs=crit
266 # SeverityIgnoreNone=crit
267 # SeverityAttributes=crit
268 # SeverityUser0=crit
269 # SeverityUser1=crit
270
271 # Default behaviour
272 SeverityReadOnly=crit
273 SeverityLogFiles=crit
274 SeverityGrowingLogs=warn
275 SeverityIgnoreNone=crit
276 SeverityAttributes=crit
277
278
279 ##
280 ## We have a file in IgnoreAll that might or might not be present.
281 ## Setting the severity to 'info' prevents messages about deleted/new file.
282 ##
283 # SeverityIgnoreAll=crit
284 SeverityIgnoreAll=info
285
286 ## Files : file access problems
287 # SeverityFiles=crit
288
289 ## Dirs  : directory access problems
290 # SeverityDirs=crit
291
292 ## Names : suspect (non-printable) characters in a pathname
293 # SeverityNames=crit
294
295 # Default behaviour
296 SeverityFiles=crit
297 SeverityDirs=crit
298 SeverityNames=warn
299
300
301 [Log]
302 ##
303 ## Switch on/OFF log facilities and set their threshold severity
304 ##
305 ## Values: debug, info, notice, warn, mark, err, crit, alert, none.
306 ## 'mark' is used for timestamps.
307 ##
308 ##
309 ## Use 'none' to SWITCH OFF a log facility
310 ## 
311 ## By default, everything equal to and above the threshold is logged.
312 ## The specifiers '*', '!', and '=' are interpreted as  
313 ## 'all', 'all but', and 'only', respectively (like syslogd(8) does, 
314 ## at least on Linux). Examples:
315 ## MailSeverity=*
316 ## MailSeverity=!warn
317 ## MailSeverity==crit
318
319 ## E-mail
320 ##
321 # MailSeverity=none
322
323 ## Console
324 ##
325 # PrintSeverity=info
326
327 ## Logfile
328 ##
329 # LogSeverity=mark
330
331 ## Syslog
332 ##
333 # SyslogSeverity=none
334
335 ## Remote server (yule)
336 ##
337 # ExportSeverity=none
338
339 ## External script or program
340 ##
341 # ExternalSeverity = none
342
343 ## Logging to a database
344 ##
345 # DatabaseSeverity = none
346
347 # Default behaviour
348 MailSeverity=crit
349 PrintSeverity=none
350 LogSeverity=info
351 SyslogSeverity=alert
352 ExportSeverity=none
353
354
355
356
357
358 #####################################################
359 #
360 # Optional modules
361 #
362 #####################################################
363
364 # [SuidCheck]
365 ##
366 ## --- Check the filesystem for SUID/SGID binaries
367 ## 
368
369 ## Switch on
370 #
371 # SuidCheckActive = yes
372
373 ## Interval for check (seconds)
374 #
375 # SuidCheckInterval = 7200
376
377 ## Alternative: crontab-like schedule
378 #
379 # SuidCheckSchedule = NULL
380  
381 ## Directory to exclude 
382 #
383 # SuidCheckExclude = NULL
384
385 ## Limit on files per second (0 == no limit)
386 #
387 # SuidCheckFps = 0
388
389 ## Alternative: yield after every file
390 #
391 # SuidCheckYield = no
392
393 ## Severity of a detection
394 #
395 # SeveritySuidCheck = crit
396
397 ## Quarantine SUID/SGID files if found
398 #
399 # SuidCheckQuarantineFiles = yes
400
401 ## Method for Quarantining files:
402 #  0 - Delete or truncate the file.
403 #  1 - Remove SUID/SGID permissions from file.
404 #  2 - Move SUID/SGID file to quarantine dir.
405 #
406 # SuidCheckQuarantineMethod = 0
407
408 ## For method 1 and 3, really delete instead of truncating
409
410 # SuidCheckQuarantineDelete = yes
411
412 # [Kernel]
413 ##
414 ## --- Check for loadable kernel module rootkits (Linux/FreeBSD only) 
415 ##
416
417 ## Switch on/off
418 #
419 KernelCheckActive = True
420
421 ## Check interval (seconds); btw., the check is VERY fast
422 #
423 # KernelCheckInterval = 300
424
425 ## Severity
426 #
427 # SeverityKernel = crit
428
429
430 # [Utmp]
431 ##
432 ## --- Logging of login/logout events
433 ##
434
435 ## Switch on/off
436 #
437 LoginCheckActive = True
438
439 ## Severity for logins, multiple logins, logouts
440
441 # SeverityLogin=info
442 # SeverityLoginMulti=warn
443 # SeverityLogout=info
444
445 ## Interval for login/logout checks
446 #
447 # LoginCheckInterval = 300
448
449
450 # [Database]
451 ##
452 ## --- Logging to a relational database
453 ##
454
455 ## Database name
456 #
457 # SetDBName = samhain
458
459 ## Database table
460 #
461 # SetDBTable = log
462
463 ## Database user
464 #
465 # SetDBUser = samhain
466
467 ## Database password
468 #
469 # SetDBPassword = (default: none)
470
471 ## Database host
472 #
473 # SetDBHost = localhost
474
475 ## Log the server timestamp for received messages
476 #
477 # SetDBServerTstamp = True
478
479 ## Use a persistent connection
480 #
481 # UsePersistent = True
482
483 # [External]
484 ##
485 ## Interface to call external scripts/programs for logging
486 ##
487
488 ## The absolute path to the command
489 ## - Each invocation of this directive will end the definition of the
490 ##   preceding command, and start the definition of 
491 ##   an additional, new command
492 #
493 # OpenCommand = (no default)
494
495 ## Type (log or rv)
496 ## - log for log messages, srv for messages received by the server
497 #
498 # SetType = log
499
500 ## The command (full command line) to execute
501 #
502 # SetCommandLine = (no default)
503
504 ## The environment (KEY=value; repeat for more)
505 #
506 # SetEnviron = TZ=(your timezone)
507
508 ## The TIGER192 checksum (optional)
509 #
510 # SetChecksum = (no default)
511
512 ## User who runs the command
513 #
514 # SetCredentials = (default: samhain process uid)
515
516 ## Words not allowed in message
517 #
518 # SetFilterNot = (none)
519
520 ## Words required (ALL of them)
521 #
522 # SetFilterAnd = (none)
523
524 ## Words required (at least one)
525 #
526 # SetFilterOr = (none)
527
528 ## Deadtime between consecutive calls
529 #
530 # SetDeadtime = 0
531
532 ## Add default environment (HOME, PATH, SHELL)
533 #
534 # SetDefault = no
535
536
537 #####################################################
538 #
539 # Miscellaneous configuration options
540 #
541 #####################################################
542
543 [Misc]
544
545 ## whether to become a daemon process
546 ## (this is not honoured on database initialisation)
547 #
548 # Daemon = no
549 Daemon = yes
550
551 ## whether to test signature of files (init/check/none)
552 ## - if 'none', then we have to decide this on the command line -
553 #
554 # ChecksumTest = none
555 ChecksumTest=check
556
557 ## whether to drop linux capabilities that are not required
558 ## - will make a root process a 'mere mortal' in many respects
559 #
560 # UseCaps = yes
561
562 ## Set nice level (-19 to 19, see 'man nice'),
563 ## and I/O limit (kilobytes per second; 0 == off)
564 ## to reduce load on host.
565 #
566 # SetNiceLevel = 0
567 # SetIOLimit = 0
568
569 ## The version string to embed in file signature databases
570 #
571 # VersionString = NULL
572
573 ## Interval between time stamp messages
574 #
575 # SetLoopTime = 60
576 SetLoopTime = 600
577
578 ## Interval between file checks 
579 #
580 # SetFileCheckTime = 600
581 SetFileCheckTime = 7200
582
583 ## Alternative: crontab-like schedule
584 #
585 # FileCheckScheduleOne = NULL
586
587 ## Alternative: crontab-like schedule(2)
588 #
589 # FileCheckScheduleTwo = NULL
590
591 ## Report only once on modified fles 
592 ## Setting this to 'FALSE' will generate a report for any policy 
593 ## violation (old and new ones) each time the daemon checks the file system.
594 #
595 # ReportOnlyOnce = True
596
597 ## Report in full detail
598 #
599 # ReportFullDetail = False
600
601 ## Report file timestamps in local time rather than GMT
602 #
603 # UseLocalTime = No
604
605 ## The console device (can also be a file or named pipe)
606 ## - There are two console devices. Accordingly, you can use
607 ##   this directive a second time to set the second console device.
608 ##   If you have not defined the second device at compile time,
609 ##   and you don't want to use it, then:
610 ##   setting it to /dev/null is less effective than just leaving
611 ##   it alone (setting to /dev/null will waste time by opening
612 ##   /dev/null and writing to it)
613 #
614 # SetConsole = /dev/console
615
616 ## Activate the SysV IPC message queue
617 #
618 # MessageQueueActive = False
619
620
621 ## If false, skip reverse lookup when connecting to a host known 
622 ## by name rather than IP address (i.e. trust the DNS)
623 #
624 # SetReverseLookup = True
625
626 ## --- E-Mail ---
627
628 # Only highest-level (alert) reports will be mailed immediately,
629 # others will be queued. Here you can define, when the queue will
630 # be flushed (Note: the queue is automatically flushed after
631 # completing a file check).
632 #
633 SetMailTime = 86400
634
635 ## Maximum number of mails to queue
636 #
637 SetMailNum = 10
638
639 ## Recipient (max. 8)
640 #
641 SetMailAddress=samhain-reports@debian.org
642
643 ## Mail relay (IP address)
644 #
645 SetMailRelay = master.debian.org
646
647 ## Custom subject format
648 #
649 MailSubject = [Samhain at %H] %T: %S
650
651 ## --- end E-Mail ---
652
653 ## Path to the prelink executable
654 #
655 # SetPrelinkPath = /usr/sbin/prelink
656
657 ## TIGER192 checksum of the prelink executable
658 #
659 # SetPrelinkChecksum = (no default)
660
661
662 ## Path to the executable. If set, will be checksummed after startup
663 ## and before exit.
664 #
665 # SamhainPath = (no default)
666
667
668 ## The IP address of the log server
669 #
670 # SetLogServer = (default: compiled-in)
671
672 ## The IP address of the time server
673 #
674 # SetTimeServer = (default: compiled-in)
675
676 ## Trusted Users (comma delimited list of user names) 
677 #
678 # TrustedUser = (no default; this adds to the compiled-in list)
679
680 ## Path to the file signature database
681 #
682 # SetDatabasePath = (default: compiled-in)
683
684 ## Path to the log file
685 #
686 # SetLogfilePath = (default: compiled-in)
687
688 ## Path to the PID file
689 #
690 # SetLockPath = (default: compiled-in)
691
692
693 ## The digest/checksum/hash algorithm
694 #
695 # DigestAlgo = TIGER192
696
697
698 ## Custom format for message header. 
699 ## CAREFUL if you use XML logfile format.
700 ##
701 ## %S severity
702 ## %T timestamp
703 ## %C class
704 ##
705 ## %F source file
706 ## %L source line
707 #
708 # MessageHeader="%S %T "
709
710
711 ## Don't log path to config/database file on startup
712 #
713 # HideSetup = False
714
715 ## The syslog facility, if you log to syslog
716 #
717 # SyslogFacility = LOG_AUTHPRIV
718 SyslogFacility=LOG_LOCAL2
719
720 ## The message authentication method
721 ## - If you change this, you *must* change it
722 ##   on client *and* server
723 #
724 # MACType = HMAC-TIGER
725
726
727 ## everything below is ignored
728 [EOF]
729
730 #####################################################################
731 # This would be the proper syntax for parts that should only be
732 #    included for certain hosts.
733 # You may enclose anything in a @HOSTNAME/@end bracket, as long as the
734 #    result still has the proper syntax for the config file.
735 # You may have any number of @HOSTNAME/@end brackets.
736 # HOSTNAME should be the fully qualified 'official' name 
737 #    (e.g. 'nixon.watergate.com', not 'nixon'), no aliases. 
738 #    No IP number - except if samhain cannot determine the 
739 #    fully qualified hostname.
740 #
741 # @HOSTNAME
742 # file=/foo/bar
743 # @end
744 #
745 # These are two examples for conditional inclusion/exclusion
746 # of a machine based on the output from 'uname -srm'
747 # $Linux:2.*.7:i666
748 # file=/foo/bar3
749 # $end
750 #
751 # !$Linux:2.*.7:i686
752 # file=/foo/bar2
753 # $end
754 #
755 #####################################################################