Linux — Post-exploitation
What to do after gaining access to a Linux host in an authorized test: understand the system, find the path to root and how the defensive team detects and prevents it.
START HERE
CARDS (11 cards)
linux/
- Linux Privilege Escalation
Escalating from an unprivileged user to root is the goal after getting access to a Linux host.
- Living off the Land on Linux
"Living off the Land" (LOTL) is operating using only the tools that already exist on the system, without uploading your own binaries.
- Linux Credential Theft
After compromising a Linux host, harvesting credentials is what lets you escalate, move to other systems, and persist.
- Linux Persistence
Linux persistence: cron, systemd services, SSH keys, shell profiles and other mechanisms, plus how the blue team detects them.
- Linux Enumeration
Linux enumeration after initial access: user, system, processes, network, sudo, SUID and cron to find the privilege escalation path.
- SUID/SGID Binaries
The SUID (Set User ID) bit makes a binary run with the permissions of its owner, not of whoever launches it. It's needed for certain operations (e.g.
- Sudo Abuse
sudo lets users run commands as another user (usually root) per rules in /etc/sudoers.
- Cron Jobs and Timers
Cron jobs and systemd timers as a Linux privilege escalation path: writable scripts, relative PATH and wildcards, and how to detect them.
- Linux Capabilities
Capabilities split root's powers into granular permissions that can be assigned to specific binaries, without giving them full SUID.
- Linux Kernel Exploits
When escalation via misconfigurations (sudo, SUID, cron, capabilities) bears no fruit, what remains is exploiting a vulnerability in the Linux kernel itself.
- Container and Docker Escapes
Containers (Docker, containerd, LXC) isolate processes, but that isolation is weaker than a VM's: they share the host's kernel.