Labs / Read the Permissions
LinuxMedium

Read the Permissions

During a security review you run ls -l on some important files of a Linux server. Read the permissions and answer the questions. Get all of them right to receive the flag.

$ ls -l /etc/passwd /etc/shadow /usr/bin/passwd /opt/backup.sh /home/deploy/.ssh/id_rsa
-rw-r--r-- 1 root   root    2104 Nov 30 10:12 /etc/passwd
-rw-r----- 1 root   shadow  1203 Nov 30 10:12 /etc/shadow
-rwsr-xr-x 1 root   root   64152 Oct 12 08:01 /usr/bin/passwd
-rwxrwxrwx 1 root   root     312 Dec  1 22:40 /opt/backup.sh
-rw------- 1 deploy deploy  2602 Nov 28 14:05 /home/deploy/.ssh/id_rsa

$ sudo crontab -l -u root
0 * * * * /opt/backup.sh
1. Which file can every user on the system modify?
2. Which file has the SUID bit set?
3. What is the numeric (octal) permission of /home/deploy/.ssh/id_rsa?
4. Root runs /opt/backup.sh every hour (see the crontab). Why is that dangerous here?

Submit the flag