I've been battling with one school task for a couple of days and can't seem to find any idea how to solve it. The task is pretty simple:
On the server there is a secret.txt file in the /root folder, which is owned by root. The task is to read the contents of this file, which contains the answer. To solve the task, use one of the programs with SUID privileges to access the root account.
First I check which programs do have SUID privileges by using command
find / -perm /4000 which returns these programs:
/usr/bin/chfn /usr/bin/umount /usr/bin/passwd /usr/bin/mount /usr/bin/chsh /usr/bin/date /usr/bin/gpasswd /usr/bin/newgrp /usr/bin/procmail /usr/lib/openssh/ssh-keysign /usr/lib/dbus-1.0/dbus-daemon-launch-helper /usr/sbin/sensible-mda
And I don't have any idea how to proceed with it.
Is there any way to use
procmail to read the file while
.procmailrc which resulted in
Permission Denied, or had to use