Skip to Content
Linux Security

Linux Security

Linux privilege escalation techniques, system hardening, and vulnerability exploitation for penetration testing and security assessments.

Dec 11, 2025
Updated Nov 22, 2026
2 min read

Overview

These notes cover local privilege escalation on Linux: the misconfigurations that turn a low-privileged shell into root, the kernel bugs to fall back on when nothing else works, and the hardening steps that close each path.

Privilege escalation techniques

Sudo and permissions

Code execution and injection

Scheduled tasks and services

Kernel exploitation

  • Kernel Exploits: public kernel exploits for when the misconfiguration paths come up empty

System hardening

Attack methodology

Phase 1: enumeration

Run LinPEAS or LinEnum and read the output for:

  • User privileges and group memberships
  • Sudo permissions and SUID binaries
  • Cron jobs and scheduled tasks
  • Kernel version and installed software
  • File permissions and capabilities
  • Network services and configurations

Phase 2: privilege analysis

Look for:

  • Dangerous sudo rules (NOPASSWD, wildcards)
  • SUID/SGID binaries
  • Writable files in privileged locations
  • Exploitable capabilities
  • Cron jobs with path injection points
  • Outdated kernel versions

Phase 3: exploitation

  • Abuse the misconfigurations found in phase 2
  • Exploit vulnerable software versions
  • Abuse intended functionality
  • Chain several weaker issues when no single one gets you root

Phase 4: persistence

  • SSH key installation
  • Cron job backdoors
  • Modified system binaries
  • PAM backdoors
  • Kernel module rootkits

Enumeration tools

ToolPrimary use
LinPEASAutomated privilege escalation enumeration
LinEnumSystem enumeration script
pspyProcess monitoring without root
GTFOBinsSUID/sudo exploit database

Common SUID binaries

These standard binaries can give root command execution or file access when they have the SUID bit set (nmap only in old versions with --interactive):

  • /usr/bin/find
  • /usr/bin/vim
  • /usr/bin/nmap
  • /usr/bin/python
  • /usr/bin/perl

GTFOBins has the exact command for each.

On this page