|
|
| (116 dazwischenliegende Versionen von 2 Benutzern werden nicht angezeigt) |
| Zeile 1: |
Zeile 1: |
| == Übersicht == | | '''Seminar/Linux/SELinux''' - SELinux |
| {| class="wikitable gnu options big" | | |
| ! Nr. ! Thema !! Gewichtung | | == Beschreibung == |
| | |
| | === Seminarziele === |
| | |
| | === Lehrmethode === |
| | * [[Interaktiver Lehrvortrag ]] |
| | * [[Praktische Übungen]] |
| | * [[Diskussion]] |
| | * [[Wiederholungs-/Vertiefung-Tests]] |
| | |
| | === Zielgruppe === |
| | |
| | === Vorkenntnisse === |
| | ; Notwendig |
| | * Linux Grundlagen |
| | * Linux Administration |
| | |
| | ; Hilfreich |
| | <!-- |
| | * [[Informationssicherheit]] |
| | * [[IT-Sicherheit]] |
| | * [[Netzwerke]] |
| | * [[ITIL]] |
| | * [[Qualitätsmanagement]] |
| | * [[ISO 27001]] |
| | --> |
| | |
| | === Dauer === |
| | ; 4 Tage |
| | * 36 Unterrichtseinheiten (je 45min) |
| | |
| | === Seminarzeiten === |
| | <!-- |
| | {{:Foxwiki:Vorlage/Artikel/Seminar/Seminarzeiten}} |
| | --> |
| | |
| | == Inhalte == |
| | {| class="wikitable gnu options big col1center col3center" |
| | ! Kapitel !! Thema |
| | !Beschreibung!! Gewichtung |
| | |- |
| | | 01 || [[Linux/SELinux/Grundlagen|Einführung]] |
| | | || 1 |
| |- | | |- |
| | 1 | [[#Security Context auf Dateien und Verzeichnissen|Security Context auf Dateien und Verzeichnissen]] || 1 | | | 02 || [[Linux/SELinux/Dateien|Security Context auf Dateien und Verzeichnissen]] |
| | | || 1 |
| |- | | |- |
| | 2 | [[#Extended (File) Attributes (xattr)|Extended (File) Attributes (xattr)]] || 1 | | | 03 || [[Linux/SELinux/Extended File Attributes|Extended File Attributes]] |
| | | || 1 |
| |- | | |- |
| | 3 | [[#Security Context Verwaltung|Security Context Verwaltung]] || 1 | | | 04 || [[Linux/SELinux/Security Context|Security Context]] |
| | | || 1 |
| |- | | |- |
| | 4 | [[#File Context Verwaltung|File Context Verwaltung]] || 1 | | | 05 || [[Linux/SELinux/File Context|File Context]] |
| | | || 1 |
| |- | | |- |
| | 5 | [[#Context Expressions|Context Expressions]] || 1 | | | 06 || [[Linux/SELinux/Context Expressions|Context Expressions]] |
| | | || 1 |
| |- | | |- |
| | 6 | [[#Security Context (fcontext) einer Datei ändern|Security Context (fcontext) einer Datei ändern]] || 1 | | | 07 || [[Linux/SELinux/Security Context von Datei|Security Context von Datei]] |
| | | || 1 |
| |- | | |- |
| | 7 | [[#Named File Transitions Rules|Named File Transitions Rules]] || 1 | | | 08 || [[Linux/SELinux/Named File Transitions Rules|Named File Transitions Rules]] |
| | | || 1 |
| |- | | |- |
| | 8 | [[#Systemd und Temporäre Verzeichnisse|Systemd und Temporäre Verzeichnisse]] || 1 | | | 09 || [[Linux/SELinux/Systemd und Temporäre Verzeichnisse|Systemd und Temporäre Verzeichnisse]] |
| | | || 1 |
| |- | | |- |
| | 9 | [[#strace und SELinux Context Printing|strace und SELinux Context Printing]] || 1 | | | 10 || [[Linux/SELinux/strace context printing|strace context printing]] |
| | | || 1 |
| |- | | |- |
| | 10 | [[#SELinux und Benutzer Login|SELinux und Benutzer Login]] || 1 | | | 11 || [[Linux/SELinux/Benutzer Login|Benutzer Login]] |
| | | || 1 |
| |- | | |- |
| | 11 | [[#Verwalten von Kategorien|Verwalten von Kategorien]] || 1 | | | 12 || [[Linux/SELinux/Kategorien|Kategorien]] |
| | | || 1 |
| |- | | |- |
| | 12 | [[#Arbeiten mit SELinux Roles|Arbeiten mit SELinux Roles]] || 1 | | | 13 || [[Linux/SELinux/Rollen|Rollen]] |
| | | || 1 |
| |- | | |- |
| | 13 | [[#Pluggable Authentication Modules (PAM)|Pluggable Authentication Modules (PAM)]] || 1 | | | 14 || [[Linux/SELinux/Pluggable Authentication Modules|PAM]] |
| | | || 1 |
| |- | | |- |
| | 14 | [[#Prozess Context im Detail|Prozess Context im Detail]] || 1 | | | 15 || [[Linux/SELinux/Prozess Context|Prozess Context]] |
| | | || 1 |
| |- | | |- |
| | 15 | [[#SELinux und Ansible|SELinux und Ansible]] || 1 | | | 16 || [[Linux/SELinux/Ansible|SELinux und Ansible]] |
| | | || 1 |
| |- | | |- |
| | 16 | [[#SELinux und Salt|SELinux und Salt]] || 1 | | | 17 || [[Linux/SELinux/Salt|SELinux und Salt]] |
| | | || 1 |
| |- | | |- |
| | 17 | [[#SELinux und Container|SELinux und Container]] || 1 | | | 18 || [[Linux/SELinux/Container|SELinux und Container]] |
| | | || 1 |
| |} | | |} |
|
| |
|
| == Security Context auf Dateien und Verzeichnissen ==
| | <!-- |
| * Interpretation des SELinux Context Types
| | == Prüfung == |
| * Standardverhalten beim Verschieben einer Datei mit mv
| | [[IT-Grundschutz/Praktiker/Prüfung|Zertifikatsprüfung]] zum [[Seminar/Grundschutz/Praktiker|Grundschutz-Praktiker]] |
| * Standardverhalten beim Kopieren einer Datei mit cp
| |
| * Einfluss des restorecond auf unsere Label
| |
| * SELinux Optionen bei mv, cp, mkdir, tar, rsync
| |
| | |
| == Extended (File) Attributes (xattr) == | |
| | |
| * Verfügbare Namespaces (security, system, trusted, user)
| |
| * Verwaltung mit getfattr, setfattr
| |
| * Syscall Analyse mit strace (stat, fstat, statx, getxattr, lgetxattr, fgetxattr, ...)
| |
| * Sichern und wiederherstellen der Extended Attributes mit tar
| |
| * Kopieren der Extended Attributes mit rsync
| |
| | |
| == Security Context Verwaltung ==
| |
| | |
| * Context setzen mit chcon
| |
| * Category und Sensitivity Label setzen mit chcat
| |
| | |
| == File Context Verwaltung ==
| |
| | |
| * Verhalten bei Dateisystemen mit und ohne xattr Unterstützung
| |
| * Mount Optionen für SELinux (context=, defcontext=, fs,context=, rootcontext=)
| |
| | |
| == Context Expressions ==
| |
| | |
| * File Contexte anzeigen
| |
| * Aufbau der File Context Regeln (regex, class, label)
| |
| * Context Expressions Prioritätsregeln
| |
| * Context Analyse mit matchpathcon
| |
| | |
| == Security Context (fcontext) einer Datei ändern ==
| |
| | |
| * chcon vs. semanage
| |
| * Definieren von neuen Regeln in der Policy
| |
| * Reparieren von falsch gesetzten Labeln
| |
| * Äquivalenz Regeln definieren
| |
| * restorecon und SHA256 digests
| |
| * Hash Überprüfung mit restorecon_xattr
| |
| * Restorecon Aussnahmen bei customizable types
| |
| * /etc/selinux/targeted/contexts/files/
| |
| * Lokale Änderungen exportieren/importieren mit semanage
| |
| * Setzen und Reparieren von Kontexten mit setfiles
| |
| * Reparieren von Kontexten mit fixfiles (check, restore, relabel, onboot)
| |
| | |
| == Named File Transitions Rules ==
| |
| | |
| * Problematik von manuell gesetzen Kontexten
| |
| * File vs. Named File Transitions Rules
| |
| * /etc/selinux/restorecond.conf
| |
| * /etc/selinux/restorecond_user.conf
| |
| | |
| == Systemd und Temporäre Verzeichnisse ==
| |
| | |
| * Datei und Verzeichnis Erstellung durch Systemd
| |
| * SELinux Context setzen via systemd-tmpfiles
| |
| | |
| == strace und SELinux Context Printing ==
| |
| | |
| * Context Abfrage bei Prozessen analysieren
| |
| | |
| == SELinux und Benutzer Login ==
| |
| | |
| * SELinux Context von Benutzern
| |
| * SELinux User und SELinux Role Mapping im Detail
| |
| * Analyse mit seinfo
| |
| * SELinux Roles in der Targeted Policy im Detail (Aufgaben, Fähigkeiten, ...)
| |
| * Auswirkung der SELinux Role auf die Prozess Domain
| |
| * Linux User <-> SELinux User Mapping
| |
| * Service spezifische Role Zuweisung
| |
| * Praktische Übungen mit SELinux User und Roles
| |
| * Erstellen eines eigenen SELinux Users
| |
| * Linux Benutzer mit/ohne SELinux User Zuweisung löschen
| |
| | |
| == Verwalten von Kategorien ==
| |
| | |
| * Planen und definieren von eigenen MCS Categories
| |
| * Übersetzungen mit setrans und mcstransd erstellen
| |
| * chcon vs. chcat
| |
| * Kategorien mit chcat auf Dateien, Verzeichnissen und Benutzern verwalten
| |
|
| |
|
| == Arbeiten mit SELinux Roles ==
| | ; Prüfungstermine |
| | * Am letzten Seminartag |
| | * Nach Vereinbarung |
|
| |
|
| * Standard Role definieren
| | ; Prüfungsort |
| * /etc/selinux/targeted/contexts/default_contexts
| | * Vor Ort |
| * Boolean Anpassungen für SELinux Roles
| | * Online |
| * Wechseln zwischen erlaubten Roles mit newrole
| |
| * sudo und SELinux Roles
| |
| * SELinux spezifische Parameter bei sudo Regeln | |
| * Benutzer Programme via runcon mit unterschiedlichen Kontexten starten | |
|
| |
|
| == Pluggable Authentication Modules (PAM) ==
| | ; Prüfungs-Tipp |
| | : Vor- und Nachbereitung der Schulungstage |
|
| |
|
| * Grundlagen PAM Architektur
| | ; Weitere Informationen |
| * pam_selinux.so | | * [[...]] |
| * pam_sepermit.so
| | --> |
| * pam_namespace.so
| |
| * pam_oddjob_mkhomedir.so
| |
|
| |
|
| == Prozess Context im Detail ==
| | <noinclude> |
|
| |
|
| * Grundlagen allow Rule
| | == Anhang == |
| * Grundlagen Prozess Context
| | === Verwandte Seminare === |
| * Übergang zu einer Domäne
| | ; Sicherheit |
| * Memory Protection
| | {{Special:PrefixIndex/Seminar/Sicherheit}} |
| * Limitieren von (ungewollten) Domain Transitions
| |
| * Policy capabilities
| |
| * No New Privilege (NNP)
| |
| * Type Attributes
| |
| * Abfragen von Domain Permissions
| |
| * Constraints
| |
|
| |
|
| == SELinux und Ansible ==
| | ; Linux |
| | {{Special:PrefixIndex/Seminar/Linux}} |
|
| |
|
| * Einrichten eines schnellen Ansible Roles Basissetups
| | === Skript === |
| * Dateisystem und SELinux Context
| |
| * SELinux Custom Policy verteilen
| |
| * Überblick Ansible native SELinux Module
| |
|
| |
|
| == SELinux und Salt == | | === Siehe auch === |
|
| |
|
| * Einrichten eines schnellen Salte State Basissetups
| | ==== Weblinks ==== |
| * Dateisystem und SELinux Context
| |
| * SELinux Custom Policy verteilen
| |
| * Überblick SaltStack native SELinux Module
| |
|
| |
|
| == SELinux und Container ==
| | [[Kategorie:Seminar/Linux]] |
| | [[Kategorie:Seminar/Sicherheit]] |
|
| |
|
| * Podman Container Basis Test
| | </noinclude> |
| * Podman und SELinux Multi-Category Security (MCS) Verhalten
| |
| * Podman Volumes und SELinux MCS Context Probleme
| |
| * Shared Volume mit richtigen MCS Context versehen
| |
| * Container Domain Transition
| |
| * Analyse von erlaubten domain Transition mit sesearch
| |
| * Container mit definierten Process Domain anstarten
| |
| * Domain Transition unconfined_t vs. spc_t
| |
| * Eigene Container Policy mit udica erstellen
| |