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