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