cvsextras 9fe78cd
# Example configuration file for AIDE.
cvsextras 9fe78cd
cvsextras 9fe78cd
@@define DBDIR /var/lib/aide
ac87434
@@define LOGDIR /var/log/aide
cvsextras 9fe78cd
cvsextras 9fe78cd
# The location of the database to be read.
cvsextras 9fe78cd
database=file:@@{DBDIR}/aide.db.gz
cvsextras 9fe78cd
cvsextras 9fe78cd
# The location of the database to be written.
cvsextras 9fe78cd
#database_out=sql:host:port:database:login_name:passwd:table
cvsextras 9fe78cd
#database_out=file:aide.db.new
cvsextras 9fe78cd
database_out=file:@@{DBDIR}/aide.db.new.gz
cvsextras 9fe78cd
cvsextras 9fe78cd
# Whether to gzip the output to database
cvsextras 9fe78cd
gzip_dbout=yes
cvsextras 9fe78cd
cvsextras 9fe78cd
# Default.
cvsextras 9fe78cd
verbose=5
cvsextras 9fe78cd
ac87434
report_url=file:@@{LOGDIR}/aide.log
cvsextras 9fe78cd
report_url=stdout
cvsextras 9fe78cd
#report_url=stderr
cvsextras 9fe78cd
#NOT IMPLEMENTED report_url=mailto:root@foo.com
cvsextras 9fe78cd
#NOT IMPLEMENTED report_url=syslog:LOG_AUTH
cvsextras 9fe78cd
cvsextras 9fe78cd
# These are the default rules.
cvsextras 9fe78cd
#
cvsextras 9fe78cd
#p:      permissions
cvsextras 9fe78cd
#i:      inode:
cvsextras 9fe78cd
#n:      number of links
cvsextras 9fe78cd
#u:      user
cvsextras 9fe78cd
#g:      group
cvsextras 9fe78cd
#s:      size
cvsextras 9fe78cd
#b:      block count
cvsextras 9fe78cd
#m:      mtime
cvsextras 9fe78cd
#a:      atime
cvsextras 9fe78cd
#c:      ctime
cvsextras 9fe78cd
#S:      check for growing size
ac87434
#acl:           Access Control Lists
ac87434
#selinux        SELinux security context
ac87434
#xattrs:        Extended file attributes
cvsextras 9fe78cd
#md5:    md5 checksum
cvsextras 9fe78cd
#sha1:   sha1 checksum
ac87434
#sha256:        sha256 checksum
ac87434
#sha512:        sha512 checksum
cvsextras 9fe78cd
#rmd160: rmd160 checksum
cvsextras 9fe78cd
#tiger:  tiger checksum
ac87434
ac87434
#haval:  haval checksum (MHASH only)
ac87434
#gost:   gost checksum (MHASH only)
ac87434
#crc32:  crc32 checksum (MHASH only)
ac87434
#whirlpool:     whirlpool checksum (MHASH only)
ac87434
0c33c3d
FIPSR = p+i+n+u+g+s+m+c+acl+selinux+xattrs+sha256
0c33c3d
ac87434
#R:             p+i+n+u+g+s+m+c+acl+selinux+xattrs+md5
ac87434
#L:             p+i+n+u+g+acl+selinux+xattrs
ac87434
#E:             Empty group
ac87434
#>:             Growing logfile p+u+g+i+n+S+acl+selinux+xattrs
cvsextras 9fe78cd
cvsextras 9fe78cd
# You can create custom rules like this.
ac87434
# With MHASH...
ac87434
# ALLXTRAHASHES = sha1+rmd160+sha256+sha512+whirlpool+tiger+haval+gost+crc32
ac87434
ALLXTRAHASHES = sha1+rmd160+sha256+sha512+tiger
ac87434
# Everything but access time (Ie. all changes)
ac87434
EVERYTHING = R+ALLXTRAHASHES
ac87434
ac87434
# Sane, with multiple hashes
ac87434
# NORMAL = R+rmd160+sha256+whirlpool
0c33c3d
NORMAL = FIPSR+sha512
ac87434
ac87434
# For directories, don't bother doing hashes
ac87434
DIR = p+i+n+u+g+acl+selinux+xattrs
cvsextras 9fe78cd
ac87434
# Access control only
ac87434
PERMS = p+i+u+g+acl+selinux
cvsextras 9fe78cd
ac87434
# Logfile are special, in that they often change
ac87434
LOG = >
ac87434
0c33c3d
# Just do sha256 and sha512 hashes
0c33c3d
LSPP = FIPSR+sha512
ac87434
ac87434
# Some files get updated automatically, so the inode/ctime/mtime change
ac87434
# but we want to know when the data inside them changes
0c33c3d
DATAONLY =  p+n+u+g+s+acl+selinux+xattrs+sha256
cvsextras 9fe78cd
cvsextras 9fe78cd
# Next decide what directories/files you want in the database.
cvsextras 9fe78cd
cvsextras 9fe78cd
/boot   NORMAL
cvsextras 9fe78cd
/bin    NORMAL
cvsextras 9fe78cd
/sbin   NORMAL
cvsextras 9fe78cd
/lib    NORMAL
d3eac09
/lib64  NORMAL
cvsextras 9fe78cd
/opt    NORMAL
cvsextras 9fe78cd
/usr    NORMAL
cvsextras 9fe78cd
/root   NORMAL
ac87434
# These are too volatile
ac87434
!/usr/src
ac87434
!/usr/tmp
cvsextras 9fe78cd
cvsextras 9fe78cd
# Check only permissions, inode, user and group for /etc, but
cvsextras 9fe78cd
# cover some important files closely.
ac87434
/etc    PERMS
cvsextras 9fe78cd
!/etc/mtab
ac87434
# Ignore backup files
ac87434
!/etc/.*~
cvsextras 9fe78cd
/etc/exports  NORMAL
cvsextras 9fe78cd
/etc/fstab    NORMAL
cvsextras 9fe78cd
/etc/passwd   NORMAL
cvsextras 9fe78cd
/etc/group    NORMAL
cvsextras 9fe78cd
/etc/gshadow  NORMAL
cvsextras 9fe78cd
/etc/shadow   NORMAL
ac87434
/etc/security/opasswd   NORMAL
ac87434
ac87434
/etc/hosts.allow   NORMAL
ac87434
/etc/hosts.deny    NORMAL
ac87434
ac87434
/etc/sudoers NORMAL
ac87434
/etc/skel NORMAL
ac87434
ac87434
/etc/logrotate.d NORMAL
ac87434
ac87434
/etc/resolv.conf DATAONLY
ac87434
ac87434
/etc/nscd.conf NORMAL
ac87434
/etc/securetty NORMAL
ac87434
ac87434
# Shell/X starting files
ac87434
/etc/profile NORMAL
ac87434
/etc/bashrc NORMAL
ac87434
/etc/bash_completion.d/ NORMAL
ac87434
/etc/login.defs NORMAL
ac87434
/etc/zprofile NORMAL
ac87434
/etc/zshrc NORMAL
ac87434
/etc/zlogin NORMAL
ac87434
/etc/zlogout NORMAL
ac87434
/etc/profile.d/ NORMAL
ac87434
/etc/X11/ NORMAL
ac87434
ac87434
# Pkg manager
ac87434
/etc/yum.conf NORMAL
ac87434
/etc/yumex.conf NORMAL
ac87434
/etc/yumex.profiles.conf NORMAL
ac87434
/etc/yum/ NORMAL
ac87434
/etc/yum.repos.d/ NORMAL
ac87434
ac87434
/var/log   LOG
ac87434
/var/run/utmp LOG
ac87434
ac87434
# This gets new/removes-old filenames daily
ac87434
!/var/log/sa
ac87434
# As we are checking it, we've truncated yesterdays size to zero.
ac87434
!/var/log/aide.log
cvsextras 9fe78cd
ac87434
# LSPP rules...
ac87434
# AIDE produces an audit record, so this becomes perpetual motion.
ac87434
# /var/log/audit/ LSPP
ac87434
/etc/audit/ LSPP
ac87434
/etc/libaudit.conf LSPP
ac87434
/usr/sbin/stunnel LSPP
ac87434
/var/spool/at LSPP
ac87434
/etc/at.allow LSPP
ac87434
/etc/at.deny LSPP
ac87434
/etc/cron.allow LSPP
ac87434
/etc/cron.deny LSPP
ac87434
/etc/cron.d/ LSPP
ac87434
/etc/cron.daily/ LSPP
ac87434
/etc/cron.hourly/ LSPP
ac87434
/etc/cron.monthly/ LSPP
ac87434
/etc/cron.weekly/ LSPP
ac87434
/etc/crontab LSPP
ac87434
/var/spool/cron/root LSPP
ac87434
ac87434
/etc/login.defs LSPP
ac87434
/etc/securetty LSPP
ac87434
/var/log/faillog LSPP
ac87434
/var/log/lastlog LSPP
ac87434
ac87434
/etc/hosts LSPP
ac87434
/etc/sysconfig LSPP
ac87434
ac87434
/etc/inittab LSPP
ac87434
/etc/grub/ LSPP
ac87434
/etc/rc.d LSPP
ac87434
ac87434
/etc/ld.so.conf LSPP
ac87434
ac87434
/etc/localtime LSPP
ac87434
ac87434
/etc/sysctl.conf LSPP
ac87434
ac87434
/etc/modprobe.conf LSPP
ac87434
ac87434
/etc/pam.d LSPP
ac87434
/etc/security LSPP
ac87434
/etc/aliases LSPP
ac87434
/etc/postfix LSPP
ac87434
ac87434
/etc/ssh/sshd_config LSPP
ac87434
/etc/ssh/ssh_config LSPP
ac87434
ac87434
/etc/stunnel LSPP
ac87434
ac87434
/etc/vsftpd.ftpusers LSPP
ac87434
/etc/vsftpd LSPP
ac87434
ac87434
/etc/issue LSPP
ac87434
/etc/issue.net LSPP
ac87434
ac87434
/etc/cups LSPP
cvsextras 9fe78cd
cvsextras 9fe78cd
# With AIDE's default verbosity level of 5, these would give lots of
cvsextras 9fe78cd
# warnings upon tree traversal. It might change with future version.
cvsextras 9fe78cd
#
cvsextras 9fe78cd
#=/lost\+found    DIR
cvsextras 9fe78cd
#=/home           DIR
cvsextras 9fe78cd
ac87434
# Ditto /var/log/sa reason...
ac87434
!/var/log/and-httpd
ac87434
ac87434
# Admins dot files constantly change, just check perms
72e1c56
/root/\..* PERMS