Linux PrivEsc Arena

Room Link: https://tryhackme.com/room/linuxprivescarena

Privilege Escalation - Kernel Exploits

In command prompt type:

Victim

/home/user/tools/linux-exploit-suggester/linux-exploit-suggester.sh

From the output, notice that the OS is vulnerable to “dirtycow”.

Exploitation

Linux VM

In command prompt type:

Victim

In command prompt type:

Victim

Disclaimer: This part takes 1-2 minutes - Please allow it some time to work.

In command prompt type:

Victim

In command prompt type:

Victim

From here, either copy /tmp/passwd back to /usr/bin/passwd or reset your machine to undo changes made to the passwd binary

Victim

Privilege Escalation - Stored Passwords (Config Files)

From the output, make note of the value of the “auth-user-pass” directive.

Victim

From the output, make note of the clear-text credentials.

Victim

From the output, make note of the clear-text credentials.

Victim

Privilege Escalation - Stored Passwords (History)

Victim

From the output, make note of the clear-text credentials.

Privilege Escalation - Weak File Permissions

Victim

Save the output to a file on your attacker machine

Victim

Save the output to a file on your attacker machine

Kali

Privilege Escalation - SSH Keys

Found nothing for this box

Victim

Victim

Netcat

Kali(receiving)

Victim(sending)

Kali

Privilege Escalation - Sudo (Shell Escaping)

Victim

Victim

Victim

Victim

Victim

Privilege Escalation - Sudo (Abusing Intended Functionality)

Victim

Victim

Kali

Privilege Escalation - Sudo (LD_PRELOAD)

Victim

exploit.c

Victim

Privilege Escalation - SUID (Shared Object Injection)

Victim

Victim

Victim

libcalc.c

Victim

Victim #1

Victim #1

Victim #1

Victim #2

Victim #1

Privilege Escalation - SUID (Environment Variables #1)

Detection

Victim

Victim

Exploitation

Victim

Victim

Victim

Privilege Escalation - SUID (Environment Variables #2)

Detection

Victim

Victim

Exploitation Method #1

Victim

Victim

Victim

Exploitation Method #2

Victim

Privilege Escalation - Capabilities

Victim

Victim

Privilege Escalation - Cron (Path)

Detection

Victim

Exploitation

Victim

Wait 1 minute for the Bash script to execute.

Victim

Privilege Escalation - Cron (Wildcards)

Detection

From the output, notice the script “/usr/local/bin/compress.sh”

Victim

Victim

Exploitation

Victim

Victim

Victim

Privilege Escalation - Cron (File Overwrite)

Detection

From the output, notice the script “overwrite.sh”

Victim

From the output, notice the file permissions.

Victim

Exploitation

Victim

Wait 1 minute for the Bash script to execute.

Victim

Privilege Escalation - NFS Root Squashing

Detection

From the output, notice that “no_root_squash” option is defined for the “/tmp” export.

Victim

Exploitation

Kali

Kali

Kali

Kali

Victim

Last updated