Harden the whole server
No step-by-step this time. This server has every weakness from the course at once: an unsafe SUID binary, an over-broad sudo rule, a world-writable /etc/passwd, a writable cron script, a writable directory on root's PATH, and a leaked password.
Audit it, fix all six, and leave the box hardened. Then write a short report of what you changed.
How it works: the terminal below is a real Linux machine running in your browser. Click it and
type. Tasks tick themselves off as you complete them; questions are answered in the box under each task.
Press Reset any time for a fresh machine. Your password on this machine (for
sudo) is student.
Hints
Work the checklist: `chmod u-s /usr/bin/find`, `chmod 644 /etc/passwd`, remove the sudoers rule, fix the cron script and PATH dir, clear the config secret — all with sudo.
Re-run the audit (`find / -perm -4000`, `ls -l /etc/passwd`, `sudo -l`) to confirm nothing is left.
Solution explanation
You ran a full hardening pass: stripped the unsafe SUID bit, removed the over-broad sudo rule, restored /etc/passwd to 644, locked down the cron script and the writable PATH directory, and cleared the leaked secret. Every single path you learned to exploit in the Privilege Escalation course is now closed. That is the whole loop of security work — understand the attack, then make it impossible — and the re-check afterwards is what proves the job is done.
Show solution
cd /home/student
sudo chmod u-s /usr/bin/find
sudo chmod 644 /etc/passwd
sudo rm /etc/sudoers.d/student-maint
sudo chmod 755 /opt/backup/backup.sh
sudo chmod 755 /opt/maint/bin
sudo sed -i '/DB_PASS/d' /var/www/app/config.php
echo 'Hardened: SUID find, /etc/passwd 644, removed sudo less rule, cron script perms, PATH dir, cleared config secret.' > /home/student/report.txt