Linux

Hands-on Linux Security CTF Challenges

Practice Linux commands, permissions, processes, logs, and privilege boundaries through focused security challenges.

What you will learn

  • Investigate systems with core commands
  • Understand files and permissions
  • Find evidence in logs and running processes

Linux challenges

39 challenges available.

Linux Level 1

03. Linux First Steps - Find the File

You've connected to a Linux server! There's a file with the flag in the home directory. Use basic commands to find the…

Linux Level 1

04. Find the Hidden File

In Linux, files whose names start with "." (dot) are "hidden files" and are not displayed with the regular ls command.…

Linux Level 1

Linux-01. Grep the Needle Out of the Log Pile

Under /var/log/app there are many date-stamped log files, and the flag is hidden in a single ERROR line among them.…

Linux Level 1

Linux-SSH Key Hunt. Discovering a Hidden Private Key File

A file resembling a private key is hidden deep inside an application's configuration directory. Use find to track it…

Linux Level 1

Linux-Archive. Extracting a Secret from a Tarball

A compressed archive (.tar.gz) in the home directory contains a file with the flag hidden inside. Extract it with tar…

Linux Level 1

Linux-Custom. Inspecting a Scheduled Backup Script

Inspect the scheduled script placed under /usr/local/bin along with the cron entry that registers it. Comments inside…

Linux Level 1

Linux-Service Config. Digging into Nginx Configuration Files

Several service configuration files exist under /etc. Some are decoys while others hold real clues, so read through…

Linux Level 1

Linux-Symlink Basics. Following a Chain of Links to the End

A single chain of symbolic links connects several files. Follow the chain with ls or readlink until you reach the real…

Linux Level 1

Linux-Disk Usage. Tracking Down a Bloated File

A hidden directory contains an unusually large file. Use du or find's size options to track it down and inspect its…

Linux Level 1

Linux-Permissions Basics. Running a Script with No Execute Bit

A script file lacks execute permission. Check its permissions, add execute permission with chmod, and then run it.

Linux Level 1

Linux-File Type Disguise. Unmasking Files with the file Command

A file with a .jpg extension may actually contain plain text. Use the file command to spot files whose extension does…

Linux Level 1

Linux-Process Basics. Checking a sleep Command's Arguments

Find the process with the target command-line argument among several processes running in the background. This…

Linux Level 1

Linux-Deep Search. Discovering a Deeply Nested File

A single file containing the flag is hidden deep inside many nested directories. Use the find command to locate the…

Linux Level 1

Linux-Environment Variable Basics. Checking Shell Startup Variables

One of the environment variables set when the shell starts holds the flag. Check it with the env command or echo…

Linux Level 1

Linux Basics - Permissions and SUID

Learn basic Linux commands and file permissions. Use hints to find SUID and retrieve the flag.

Linux Level 2

Linux-02. Privilege Escalation via a Sudo-Allowed Vim

Check which commands a regular user can run via sudo without a password. A well-known GTFOBins technique can let you…

Linux Level 2

Linux-03. Reading Cron Configuration Files

This system has several cron configurations (/etc/cron.d, /etc/crontab, user crontabs, and more). Inspect each…

Linux Level 2

Linux-Cron Privesc. Hijacking a Writable Root Script

Check the permissions of a cron script that root executes periodically. If a regular user can write to it, think about…

Linux Level 2

Linux-Systemd. Checking a Service Unit's Environment Variable

A systemd unit file can set environment variables in its [Service] section. Inspect the registered service definition…

Linux Level 2

Linux-Symlink Maze. Navigating a Branching Path

Several directories are connected in a tangled web of symbolic links. Without being misled by decoy hint files, follow…

Linux Level 2

Linux-Script Debug. Fixing a Broken Bash Script

This script has several intentional bugs (typos, syntax mistakes) and fails to run to completion. Use bash's debugging…

Linux Level 2

Linux-Network Basics. Connecting to a Listening Port

A background service on this system is listening on a specific port. Identify the port with ss/netstat and connect to…

Linux Level 2

Linux-Backup Finder. Spotting the Real Temp File

The project directory contains several decoy backup/temp files ending in .bak, .tmp, or ~. The real flag is hidden…

Linux Level 2

Linux-Pipeline. Narrowing Down Logs with grep and awk

The access log contains many lines, several of which include the flag. Chain commands together with pipes (|) to…