Linux-Persistenztechniken
Jede Stelle in einem Linux-System, die Code erneut ausführen lässt: was sie liest und wann, wo sie liegt, wie Angreifer sie missbrauchen und wie Sie einen Host prüfen. Jede Seite ist MITRE ATT&CK zugeordnet und dem, was das Tool Linux Persistence markiert.
Nach Auslöser
Beim Systemstart
- Kernel modulesAuf EnglischHow attackers load rootkit kernel modules at boot and abuse modprobe install lines, what the configuration reveals, and how to check and clean a Linux host.T1547.006root
- rc.localAuf EnglischHow /etc/rc.local runs commands as root at every boot through rc-local.service, how attackers plant payloads in it, and how to check and clean a host.T1037.004root
- systemd generatorsAuf EnglischHow systemd generators run as root at every boot and daemon-reload, how attackers use them to create units that exist only in /run, and how to audit them.T1543.002root
- systemd servicesAuf EnglischHow attackers persist with systemd services, sockets, path units, drop-in overrides and lingering user units on Linux, and how to find and remove them.T1543.002Benutzer und root
- SysV init scriptsAuf EnglischHow attackers persist with /etc/init.d scripts and rc?.d start links on SysV and systemd hosts, and how to find, verify and remove a malicious init script.T1037.004root
Zeitgesteuert
- At jobsAuf EnglischHow attackers use at and atd for delayed or self-renewing jobs on Linux, what a spool file reveals about who queued it, and how to list and remove jobs.T1053.002Benutzer und root
- Cron jobsAuf EnglischHow attackers persist with crontab, /etc/cron.d, run-parts folders and anacron on Linux, and how to find, verify and remove a malicious cron job.T1053.003Benutzer und root
- Logrotate scriptsAuf EnglischHow attackers hide commands in logrotate postrotate, prerotate, firstaction and lastaction scripts that run daily as root, and how to find and remove them.root
- systemd timersAuf EnglischHow attackers use systemd timers instead of cron for scheduled persistence on Linux, where timer units live, and how to list, verify and remove them.T1053.006Benutzer und root
Bei der Anmeldung
- Local accountsAuf EnglischHow attackers add UID 0 users, empty passwords, shells on service accounts and root-equivalent groups on Linux, and how to audit passwd, shadow and group.T1136.001T1078.003root
- MOTD scriptsAuf EnglischHow Debian and Ubuntu run /etc/update-motd.d scripts as root at every login through pam_motd, how attackers abuse them, and how to check and clean a host.root
- XDG autostartAuf EnglischHow .desktop files in /etc/xdg/autostart and ~/.config/autostart start programs at every desktop login, how attackers abuse them, and how to check a host.T1547.013Benutzer und root
Bei jeder neuen Shell
- History tamperingAuf EnglischHow intruders stop or wipe shell history on Linux (.bash_history linked to /dev/null, HISTFILE unset), why it travels with persistence, and how to check.T1070.003Benutzer und root
- Shell startup filesAuf EnglischHow .bashrc, .profile, /etc/profile.d and zsh files run code at every login or shell, how attackers plant aliases and payloads in them, and how to check.T1546.004Benutzer und root
Bei SSH-Anmeldung
- SSH authorized keysAuf EnglischHow attackers plant SSH keys, forced commands and ~/.ssh/rc scripts to keep access to Linux hosts, and how to find rogue authorized_keys entries.T1098.004Benutzer und root
- sshd configurationAuf EnglischHow attackers change sshd_config, its drop-ins and Match blocks to keep SSH access to Linux hosts, and how to audit the effective OpenSSH server settings.T1098.004root
Bei der Authentifizierung
Berechtigung
Bei einem Ereignis
Bei Netzwerkänderung
Bei Paketinstallation
Bei jedem Programmstart
Kurzübersicht
Eine Zeile pro Technik: wann sie ausgeführt wird, wer sie einrichten kann, die wichtigsten Speicherorte und die ATT&CK-Zuordnung.
| Technik | Auslöser | Eingerichtet von | Wichtigste Speicherorte | ATT&CK |
|---|---|---|---|---|
| At jobsAuf Englisch | Zeitgesteuert | Benutzer und root | /var/spool/cron/atjobs/* · /var/spool/at/* · /etc/at.allow · /etc/at.deny | T1053.002 |
| Cron jobsAuf Englisch | Zeitgesteuert | Benutzer und root | /etc/crontab · /etc/cron.d/* · /etc/cron.hourly/* · /etc/cron.daily/* | T1053.003 |
| History tamperingAuf Englisch | Bei jeder neuen Shell | Benutzer und root | ~/.bash_history · ~/.zsh_history · /root/.bash_history · ~/.bashrc | T1070.003 |
| Kernel modulesAuf Englisch | Beim Systemstart | root | /etc/modules · /etc/modules-load.d/*.conf · /etc/modprobe.d/*.conf · /usr/lib/modules-load.d/*.conf | T1547.006 |
| LD_PRELOAD / ld.so.preloadAuf Englisch | Bei jedem Programmstart | Benutzer und root | /etc/ld.so.preload · /etc/ld.so.conf · /etc/ld.so.conf.d/*.conf · /etc/environment | T1574.006 |
| Local accountsAuf Englisch | Bei der Anmeldung | root | /etc/passwd · /etc/shadow · /etc/group · /etc/gshadow | T1136.001, T1078.003 |
| Logrotate scriptsAuf Englisch | Zeitgesteuert | root | /etc/logrotate.conf · /etc/logrotate.d/* | — |
| MOTD scriptsAuf Englisch | Bei der Anmeldung | root | /etc/update-motd.d/* · /etc/pam.d/sshd · /etc/pam.d/login · /run/motd.dynamic | — |
| Network hooksAuf Englisch | Bei Netzwerkänderung | root | /etc/NetworkManager/dispatcher.d/* · /etc/network/if-up.d/* · /etc/network/if-pre-up.d/* · /etc/ppp/ip-up.d/* | — |
| Package manager hooksAuf Englisch | Bei Paketinstallation | root | /etc/apt/apt.conf.d/* · /etc/dpkg/dpkg.cfg.d/* · /etc/dnf/plugins/*.conf · /etc/yum/pluginconf.d/*.conf | T1546.016 |
| PAM backdoorsAuf Englisch | Bei der Authentifizierung | root | /etc/pam.d/* · /etc/pam.conf · /usr/share/pam-configs/* · /usr/lib/x86_64-linux-gnu/security/*.so | T1556.003 |
| rc.localAuf Englisch | Beim Systemstart | root | /etc/rc.local · /etc/rc.d/rc.local · /usr/lib/systemd/system/rc-local.service | T1037.004 |
| Shell startup filesAuf Englisch | Bei jeder neuen Shell | Benutzer und root | /etc/profile · /etc/profile.d/*.sh · /etc/bash.bashrc · /etc/bashrc | T1546.004 |
| SSH authorized keysAuf Englisch | Bei SSH-Anmeldung | Benutzer und root | ~/.ssh/authorized_keys · ~/.ssh/authorized_keys2 · /root/.ssh/authorized_keys · ~/.ssh/rc | T1098.004 |
| sshd configurationAuf Englisch | Bei SSH-Anmeldung | root | /etc/ssh/sshd_config · /etc/ssh/sshd_config.d/*.conf · /etc/ssh/sshrc · /etc/default/ssh | T1098.004 |
| Sudoers rulesAuf Englisch | Berechtigung | root | /etc/sudoers · /etc/sudoers.d/* · /etc/sudo.conf | T1548.003 |
| systemd generatorsAuf Englisch | Beim Systemstart | root | /etc/systemd/system-generators/* · /usr/local/lib/systemd/system-generators/* · /usr/lib/systemd/system-generators/* · /run/systemd/system-generators/* | T1543.002 |
| systemd servicesAuf Englisch | Beim Systemstart | Benutzer und root | /etc/systemd/system/* · /etc/systemd/system/<unit>.d/*.conf · /usr/lib/systemd/system/* · /usr/local/lib/systemd/system/* | T1543.002 |
| systemd timersAuf Englisch | Zeitgesteuert | Benutzer und root | /etc/systemd/system/*.timer · /etc/systemd/system/timers.target.wants/* · /usr/lib/systemd/system/*.timer · ~/.config/systemd/user/*.timer | T1053.006 |
| SysV init scriptsAuf Englisch | Beim Systemstart | root | /etc/init.d/* · /etc/rc[0-6S].d/* · /etc/rc.d/init.d/* · /etc/rc.d/rc[0-6].d/* | T1037.004 |
| udev rulesAuf Englisch | Bei einem Ereignis | root | /etc/udev/rules.d/*.rules · /run/udev/rules.d/*.rules · /usr/lib/udev/rules.d/*.rules · /lib/udev/rules.d/*.rules | T1546.017 |
| XDG autostartAuf Englisch | Bei der Anmeldung | Benutzer und root | /etc/xdg/autostart/*.desktop · ~/.config/autostart/*.desktop | T1547.013 |
Abdeckung von MITRE ATT&CK
Die ATT&CK-Techniken, die diese Seiten und das Tool abdecken. Einige Mechanismen haben keine eigene Untertechnik und sind unter der nächstliegenden übergeordneten Technik aufgeführt.