21eb16
# Example configuration file for AIDE.
21eb16
21eb16
@@define DBDIR /var/lib/aide
21eb16
@@define LOGDIR /var/log/aide
21eb16
21eb16
# The location of the database to be read.
21eb16
database=file:@@{DBDIR}/aide.db.gz
21eb16
21eb16
# The location of the database to be written.
21eb16
#database_out=sql:host:port:database:login_name:passwd:table
21eb16
#database_out=file:aide.db.new
21eb16
database_out=file:@@{DBDIR}/aide.db.new.gz
21eb16
21eb16
# Whether to gzip the output to database
21eb16
gzip_dbout=yes
21eb16
21eb16
# Default.
21eb16
verbose=5
21eb16
21eb16
report_url=file:@@{LOGDIR}/aide.log
21eb16
report_url=stdout
21eb16
#report_url=stderr
21eb16
#NOT IMPLEMENTED report_url=mailto:root@foo.com
21eb16
#NOT IMPLEMENTED report_url=syslog:LOG_AUTH
21eb16
21eb16
# These are the default rules.
21eb16
#
21eb16
#p:      permissions
21eb16
#i:      inode:
21eb16
#n:      number of links
21eb16
#u:      user
21eb16
#g:      group
21eb16
#s:      size
21eb16
#b:      block count
21eb16
#m:      mtime
21eb16
#a:      atime
21eb16
#c:      ctime
21eb16
#S:      check for growing size
21eb16
#acl:           Access Control Lists
21eb16
#selinux        SELinux security context
21eb16
#xattrs:        Extended file attributes
21eb16
#md5:    md5 checksum
21eb16
#sha1:   sha1 checksum
21eb16
#sha256:        sha256 checksum
21eb16
#sha512:        sha512 checksum
21eb16
#rmd160: rmd160 checksum
21eb16
#tiger:  tiger checksum
21eb16
21eb16
#haval:  haval checksum (MHASH only)
21eb16
#gost:   gost checksum (MHASH only)
21eb16
#crc32:  crc32 checksum (MHASH only)
21eb16
#whirlpool:     whirlpool checksum (MHASH only)
21eb16
21eb16
#R:             p+i+n+u+g+s+m+c+acl+selinux+xattrs+md5
21eb16
#L:             p+i+n+u+g+acl+selinux+xattrs
21eb16
#E:             Empty group
21eb16
#>:             Growing logfile p+u+g+i+n+S+acl+selinux+xattrs
21eb16
21eb16
# You can create custom rules like this.
21eb16
# With MHASH...
21eb16
# ALLXTRAHASHES = sha1+rmd160+sha256+sha512+whirlpool+tiger+haval+gost+crc32
21eb16
ALLXTRAHASHES = sha1+rmd160+sha256+sha512+tiger
21eb16
# Everything but access time (Ie. all changes)
21eb16
EVERYTHING = R+ALLXTRAHASHES
21eb16
21eb16
# Sane
21eb16
# NORMAL = R+sha512
21eb16
NORMAL = p+i+n+u+g+s+m+c+acl+selinux+xattrs+sha512
21eb16
21eb16
# For directories, don't bother doing hashes
21eb16
DIR = p+i+n+u+g+acl+selinux+xattrs
21eb16
21eb16
# Access control only
21eb16
PERMS = p+u+g+acl+selinux+xattrs
21eb16
21eb16
# Logfile are special, in that they often change
21eb16
LOG = p+u+g+n+S+acl+selinux+xattrs
21eb16
21eb16
# Content + file type.
21eb16
CONTENT = sha512+ftype
21eb16
21eb16
# Extended content + file type + access.
21eb16
CONTENT_EX = sha512+ftype+p+u+g+n+acl+selinux+xattrs
21eb16
21eb16
# Some files get updated automatically, so the inode/ctime/mtime change
21eb16
# but we want to know when the data inside them changes
21eb16
DATAONLY =  p+n+u+g+s+acl+selinux+xattrs+sha512
21eb16
21eb16
# Next decide what directories/files you want in the database.
21eb16
21eb16
/boot       CONTENT_EX
21eb16
/opt        CONTENT
21eb16
21eb16
# Admins dot files constantly change, just check perms
21eb16
/root/\..* PERMS
21eb16
!/root/.xauth*
21eb16
# Otherwise get all of /root.
21eb16
/root   CONTENT_EX
21eb16
21eb16
# These are too volatile
21eb16
!/usr/src
21eb16
!/usr/tmp
21eb16
21eb16
# Otherwise get all of /usr.
21eb16
/usr    CONTENT_EX
21eb16
21eb16
# trusted databases
21eb16
/etc/hosts$      CONTENT_EX
21eb16
/etc/host.conf$  CONTENT_EX
21eb16
/etc/hostname$   CONTENT_EX
21eb16
/etc/issue$      CONTENT_EX
21eb16
/etc/issue.net$  CONTENT_EX
21eb16
/etc/protocols$  CONTENT_EX
21eb16
/etc/services$   CONTENT_EX
21eb16
/etc/localtime$  CONTENT_EX
21eb16
/etc/alternatives CONTENT_EX
21eb16
/etc/sysconfig   CONTENT_EX
21eb16
/etc/mime.types$ CONTENT_EX
21eb16
/etc/terminfo    CONTENT_EX
21eb16
/etc/exports$    CONTENT_EX
21eb16
/etc/fstab$      CONTENT_EX
21eb16
/etc/passwd$     CONTENT_EX
21eb16
/etc/group$      CONTENT_EX
21eb16
/etc/gshadow$    CONTENT_EX
21eb16
/etc/shadow$     CONTENT_EX
21eb16
/etc/subgid$     CONTENT_EX
21eb16
/etc/subuid$     CONTENT_EX
21eb16
/etc/security/opasswd$ CONTENT_EX
21eb16
/etc/skel        CONTENT_EX
21eb16
/etc/sssd        CONTENT_EX
21eb16
/etc/machine-id$ CONTENT_EX
21eb16
/etc/swid        CONTENT_EX
21eb16
/etc/system-release-cpe$ CONTENT_EX
21eb16
/etc/shells$     CONTENT_EX
21eb16
/etc/tmux.conf$  CONTENT_EX
21eb16
/etc/xattr.conf$ CONTENT_EX
21eb16
21eb16
# networking
21eb16
/etc/firewalld      CONTENT_EX
21eb16
!/etc/NetworkManager/system-connections
21eb16
/etc/NetworkManager CONTENT_EX
21eb16
/etc/networks$ CONTENT_EX
21eb16
/etc/dhcp CONTENT_EX
21eb16
/etc/wpa_supplicant CONTENT_EX
21eb16
/etc/resolv.conf$ DATAONLY
21eb16
/etc/nscd.conf$ CONTENT_EX
21eb16
21eb16
# logins and accounts
21eb16
/etc/login.defs$ CONTENT_EX
21eb16
/etc/libuser.conf$ CONTENT_EX
21eb16
/var/log/faillog$ PERMS
21eb16
/var/log/lastlog$ PERMS
21eb16
/var/run/faillock PERMS
21eb16
/etc/pam.d CONTENT_EX
21eb16
/etc/security CONTENT_EX
21eb16
/etc/securetty$ CONTENT_EX
21eb16
/etc/polkit-1 CONTENT_EX
21eb16
/etc/sudo.conf$ CONTENT_EX
21eb16
/etc/sudoers$ CONTENT_EX
21eb16
/etc/sudoers.d CONTENT_EX
21eb16
21eb16
# Shell/X startup files
21eb16
/etc/profile$ CONTENT_EX
21eb16
/etc/profile.d CONTENT_EX
21eb16
/etc/bashrc$ CONTENT_EX
21eb16
/etc/bash_completion.d CONTENT_EX
21eb16
/etc/zprofile$ CONTENT_EX
21eb16
/etc/zshrc$ CONTENT_EX
21eb16
/etc/zlogin$ CONTENT_EX
21eb16
/etc/zlogout$ CONTENT_EX
21eb16
/etc/X11 CONTENT_EX
21eb16
21eb16
# Pkg manager
21eb16
/etc/dnf CONTENT_EX
21eb16
/etc/yum.conf$ CONTENT_EX
21eb16
/etc/yum CONTENT_EX
21eb16
/etc/yum.repos.d CONTENT_EX
21eb16
21eb16
# This gets new/removes-old filenames daily
21eb16
!/var/log/sa
21eb16
# As we are checking it, we've truncated yesterdays size to zero.
21eb16
!/var/log/aide.log
21eb16
21eb16
# auditing
21eb16
# AIDE produces an audit record, so this becomes perpetual motion.
21eb16
/var/log/audit PERMS
21eb16
/etc/audit CONTENT_EX
21eb16
/etc/libaudit.conf$ CONTENT_EX
21eb16
/etc/aide.conf$  CONTENT_EX
21eb16
21eb16
# System logs
21eb16
/etc/rsyslog.conf$ CONTENT_EX
21eb16
/etc/rsyslog.d CONTENT_EX
21eb16
/etc/logrotate.conf$ CONTENT_EX
21eb16
/etc/logrotate.d CONTENT_EX
21eb16
/etc/systemd/journald.conf$ CONTENT_EX
21eb16
/var/log LOG+ANF+ARF
21eb16
/var/run/utmp LOG
21eb16
21eb16
# secrets
21eb16
/etc/pkcs11 CONTENT_EX
21eb16
/etc/pki CONTENT_EX
21eb16
/etc/crypto-policies CONTENT_EX
21eb16
/etc/certmonger CONTENT_EX
21eb16
/var/lib/systemd/random-seed$ PERMS
21eb16
21eb16
# init system
21eb16
/etc/systemd CONTENT_EX
21eb16
/etc/rc.d CONTENT_EX
21eb16
/etc/tmpfiles.d CONTENT_EX
21eb16
21eb16
# boot config
21eb16
/etc/default CONTENT_EX
21eb16
/etc/grub.d CONTENT_EX
21eb16
/etc/dracut.conf$ CONTENT_EX
21eb16
/etc/dracut.conf.d CONTENT_EX
21eb16
21eb16
# glibc linker
21eb16
/etc/ld.so.cache$ CONTENT_EX
21eb16
/etc/ld.so.conf$ CONTENT_EX
21eb16
/etc/ld.so.conf.d CONTENT_EX
21eb16
/etc/ld.so.preload$ CONTENT_EX
21eb16
21eb16
# kernel config
21eb16
/etc/sysctl.conf$ CONTENT_EX
21eb16
/etc/sysctl.d CONTENT_EX
21eb16
/etc/modprobe.d CONTENT_EX
21eb16
/etc/modules-load.d CONTENT_EX
21eb16
/etc/depmod.d CONTENT_EX
21eb16
/etc/udev CONTENT_EX
21eb16
/etc/crypttab$ CONTENT_EX
21eb16
21eb16
#### Daemons ####
21eb16
21eb16
# cron jobs
21eb16
/etc/at.allow$ CONTENT
21eb16
/etc/at.deny$ CONTENT
21eb16
/etc/anacrontab$ CONTENT_EX
21eb16
/etc/cron.allow$ CONTENT_EX
21eb16
/etc/cron.deny$ CONTENT_EX
21eb16
/etc/cron.d CONTENT_EX
21eb16
/etc/cron.daily CONTENT_EX
21eb16
/etc/cron.hourly CONTENT_EX
21eb16
/etc/cron.monthly CONTENT_EX
21eb16
/etc/cron.weekly CONTENT_EX
21eb16
/etc/crontab$ CONTENT_EX
21eb16
/var/spool/cron/root CONTENT
21eb16
21eb16
# time keeping
21eb16
/etc/chrony.conf$ CONTENT_EX
21eb16
/etc/chrony.keys$ CONTENT_EX
21eb16
21eb16
# mail
21eb16
/etc/aliases$ CONTENT_EX
21eb16
/etc/aliases.db$ CONTENT_EX
21eb16
/etc/postfix CONTENT_EX
21eb16
21eb16
# ssh
21eb16
/etc/ssh/sshd_config$ CONTENT_EX
21eb16
/etc/ssh/ssh_config$ CONTENT_EX
21eb16
21eb16
# stunnel
21eb16
/etc/stunnel CONTENT_EX
21eb16
21eb16
# printing
21eb16
/etc/cups CONTENT_EX
21eb16
/etc/cupshelpers CONTENT_EX
21eb16
/etc/avahi CONTENT_EX
21eb16
21eb16
# web server
21eb16
/etc/httpd CONTENT_EX
21eb16
21eb16
# dns
21eb16
/etc/named CONTENT_EX
21eb16
/etc/named.conf$ CONTENT_EX
21eb16
/etc/named.iscdlv.key$ CONTENT_EX
21eb16
/etc/named.rfc1912.zones$ CONTENT_EX
21eb16
/etc/named.root.key$ CONTENT_EX
21eb16
21eb16
# xinetd
21eb16
/etc/xinetd.conf$ CONTENT_EX
21eb16
/etc/xinetd.d CONTENT_EX
21eb16
21eb16
# IPsec
21eb16
/etc/ipsec.conf$ CONTENT_EX
21eb16
/etc/ipsec.secrets$ CONTENT_EX
21eb16
/etc/ipsec.d CONTENT_EX
21eb16
21eb16
# USB guard
21eb16
/etc/usbguard CONTENT_EX
21eb16
21eb16
# Ignore some files
21eb16
!/etc/mtab$
21eb16
!/etc/.*~
21eb16
21eb16
# Now everything else
21eb16
/etc    PERMS
21eb16
21eb16
# With AIDE's default verbosity level of 5, these would give lots of
21eb16
# warnings upon tree traversal. It might change with future version.
21eb16
#
21eb16
#=/lost\+found    DIR
21eb16
#=/home           DIR