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