Find the Flags

LinuxLinuxIntermediate
Practice Now

Introduction

This challenge is designed to test your proficiency in using different Linux commands to solve a series of challenges.

The challenge includes finding flags in different directories, extracting files from zip archives, editing files, and deleting specified files based on the contents of a flag file.


Skills Graph

%%%%{init: {'theme':'neutral'}}%%%% flowchart RL linux(("`Linux`")) -.-> linux/BasicFileOperationsGroup(["`Basic File Operations`"]) linux(("`Linux`")) -.-> linux/CompressionandArchivingGroup(["`Compression and Archiving`"]) linux(("`Linux`")) -.-> linux/TextProcessingGroup(["`Text Processing`"]) linux(("`Linux`")) -.-> linux/FileandDirectoryManagementGroup(["`File and Directory Management`"]) linux(("`Linux`")) -.-> linux/UserandGroupManagementGroup(["`User and Group Management`"]) linux/BasicFileOperationsGroup -.-> linux/cat("`File Concatenating`") linux/CompressionandArchivingGroup -.-> linux/unzip("`Decompressing`") linux/TextProcessingGroup -.-> linux/grep("`Pattern Searching`") linux/FileandDirectoryManagementGroup -.-> linux/cd("`Directory Changing`") linux/BasicFileOperationsGroup -.-> linux/ls("`Content Listing`") linux/BasicFileOperationsGroup -.-> linux/mv("`File Moving/Renaming`") linux/UserandGroupManagementGroup -.-> linux/sudo("`Privilege Granting`") subgraph Lab Skills linux/cat -.-> lab-7931{{"`Find the Flags`"}} linux/unzip -.-> lab-7931{{"`Find the Flags`"}} linux/grep -.-> lab-7931{{"`Find the Flags`"}} linux/cd -.-> lab-7931{{"`Find the Flags`"}} linux/ls -.-> lab-7931{{"`Find the Flags`"}} linux/mv -.-> lab-7931{{"`Find the Flags`"}} linux/sudo -.-> lab-7931{{"`Find the Flags`"}} end

Finding the First Flag

The first flag is hidden in the current directory.

Target

Find the first flag file, get a hint of the next flags by looking at the flags file, and move this file to the ~/resolve directory.

Result Example

Congratulations! You found the first flag. The next flag is in the home directory under the root user.

Requirement

  • You should be able to find the first flag file in the current directory using the cat command.

Finding the Second Flag

The second flag is located in the home directory under the root user.

Target

Find the second flag file, get a hint of the next flags by looking at the flags file, and move this file to the /home/labex/resolve directory.

Result Example

Great job! You found the second flag. The next flag is located in a zip file in the current directory.
Tips: You need to log out of root user.

Requirement

  • You should be able to switch to the root user, navigate to the home directory, and find the second flag file.

Finding the Third Flag

The third flag is located in a zip file in the current directory.

Target

Extract the third flag file, get a hint of the next flags by looking at the flags file, and move this file to the ~/resolve directory.

Result Example

Well done! You found the third flag. The next flag is located in a section of a large file largefile.txt in the /tmp directory.
Tips: The last flag file has a filename with the word flag.

Requirement

  • You should be able to extract the third flag file from the zip archive.
  • Your Linux platform needs to have the unzip command installed.

Finding the Fourth Flag

The fourth flag is located in a section of file largefile.txt in the /tmp directory.

Target

Find the fourth flag file, and move this file to the ~/resolve directory.

Result Example

Excellent work! You found the fourth flag.

Requirement

  • You should be able to find the fourth flag file by extracting a section of a large file largefile.txt in the /tmp directory.

Summary

Congratulations! You have completed the Linux Command Challenge. This challenge was designed to test your proficiency in using various Linux commands to solve a series of challenges.

By completing this challenge, you have demonstrated your ability to navigate and manipulate files and directories, extract files from zip archives, and delete files based on specified conditions. Keep practicing and exploring different Linux commands to improve your skills and knowledge of the Linux operating system.

Other Linux Tutorials you may like