What is CYBERTALENTS
Cybertalents is a platform where cyber security enthusiasts and students practice their skills by doing some hands-on labs on some labs provided by the website. These challenges are inform of CTF (Capture The Flag) challenges that aid the the students to better their skills in cybersecurity.
In this article we shall discuss how to solve Linux Essentials in cybertalents. We will solve the following lessons:
- Introduction to Operating Systems.
- Linux basic commands.
- File Systems.
- File Operations.
- Text Operations.
- User Groups.
- File Permissions.
- Network Communications.
Introduction to Operating Systems
1337 SSH
We will login to our machine via the link generated and login with the given credentials. From the challenge description we are told to cat the /opt/banner file and we get the flag.
Linux Basic Commands
remove
From the description we are told to delete a secret file in the home directory. So how we go about this, since we can access the home folder using ‘~’. When you go to your Linux terminal and do a cd ~ you will be taken to your home directory. So deleting the file we will do the following rm ~/secret.
M45T3R
From the challenge we have to login to the server using the credentials provided and search for the flag in the tmp folder. The flag will be in a text file. When we visit the tmp folder we get a file called Iam_The_Flag.txt and when we cat the file we get the file.
File System
D15C0v3ry
In this challenge we will look for our flag in the /tmp/test1 folder. We’ll go to the folder using the cd command. After visiting the folder, we see another folder and now we will navigate to that other folder till we reach test5. Doing an ls in folder test5 it’s empty, so we do an ls -la so that we can see the hidden files and folders.
File Operations
Grep Master
In this challenge we will cat the linux_2_1.txt and check the flag. When we cat the file we get a lot of words and so we will use grep to look for the flag in that messed up data. You’ll use grep -i ‘flag{‘ linux_2_1.txt to look for the flag.
Text Operations
Bash Legend
In this challenged we are tasked to retrieve the flag from /tmp/linux_2_4.txt file. When we cat the file we see a lot of words repeating themselves, so will use the uniq command to only make the words appear once.
After this, we use sed to remove No not this 🙂 from the output.
From this we can use sed again to remove the blank spaces.
Having this output we can use the cut command to remove the unnecessary columns of words.
Now we can remove the new line so that we can get the flag in one line.
Cutter
For this challenge we are expected to get the flag from the txt file. When we can the file we are given a clue on what is expected.
We’ll use the sed command to clean up the data.
Let remove the new line so that we can get the whole word.
We see that it is a base64 encoded word because of the double = sign. Lets decode it from our terminal and get the flag.
Repeated
When we cat the file we see some lines are repeating themselves. Let’s use the uniq command to get rid of all the dups.
Now lets use the cut command to only have the last column and also use tr to remove the new line.
User Groups
Secret User
From this challenge we are required to find the secret user in the machine and submit it in the format stated. So to view the users we will cat the /etc/passwd file and you’ll see your user.
File Permissions
Permission Master
This challenge expects us to make the stated file executable and by doing so when we execute it, we will be given our flag.
When we give the file executable permissions and try to execute it ,it shows us the file permissions require. So we will use chmod to solve the challenge. So execute has number 1, write has number 2 and read has number 4. So having this in mind lets change the file’s permission. So for wx (write + execute) you will add 2 + 1 giving us 3. When we do this we get a base64 encoded text and when we decode it we get or flag.
Network Communications
C0unt3r
In this challenge we are required to identify the number of times cybertalents appears in the site stated. In this challenge we will use curl, grep and wc.
From the results we see that cybertalents appeared 115 times.
Happy hacking !!
Discover more from TechED Africa
Subscribe to get the latest posts sent to your email.