Ticket #60: samhainrc.small

File samhainrc.small, 12.5 KB (added by dejongm@…, 17 years ago)
Line 
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
64# RedefUser0=(no default)
65# RedefUser1=(no default)
66[Prelink]
67file = /usr/lib64/autofs/lookup_userhome.so
68#
69# --------- / --------------
70#
71
72
73[Misc]
74#
75# Various naming schemes for rotated logs
76#
77#
78# Subdirectories
79#
80#
81#
82# --------- other policies -----------
83#
84
85[IgnoreNone]
86##
87## for these files, all modifications (even access time) are reported
88## - you may create some interesting-looking file (like /etc/safe_passwd),
89## just to watch whether someone will access it ...
90##
91
92[Prelink]
93##
94## Use for prelinked files or directories holding them
95##
96
97[User0]
98[User1]
99## User0 and User1 are sections for files/dirs with user-definable checking
100## (see the manual)
101
102
103
104[EventSeverity]
105##
106## Here you can assign severities to policy violations.
107## If this severity exceeds the treshold of a log facility (see below),
108## a policy violation will be logged to that facility.
109##
110## Severity for verification failures.
111##
112# SeverityReadOnly=crit
113# SeverityLogFiles=crit
114# SeverityGrowingLogs=crit
115# SeverityIgnoreNone=crit
116# SeverityAttributes=crit
117# SeverityUser0=crit
118# SeverityUser1=crit
119# SeverityIgnoreAll=crit
120
121
122## Files : file access problems
123# SeverityFiles=crit
124
125## Dirs : directory access problems
126# SeverityDirs=crit
127
128## Names : suspect (non-printable) characters in a pathname
129# SeverityNames=crit
130
131[Log]
132##
133## Switch on/OFF log facilities and set their threshold severity
134##
135## Values: debug, info, notice, warn, mark, err, crit, alert, none.
136## 'mark' is used for timestamps.
137##
138##
139## Use 'none' to SWITCH OFF a log facility
140##
141## By default, everything equal to and above the threshold is logged.
142## The specifiers '*', '!', and '=' are interpreted as
143## 'all', 'all but', and 'only', respectively (like syslogd(8) does,
144## at least on Linux). Examples:
145## MailSeverity=*
146## MailSeverity=!warn
147## MailSeverity==crit
148
149## E-mail
150##
151# MailSeverity=none
152
153## Console
154##
155# PrintSeverity=info
156
157## Logfile
158##
159# LogSeverity=mark
160
161## Syslog
162##
163# SyslogSeverity=none
164
165## Remote server (yule)
166##
167# ExportSeverity=none
168
169## External script or program
170##
171# ExternalSeverity = none
172
173## Logging to a database
174##
175# DatabaseSeverity = none
176
177## Logging to a Prelude-IDS
178##
179PreludeSeverity = crit
180PreludeClass= EVENT
181
182
183
184#####################################################
185#
186# Optional modules
187#
188#####################################################
189
190# [SuidCheck]
191##
192## --- Check the filesystem for SUID/SGID binaries
193##
194
195## Switch on
196#
197# SuidCheckActive = yes
198
199## Interval for check (seconds)
200#
201# SuidCheckInterval = 7200
202
203## Alternative: crontab-like schedule
204#
205# SuidCheckSchedule = NULL
206
207## Directory to exclude
208#
209# SuidCheckExclude = NULL
210
211## Limit on files per second (0 == no limit)
212#
213# SuidCheckFps = 0
214
215## Alternative: yield after every file
216#
217# SuidCheckYield = no
218
219## Severity of a detection
220#
221# SeveritySuidCheck = crit
222
223## Quarantine SUID/SGID files if found
224#
225# SuidCheckQuarantineFiles = yes
226
227## Method for Quarantining files:
228# 0 - Delete or truncate the file.
229# 1 - Remove SUID/SGID permissions from file.
230# 2 - Move SUID/SGID file to quarantine dir.
231#
232# SuidCheckQuarantineMethod = 0
233
234## For method 1 and 3, really delete instead of truncating
235#
236# SuidCheckQuarantineDelete = yes
237
238#[Kernel]
239##
240## --- Check for loadable kernel module rootkits (Linux/FreeBSD only)
241##
242
243## Switch on/off
244#
245# KernelCheckActive = True
246
247## Check interval (seconds); btw., the check is VERY fast
248#
249# KernelCheckInterval = 300
250
251## Severity
252#
253# SeverityKernel = crit
254
255
256# [Utmp]
257##
258## --- Logging of login/logout events
259##
260
261## Switch on/off
262#
263# LoginCheckActive = True
264
265## Severity for logins, multiple logins, logouts
266#
267# SeverityLogin=info
268# SeverityLoginMulti=warn
269# SeverityLogout=info
270
271## Interval for login/logout checks
272#
273# LoginCheckInterval = 300
274
275
276# [Database]
277##
278## --- Logging to a relational database
279##
280
281## Database name
282#
283# SetDBName = samhain
284
285## Database table
286#
287# SetDBTable = log
288
289## Database user
290#
291# SetDBUser = samhain
292
293## Database password
294#
295# SetDBPassword = (default: none)
296
297## Database host
298#
299# SetDBHost = localhost
300
301## Log the server timestamp for received messages
302#
303# SetDBServerTstamp = True
304
305## Use a persistent connection
306#
307# UsePersistent = True
308
309# [External]
310##
311## Interface to call external scripts/programs for logging
312##
313
314## The absolute path to the command
315## - Each invocation of this directive will end the definition of the
316## preceding command, and start the definition of
317## an additional, new command
318#
319# OpenCommand = (no default)
320
321## Type (log or rv)
322## - log for log messages, srv for messages received by the server
323#
324# SetType = log
325
326## The command (full command line) to execute
327#
328# SetCommandLine = (no default)
329
330## The environment (KEY=value; repeat for more)
331#
332# SetEnviron = TZ=(your timezone)
333
334## The TIGER192 checksum (optional)
335#
336# SetChecksum = (no default)
337
338## User who runs the command
339#
340# SetCredentials = (default: samhain process uid)
341
342## Words not allowed in message
343#
344# SetFilterNot = (none)
345
346## Words required (ALL of them)
347#
348# SetFilterAnd = (none)
349
350## Words required (at least one)
351#
352# SetFilterOr = (none)
353
354## Deadtime between consecutive calls
355#
356# SetDeadtime = 0
357
358## Add default environment (HOME, PATH, SHELL)
359#
360# SetDefault = no
361
362
363#####################################################
364#
365# Miscellaneous configuration options
366#
367#####################################################
368
369[Misc]
370
371## whether to become a daemon process
372## (this is not honoured on database initialisation)
373#
374# Daemon = no
375Daemon = yes
376
377## whether to test signature of files (init/check/none)
378## - if 'none', then we have to decide this on the command line -
379#
380# ChecksumTest = none
381ChecksumTest=check
382
383## Set nice level (-19 to 19, see 'man nice'),
384## and I/O limit (kilobytes per second; 0 == off)
385## to reduce load on host.
386#
387# SetNiceLevel = 0
388# SetIOLimit = 0
389
390## The version string to embed in file signature databases
391#
392# VersionString = NULL
393
394## Interval between time stamp messages
395#
396# SetLoopTime = 60
397SetLoopTime = 600
398
399## Interval between file checks
400#
401# SetFileCheckTime = 600
402SetFileCheckTime = 7200
403
404## Alternative: crontab-like schedule
405#
406# FileCheckScheduleOne = NULL
407
408## Alternative: crontab-like schedule(2)
409#
410# FileCheckScheduleTwo = NULL
411
412## Report only once on modified fles
413## Setting this to 'FALSE' will generate a report for any policy
414## violation (old and new ones) each time the daemon checks the file system.
415#
416# ReportOnlyOnce = True
417
418## Report in full detail
419#
420# ReportFullDetail = False
421
422## Report file timestamps in local time rather than GMT
423#
424# UseLocalTime = No
425
426## The console device (can also be a file or named pipe)
427## - There are two console devices. Accordingly, you can use
428## this directive a second time to set the second console device.
429## If you have not defined the second device at compile time,
430## and you don't want to use it, then:
431## setting it to /dev/null is less effective than just leaving
432## it alone (setting to /dev/null will waste time by opening
433## /dev/null and writing to it)
434#
435# SetConsole = /dev/console
436
437## Activate the SysV IPC message queue
438#
439# MessageQueueActive = False
440
441
442## If false, skip reverse lookup when connecting to a host known
443## by name rather than IP address (i.e. trust the DNS)
444#
445# SetReverseLookup = True
446
447## --- E-Mail ---
448
449# Only highest-level (alert) reports will be mailed immediately,
450# others will be queued. Here you can define, when the queue will
451# be flushed (Note: the queue is automatically flushed after
452# completing a file check).
453#
454# SetMailTime = 86400
455
456## Maximum number of mails to queue
457#
458# SetMailNum = 10
459
460## Recipient (max. 8)
461#
462# SetMailAddress=root@localhost
463
464## Mail relay (IP address)
465#
466# SetMailRelay = NULL
467
468## Custom subject format
469#
470# MailSubject = NULL
471
472## --- end E-Mail ---
473
474## Path to the prelink executable
475#
476# SetPrelinkPath = /usr/sbin/prelink
477
478## TIGER192 checksum of the prelink executable
479#
480# SetPrelinkChecksum = (no default)
481
482
483## Path to the executable. If set, will be checksummed after startup
484## and before exit.
485#
486# SamhainPath = (no default)
487
488
489## The IP address of the log server
490#
491# SetLogServer = (default: compiled-in)
492
493## The IP address of the time server
494#
495# SetTimeServer = (default: compiled-in)
496
497## Trusted Users (comma delimited list of user names)
498#
499# TrustedUser = (no default; this adds to the compiled-in list)
500
501## Path to the file signature database
502#
503# SetDatabasePath = (default: compiled-in)
504
505## Path to the log file
506#
507# SetLogfilePath = (default: compiled-in)
508
509## Path to the PID file
510#
511# SetLockPath = (default: compiled-in)
512
513
514## The digest/checksum/hash algorithm
515#
516# DigestAlgo = TIGER192
517
518
519## Custom format for message header.
520## CAREFUL if you use XML logfile format.
521##
522## %S severity
523## %T timestamp
524## %C class
525##
526## %F source file
527## %L source line
528#
529# MessageHeader="%S %T "
530
531
532## Don't log path to config/database file on startup
533#
534# HideSetup = False
535
536## The syslog facility, if you log to syslog
537#
538# SyslogFacility = LOG_AUTHPRIV
539SyslogFacility=LOG_LOCAL2
540
541## The message authentication method
542## - If you change this, you *must* change it
543## on client *and* server
544#
545# MACType = HMAC-TIGER
546
547
548## The Prelude-IDS profile to use for reporting
549## default value is "samhain"
550#
551PreludeProfile = samhain
552
553## Map these samhain severities to impact severity 'info' severity
554#
555# PreludeMapToInfo =
556
557## Map these samhain severities to impact severity 'low' severity
558#
559# PreludeMapToLow = debug info
560
561## Map these samhain severities to impact severity 'medium' severity
562#
563# PreludeMapToMedium = notice warn err
564
565## Map these samhain severities to impact severity 'high' severity
566#
567# PreludeMapToHigh = crit alert
568
569
570## everything below is ignored
571[EOF]
572
573#####################################################################
574# This would be the proper syntax for parts that should only be
575# included for certain hosts.
576# You may enclose anything in a @HOSTNAME/@end bracket, as long as the
577# result still has the proper syntax for the config file.
578# You may have any number of @HOSTNAME/@end brackets.
579# HOSTNAME should be the fully qualified 'official' name
580# (e.g. 'nixon.watergate.com', not 'nixon'), no aliases.
581# No IP number - except if samhain cannot determine the
582# fully qualified hostname.
583#
584# @HOSTNAME
585# file=/foo/bar
586# @end
587#
588# These are two examples for conditional inclusion/exclusion
589# of a machine based on the output from 'uname -srm'
590# $Linux:2.*.7:i666
591# file=/foo/bar3
592# $end
593#
594# !$Linux:2.*.7:i686
595# file=/foo/bar2
596# $end
597#
598#####################################################################