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