Missions / Linux

Three Roads to Root

AdvancedLinux200 points~20 min

You are doing an authorised internal test of ChaiCorp's build server. You were given the low-privilege account intern. Your goal is to report every way this account could become root.

You ran the commands below. Some findings are real escalation paths, some are normal Linux behaviour. Separate the two.

shell id and sudo -l
intern@build01:~$ id
uid=1004(intern) gid=1004(intern) groups=1004(intern),1005(devs)

intern@build01:~$ sudo -l
Matching Defaults entries for intern on build01:
    env_reset, mail_badpass, secure_path=/usr/local/sbin\:/usr/local/bin\:/usr/sbin\:/usr/bin\:/sbin\:/bin

User intern may run the following commands on build01:
    (root) /usr/bin/systemctl status nginx
    (root) NOPASSWD: /usr/bin/find
shell ls -l of interesting files
intern@build01:~$ ls -l /etc/passwd /etc/shadow /usr/bin/passwd /usr/bin/base64 /usr/bin/sudo
-rw-r--r-- 1 root root    2154 Oct  2 10:11 /etc/passwd
-rw-r----- 1 root shadow  1302 Oct  2 10:11 /etc/shadow
-rwsr-xr-x 1 root root   45056 Feb  6  2026 /usr/bin/base64
-rwsr-xr-x 1 root root   64152 May 30  2025 /usr/bin/passwd
-rwsr-xr-x 1 root root  277936 Jun 25  2025 /usr/bin/sudo

intern@build01:~$ ls -l /opt/backup /opt/deploy
/opt/backup:
-rwxrwxrwx 1 root root  412 Nov  3 22:40 backup.sh
-rw-r--r-- 1 root root   88 Nov  3 22:40 README

/opt/deploy:
-rwxr-xr-x 1 root root  1290 Nov  1 09:15 deploy.sh
-rw-r--r-- 1 root devs   640 Nov  1 09:15 settings.conf
shell cat /etc/crontab
intern@build01:~$ cat /etc/crontab
SHELL=/bin/sh
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin

# m  h  dom mon dow user  command
17 *  *   *   *   root  cd / && run-parts --report /etc/cron.hourly
*/5 * *   *   *   root  /opt/backup/backup.sh
30 2  *   *   *   root  /opt/deploy/deploy.sh --nightly

Need help? Review: Files and Permissions · Users, Processes and Services · Lab: Read the Permissions

0/6 solved0 / 200 pts

Q1. Which program can intern run as root without typing a password?

worth 33 pts

Q2. Which script is run by root from cron AND can be edited by any user?

worth 33 pts

Q3. How often, in minutes, does that script run?

worth 33 pts

Q4. One SUID binary is not normal and lets any user read root-only files. Which one?

worth 33 pts

Q5. Which of these is normal and NOT a finding?

worth 33 pts

Q6. intern is in the devs group and devs owns /opt/deploy/settings.conf. Is that an escalation path?

worth 33 pts