Level05
CRON Job & Shell script
Last updated
Was this helpful?
CRON Job & Shell script
Last updated
Was this helpful?
Using the technique of the Level01 we get the following result :
Both of the files contains the same shell script which is :
The code is straight forward :
Gets all file of the directory /opt/openarenaserver/
Set the CPU time limit to 5 Seconds
Execute the file that is being processed
Delete the file
When we create a simple file in /opt/openarenaserver
and execute the program /usr/sbin/openarenaserver
it says the following :
So we do not have the correct writes.
We also have a file called level05 that is found by the following command :
This file contains the following content
This means that each 2 minutes the script /usr/sbin/openarenaserver
is getting executed.
So all we need to do is just put a shell script file that will call and save the output of the command getflag and wait for 2 minutes.
We can use the following command to create our script in /opt/openarenaserver/
:
And this will create a file called flag05
in the directort /tmp and when wee see the content of the flag05
file we get :
So the Password to connect to the account level06 is viuaaale9huek52boumoomioc
It looks like a job and according to our command means execute the command sh /usr/sbin/openarenaserver
with the permission of flag05
every 2 minutes.