Tryhackme writeup:Linux Privilege Escalation Capstone Challenge

2023-04-27

Try every method in the teaching part.

  1. Enumeration: find the kernel version and search for a vulnerability to exploit. Unfortunately, no vulnerability for this kernel was found.
  2. SUDO: sudo -l found leonard cannot run sudo.
  3. SUID: “find / -type f -perm -04000 -ls 2>/dev/null” found out that base64 can be used. This is a good one, we can use the method in [gtfosbins]https://gtfobins.github.io/gtfobins/base64/ to read a file that otherwise requires a root privilege. Try to find the location of the two flag files with “find / -name flag1.txt 2>/dev/null” and “find / -name flag2.txt 2>/dev/null” showing no results.
  4. Capabilities: “getcap -r / 2>/dev/null” shows no interesting results.
  5. Cron jobs: “cat /etc/crontab”, no cron jobs defined.
  6. PATH: I tried with no success.
  7. NFS: “cat /etc/exports” no result.
Read More