Unterschiede
Hier werden die Unterschiede zwischen zwei Versionen angezeigt.
Beide Seiten der vorigen Revision Vorhergehende Überarbeitung Nächste Überarbeitung | Vorhergehende Überarbeitung | ||
linux:aide [14.03.2025 19:48. ] – [jounald tägliche checks enablen] django | linux:aide [15.03.2025 09:08. ] (aktuell) – [Konfiguration] /etc/aide.conf aktualisiert django | ||
---|---|---|---|
Zeile 1586: | Zeile 1586: | ||
# sudo vim / | # sudo vim / | ||
- | <file bash / | + | <file bash / |
- | # More information about configuration | + | # Ansible managed |
- | # Inspired from https:// | + | # |
- | + | # ┌──────────────────────────────────────────────────────────────────────┐ | |
- | # ┌───────────────────────────────────────────────────────────────┐ | + | # │ Contents of configuration file aide.conf |
- | # │ CONTENTS OF aide.conf | + | # ├──────────────────────────────────────────────────────────────────────┤ |
- | # ├───────────────────────────────────────────────────────────────┘ | + | # │ |
- | # │ | + | # ├──┬───── 1. |
- | # ├──┐VARIABLES | + | # │ ├───── 1.1 DATABASE |
- | # │ ├── DATABASE | + | # │ └───── 1.2 REPORT |
- | # │ └── REPORT | + | # │ │ |
- | # ├──┐RULES | + | # ├──┬───── 2. |
- | # │ ├── LIST OF ATTRIBUTES | + | # │ ├───── 2.1 LIST OF ATTRIBUTES |
- | # │ ├── LIST OF CHECKSUMS | + | # │ ├───── 2.2 LIST OF CHECKSUMS |
- | # │ └── AVAILABLE RULES | + | # │ └───── 2.3 AVAILABLE RULES │ |
- | # ├──┐PATHS | + | # │ │ |
- | # │ ├──┐EXCLUDED | + | # ├──┬───── 3. |
- | # │ │ ├── ETC | + | # │ ├──┬── 3.1 EXCLUDED |
- | # │ │ ├── USR | + | # │ │ ├── |
- | # │ │ | + | # │ │ ├── |
- | # │ └──┐INCLUDED | + | # │ │ |
- | # │ | + | # │ |
- | # │ | + | # │ └──┬── 3.2. |
- | # │ | + | # │ |
- | # │ | + | # │ |
- | # │ | + | # │ |
- | # └─────────────────────────────────────────────────────────────── | + | # │ |
- | + | # │ | |
- | # ################################################################ | + | # └──────────────────────────────────────────────────────────────────────┘ |
- | + | # | |
- | # ################################ | + | ## 1. |
+ | ## 1.1 DATABASE | ||
@@define DBDIR / | @@define DBDIR / | ||
Zeile 1622: | Zeile 1623: | ||
# The location of the database to be read. | # The location of the database to be read. | ||
- | database_in=file:@@{DBDIR}/aide.db.gz | + | database_in = http://10.0.0.40/ |
# The location of the database to be written. | # The location of the database to be written. | ||
- | # | + | database_out = file: |
- | # | + | |
- | database_out=file: | + | |
- | # Whether to gzip the output to database | + | # Whether to gzip the output to database. |
- | gzip_dbout=yes | + | gzip_dbout = no |
- | # ################################ | + | ## 1.2 REPORT |
- | # Default. | + | # Default |
log_level=warning | log_level=warning | ||
report_level=changed_attributes | report_level=changed_attributes | ||
- | |||
- | report_url=file: | ||
report_url=stdout | report_url=stdout | ||
- | # | + | report_url=syslog: |
- | #NOT IMPLEMENTED report_url=mailto: | + | |
- | #NOT IMPLEMENTED | + | |
- | # ################################################################ | + | ## 2. |
- | + | ## 2.1 LIST OF ATTRIBUTES | |
- | # ############################## | + | |
# These are the default parameters we can check against. | # These are the default parameters we can check against. | ||
- | #p: | + | # p: permissions |
- | #i: | + | # i: inode |
- | #n: | + | # n: number of links |
- | #u: | + | # u: user |
- | #g: | + | # g: group |
- | #s: | + | # s: size |
- | #b: | + | # b: block count |
- | #m: | + | # m: mtime |
- | #a: | + | # a: atime |
- | #c: | + | # c: ctime |
- | #S: | + | # S: check for growing size |
- | #acl: | + | # acl: Access Control Lists |
- | # | + | # selinux |
- | # | + | # (must be enabled at compilation time) |
+ | # xattrs: | ||
- | # ################################ | + | # 2.2 LIST OF CHECKSUMS |
- | #md5: | + | # md5: md5 checksum |
- | # | + | # sha1: |
- | # | + | # sha256: |
- | # | + | # sha512: |
- | # | + | # rmd160: |
- | # | + | # tiger: |
- | # | + | # haval: |
- | # | + | # gost: |
- | # | + | # crc32: |
- | # | + | # whirlpool: |
- | # ################################ | + | # 2.3 AVAILABLE RULES |
# These are the default rules | # These are the default rules | ||
- | #R: | + | # R: p+i+l+n+u+g+s+m+c+md5 |
- | #L: | + | # L: p+i+l+n+u+g |
- | #E: | + | # E: Empty group |
- | #>: | + | # >: Growing logfile p+l+u+g+i+n+S |
+ | |||
+ | # Default compound groups: | ||
+ | # R: l+p+u+g+s+c+m+i+n+md5+acl+xattrs+ftype+e2fsattrs | ||
+ | # L: l+p+u+g+i+n+acl+xattrs+ftype+e2fsattrs | ||
+ | # >: l+p+u+g+s+i+n+acl+xattrs+ftype+e2fsattrs+growing | ||
+ | # H: md5+sha1+rmd160+tiger+crc32+gost+sha256+sha512+whirlpool | ||
+ | # +stribog256+stribog512 | ||
+ | # X: acl+xattrs+e2fsattrs | ||
+ | |||
+ | # You can create custom rules - my home made rule definition goes like this | ||
+ | # ALLXTRAHASHES = sha1+rmd160+sha256+sha512+tiger | ||
- | # You can create custom rules - my home made rule definition goes like this | ||
- | ALLXTRAHASHES = sha1+rmd160+sha256+sha512+whirlpool+tiger+haval+gost+crc32 | ||
- | ALLXTRAHASHES = sha1+rmd160+sha256+sha512+tiger | ||
# Everything but access time (Ie. all changes) | # Everything but access time (Ie. all changes) | ||
- | EVERYTHING = R+ALLXTRAHASHES | + | EVERYTHING = R+sha256+sha512 |
# Sane, with multiple hashes | # Sane, with multiple hashes | ||
Zeile 1713: | Zeile 1716: | ||
DATAONLY = p+n+u+g+s+acl+xattrs+sha256 | DATAONLY = p+n+u+g+s+acl+xattrs+sha256 | ||
- | # ################################################################ | + | ## 3. PATHS |
+ | # | ||
+ | # Here we define which directories and files we want to view or not view | ||
+ | # when monitoring with AIDE. | ||
+ | # | ||
+ | ## 3.1 EXCLUDED | ||
+ | ## 3.1.1 ETC | ||
- | # Next decide what directories/files you want in the database. | + | # Ignore root cache files |
- | + | !/root/.* | |
- | # ################################ | + | |
- | + | ||
- | # ################ | + | |
# Ignore backup files | # Ignore backup files | ||
Zeile 1727: | Zeile 1733: | ||
!/etc/mtab | !/etc/mtab | ||
- | # ################ | + | ## 3.1.2 USR |
# These are too volatile | # These are too volatile | ||
Zeile 1733: | Zeile 1739: | ||
!/usr/tmp | !/usr/tmp | ||
- | # ################ | + | ## 3.1.3 VAR |
# Ignore logs | # Ignore logs | ||
!/ | !/ | ||
!/ | !/ | ||
- | !/ | + | !/ |
- | !/ | + | !/ |
- | !/ | + | |
!/ | !/ | ||
- | # ################################ | + | ## 3.1.4 OTHERS |
+ | # Ignore cups | ||
+ | !/ | ||
+ | |||
+ | # Ignore backup files | ||
+ | !/root/.* | ||
- | # ################ | + | ## 3.2 INCLUDED |
+ | ## 3.2.1 ETC | ||
- | # Check only permissions, | + | # Check only permissions, |
+ | # important files closely. | ||
/etc PERMS | /etc PERMS | ||
/ | / | ||
Zeile 1810: | Zeile 1823: | ||
/ | / | ||
- | # ################ | + | ## 3.2.2 USR |
/usr | /usr | ||
/ | / | ||
- | # ################ | + | ## 3.2.3 VAR |
/ | / | ||
Zeile 1822: | Zeile 1835: | ||
/ | / | ||
- | # ################ | + | ## 3.2.4 OTHERS |
/boot NORMAL | /boot NORMAL | ||
Zeile 1830: | Zeile 1843: | ||
/opt | /opt | ||
/root NORMAL | /root NORMAL | ||
- | </ | + | |
+ | |||
+ | # Host based OTHERS | ||
+ | # local user scripts | ||
+ | / | ||
+ | |||
+ | # local scripts with root rights | ||
+ | / | ||
+ | |||
+ | |||
+ | # | ||
+ | # END ANSIBLE MANAGED - DO NOT EDIT BLOCK</ | ||
Wie eigentlich immer bei der Konfiguration von neuen Programmen lohnt es sich die zugehörige Konfigurationsdatei - in unserem Falle von **AIDE** die **''/ | Wie eigentlich immer bei der Konfiguration von neuen Programmen lohnt es sich die zugehörige Konfigurationsdatei - in unserem Falle von **AIDE** die **''/ | ||
Zeile 2325: | Zeile 2349: | ||
++++ | ++++ | ||
- | Die Installation von AIDE wird in der ersten Task-Gruppe mit dem tag **'' | + | Die Installation von AIDE wird in der ersten Task-Gruppe mit dem tag **'' |
$ vim roles/ | $ vim roles/ | ||
++++ roles/ | ++++ roles/ | ||
Zeile 2331: | Zeile 2355: | ||
++++ | ++++ | ||
- | Die eigentliche Installation Konfiguration sowie das erstellen der initialen AIDE-Datenbank erfolgt im anschließenden | + | Die eigentliche Installation Konfiguration sowie das erstellen der initialen AIDE-Datenbank erfolgt im anschliessenden |
$ vim roles/ | $ vim roles/ | ||
++++ roles/ | ++++ roles/ | ||
Zeile 2436: | Zeile 2460: | ||
==== Ergebniskontrolle ==== | ==== Ergebniskontrolle ==== | ||
Bei einem Blick in unser System-Journal finden wir nun unter anderem zunächst einmal das Setzen des **'' | Bei einem Blick in unser System-Journal finden wir nun unter anderem zunächst einmal das Setzen des **'' | ||
- | # journalctl | + | # journalctl |
< | < | ||
Mar 14 14:40:36 pml010070 systemd[1]: Started Aide check every day at 05:51:00. | Mar 14 14:40:36 pml010070 systemd[1]: Started Aide check every day at 05:51:00. | ||
Zeile 2442: | Zeile 2466: | ||
Desweiteren finden wir auch Informationen zum initialen Erstellen der Aide-Datenbank. | Desweiteren finden wir auch Informationen zum initialen Erstellen der Aide-Datenbank. | ||
- | # journalctl | + | # journalctl |
++++ journal bei Erstellung der initialen Datenbank | | ++++ journal bei Erstellung der initialen Datenbank | | ||
< | < |