Cybertalents
Cyber Securities

Linux essentials for cybertalents

Share
Share

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

TechEDimage 7 1 19 10

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.

TechEDimage 7 1 19 1

Linux Basic Commands

remove

TechEDimage 7 1 19 2 1

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

TechEDimage 7 1 19 3

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.

TechEDimage 7 1 19 4

File System

D15C0v3ry

TechEDimage 7 1 19 5 1 1

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.

TechEDimage 7 1 19 6 1

File Operations

Grep Master

TechEDimage 7 1 19 7

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.

TechEDimage 7 1 19 8

Text Operations

Bash Legend

TechEDimage 7 1 19 9 1

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.

TechEDimage 7 1 19 10 1 1

After this, we use sed to remove No not this 🙂 from the output.

TechEDimage 7 1 19 11 1

From this we can use sed again to remove the blank spaces.

TechEDimage 7 1 19 12

Having this output we can use the cut command to remove the unnecessary columns of words.

TechEDimage 7 1 19 13 1

Now we can remove the new line so that we can get the flag in one line.

TechEDimage 7 1 19 14 1

Cutter

TechEDimage 7 1 19 15 2

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.

TechEDimage 7 1 19 16

We’ll use the sed command to clean up the data.

TechEDimage 7 1 19 17 1

Let remove the new line so that we can get the whole word.

TechEDimage 7 1 19 18 2

We see that it is a base64 encoded word because of the double = sign. Lets decode it from our terminal and get the flag.

TechEDimage 7 1 19 19

Repeated

TechEDimage 7 1 19 2 10 1

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.

TechEDimage 7 1 19 2 11

Now lets use the cut command to only have the last column and also use tr to remove the new line.

TechEDimage 7 1 19 2 12 1

User Groups

Secret User

TechEDimage 7 1 19 2 13

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.

TechEDimage 7 1 19 2 14

File Permissions

Permission Master

TechEDimage 7 1 19 2 15 1

This challenge expects us to make the stated file executable and by doing so when we execute it, we will be given our flag.

TechEDimage 7 1 19 2 16 1

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.

TechEDimage 7 1 19 2 17 1

Network Communications

C0unt3r 

TechEDimage 7 1 19 2 18

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.

TechEDimage 7 1 19 30 1

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.

Share

Leave a comment

Leave a Reply

Your email address will not be published. Required fields are marked *

Related Articles
enable whatsapp encryption 1
Cyber Securities

How to secure your WhatsApp Messenger

WhatsApp is a free messaging application that allows one-to-one communication or in...

Safaricom sim swap
Cyber SecuritiesTutorials

How to block your Safaricom sim card from getting replaced at an M-Pesa agent

In wake of recent fraud activities which lead to fraudsters getting access...

TechEDdata backup g5da28fb78 1920 1
Cyber Securities

How to protect yourself online.

USING STRONG PASSWORDS. Passwords you use for your sites must be complex...

Cyber Security
Cyber Securities

Understanding Cyber Security and what it entails

In this article, we will discuss what is cyber security, how to...

Discover more from TechED Africa

Subscribe now to keep reading and get access to the full archive.

Continue reading