Apparmor Hilfsprogramme: Unterschied zwischen den Versionen
Zur Navigation springen
Zur Suche springen
| Zeile 52: | Zeile 52: | ||
==aa-autodep== | ==aa-autodep== | ||
Erstellung eines Basis-Profils im Complain-Modus | Erstellung eines Basis-Profils im Complain-Modus | ||
| + | *aa-autodep /usr/bin/hund | ||
| + | *cat /etc/apparmor.d/usr.bin.hund | ||
| + | <pre> | ||
| + | # Last Modified: Fri May 13 11:00:48 2022 | ||
| + | #include <tunables/global> | ||
| + | |||
| + | /usr/bin/hund flags=(complain) { | ||
| + | #include <abstractions/base> | ||
| + | |||
| + | /usr/bin/hund mr, | ||
| + | |||
| + | } | ||
| + | </pre> | ||
| + | |||
==aa-genprof== | ==aa-genprof== | ||
Erstellung eines Basis-Profils mit interaktiver Ergänzung von Regeln und abschließender Versetzung des Profils in den Enforce-Modus | Erstellung eines Basis-Profils mit interaktiver Ergänzung von Regeln und abschließender Versetzung des Profils in den Enforce-Modus | ||
Version vom 13. Mai 2022, 09:02 Uhr
Installation
- apt install apparmor-utils
AppArmor Utilities
aa-status
Überblick über die geladenen AppArmor-Profile mit Angabe des Modus
- aa-status
apparmor module is loaded. 14 profiles are loaded. 10 profiles are in enforce mode. /usr/bin/man /usr/lib/ipsec/charon /usr/lib/ipsec/stroke apache2//phpmyadmin-a2 lsb_release man_filter man_groff nvidia_modprobe nvidia_modprobe//kmod tcpdump 4 profiles are in complain mode. /usr/bin/katze apache2 apache2//DEFAULT_URI apache2//HANDLING_UNTRUSTED_INPUT 1 processes have profiles defined. 0 processes are in enforce mode. 0 processes are in complain mode. 1 processes are unconfined but have a profile defined. /usr/lib/ipsec/charon (385)
aa-unconfined
Ausgabe der Prozesse mit Netzwerkzugriff ohne Profil
- aa-unconfined
375 /usr/sbin/zerotier-one not confined 385 /usr/lib/ipsec/charon not confined 459 /usr/sbin/mariadbd not confined 527 /usr/sbin/sshd (sshd: /usr/sbin/sshd -D [listener] 0 of 10-100 startups) not confined
aa-audit
Profil in den Audit-Modus versetzen
- aa-audit /etc/apparmor.d/usr.bin.katze
aa-complain
Profil in den Complain-Modus versetzen
- aa-complain /etc/apparmor.d/usr.bin.katze
aa-enforce
Profil in den Enforce-Modus versetzen
- aa-enforce /etc/apparmor.d/usr.bin.katze
aa-autodep
Erstellung eines Basis-Profils im Complain-Modus
- aa-autodep /usr/bin/hund
- cat /etc/apparmor.d/usr.bin.hund
# Last Modified: Fri May 13 11:00:48 2022
#include <tunables/global>
/usr/bin/hund flags=(complain) {
#include <abstractions/base>
/usr/bin/hund mr,
}
aa-genprof
Erstellung eines Basis-Profils mit interaktiver Ergänzung von Regeln und abschließender Versetzung des Profils in den Enforce-Modus
aa-logprof
interaktive Ergänzung von Regeln anhand der Einträge in /var/log/syslog
aa-cleanprof
automatisches Aufräumen eines Profils