Back to blog
Jun 27, 2025
5 min read

Linux Privilege Escalation

Learn the fundamentals of Linux privilege escalation. From enumeration to exploitation, get hands-on with over 8 different privilege escalation techniques.

Jr Penetration Tester > Privilege Escalation > Linux Privilege Escalation

Linux Privilege Escalation

Task 1

Introduction

  1. Read the above.
No answer needed

Task 2

What is Privilege Escalation?

  1. Read the above.
No answer needed

Task 3

Enumeration

  1. What is the hostname of the target system?
    ¿Cuál es el nombre de host del sistema objetivo?
wade7363
  1. What is the Linux kernel version of the target system?
    ¿Cuál es la versión del kernel de Linux del sistema objetivo?
3.13.0-24-generic
  1. What Linux is this?
    ¿Qué distribución de Linux es esta?
Ubuntu 14.04 LTS
  1. What version of the Python language is installed on the system?
    ¿Qué versión del lenguaje Python está instalada en el sistema?
2.7.6
  1. What vulnerability seem to affect the kernel of the target system? (Enter a CVE number)
    ¿Qué vulnerabilidad parece afectar al kernel del sistema objetivo? (Ingresa un número de CVE)
CVE-2015-1328

Task 4

Automated Enumeration Tools

  1. Install and try a few automated enumeration tools on your local Linux distribution
    Instala y prueba algunas herramientas automatizadas de enumeración en tu distribución local de Linux.
No answer needed

Task 5

Privilege Escalation: Kernel Exploits

  1. find and use the appropriate kernel exploit to gain root privileges on the target system.
No answer needed
  1. What is the content of the flag1.txt file?
    ¿Cuál es el contenido del archivo flag1.txt?
THM-28392872729920

Task 6

Privilege Escalation: Sudo

  1. How many programs can the user “karen” run on the target system with sudo rights?
    ¿Cuántos programas puede ejecutar el usuario “karen” en el sistema objetivo con privilegios de sudo?
3
  1. What is the content of the flag2.txt file?
    ¿Cuál es el contenido del archivo flag2.txt?
THM-402028394
  1. How would you use Nmap to spawn a root shell if your user had sudo rights on nmap?
    ¿Cómo usarías Nmap para obtener una shell como root si tu usuario tuviera privilegios de sudo sobre Nmap?
sudo nmap --interactive
  1. What is the hash of frank’s password?
    ¿Cuál es el hash de la contraseña de frank?
$6$2.sUUDsOLIpXKxcr$eImtgFExyr2ls4jsghdD3DHLHHP9X50Iv.jNmwo/BJpphrPRJWjelWEz2HH.joV14aDEwW1c3CahzB1uaqeLR1

Task 7

Privilege Escalation: SUID

  1. Which user shares the name of a great comic book writer?
    ¿Qué usuario comparte el nombre de un gran escritor de cómics?
gerryconway
  1. What is the password of user2?
    ¿Cuál es la contraseña del usuario2?
Password1
  1. What is the content of the flag3.txt file?
    ¿Cuál es el contenido del archivo flag3.txt?
THM-3847834

Task 8

Privilege Escalation: Capabilities

  1. Complete the task described above on the target system
No answer needed
  1. How many binaries have set capabilities?
    ¿Cuántos binarios tienen capacidades establecidas?
6
  1. What other binary can be used through its capabilities?
    ¿Qué otro binario puede utilizarse a través de sus capacidades?
view
  1. What is the content of the flag4.txt file?
    ¿Cuál es el contenido del archivo flag4.txt?
THM-9349843

Task 9

Privilege Escalation: Cron Jobs

  1. How many user-defined cron jobs can you see on the target system?
    ¿Cuántos trabajos cron definidos por el usuario puedes ver en el sistema objetivo?
4
  1. What is the content of the flag5.txt file?
    ¿Cuál es el contenido del archivo flag5.txt?
THM-383000283
  1. What is Matt’s password?
    ¿Cuál es la contraseña de Matt?
123456

Task 10

Privilege Escalation: PATH

  1. What is the odd folder you have write access for?
    ¿Cuál es la carpeta extraña para la que tienes permisos de escritura?
/home/murdoch
  1. Exploit the $PATH vulnerability to read the content of the flag6.txt file.
No answer needed
  1. What is the content of the flag6.txt file?
    ¿Cuál es el contenido del archivo flag6.txt?
THM-736628929

Task 11

Privilege Escalation: NFS

  1. How many mountable shares can you identify on the target system?
    ¿Cuántos recursos compartidos montables puedes identificar en el sistema objetivo?
3
  1. How many shares have the “no_root_squash” option enabled?
    ¿Cuántos recursos compartidos tienen habilitada la opción “no_root_squash”?
3
  1. Gain a root shell on the target system
No answer needed
  1. What is the content of the flag7.txt file?
    ¿Cuál es el contenido del archivo flag7.txt?
THM-89384012

Task 12

Capstone Challenge

  1. What is the content of the flag1.txt file?
    ¿Cuál es el contenido del archivo flag1.txt?
THM-42828719920544
  1. What is the content of the flag2.txt file?
    ¿Cuál es el contenido del archivo flag2.txt?
THM-168824782390238