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