Magikarp Ground Mission

Published: April 2, 2026

Description

Do you know how to move between different directories and read files in the shell? SSH into the instance to retrieve a 3-part flag.

SSH

SSH into the provided instance using the credentials given on the challenge page.

ssh <user>@<host> -p <PORT>

Solution

  1. Step 1Read part 1
    After logging in, part 1 of the flag is in your home directory. The file also tells you where to find part 2.
    cat 1of3.flag.txt
    Learn more

    SSH (Secure Shell) is a cryptographic network protocol that provides secure remote access to a machine over an unsecured network. When you log in via SSH, your shell session starts in your home directory -- typically /home/username on Linux systems. Files placed in the home directory are immediately accessible without any path prefix.

    The cat command (short for "concatenate") reads a file and prints its contents to standard output. It's the most direct way to view the contents of small text files in a terminal. The convention of hiding hints inside the files themselves is common in CTFs -- each clue leads you to the next location.

  2. Step 2Read part 2
    Part 2 is located at the root of the filesystem. Navigate there and read it.
    cat /2of3.flag.txt
    Learn more

    The root directory (/) is the top of the Linux filesystem hierarchy -- every file and directory on the system lives somewhere under /. Unlike Windows, which has separate drive letters like C:\, Linux uses a single unified tree. The / prefix in a path makes it absolute, meaning it starts from the root regardless of your current working directory.

    Common top-level directories include /home (user home directories), /etc (system configuration), /bin and /usr/bin (executables), and /tmp (temporary files). Files placed directly at / are unusual outside of CTF challenges.

  3. Step 3Read part 3
    Part 3 is back in your home directory (~). Read it and assemble all three parts into the full flag.
    cat ~/3of3.flag.txt
    Learn more

    The tilde (~) is a shell shorthand that expands to the current user's home directory path. For example, if your username is ctfplayer, then ~/3of3.flag.txt expands to /home/ctfplayer/3of3.flag.txt. This shorthand works in any bash or zsh shell and is faster than typing the full absolute path.

    The challenge deliberately scatters the flag across three different locations -- home directory, root (/), and back to home -- to teach the fundamental skill of navigating a Linux filesystem. Understanding absolute paths (starting with /), relative paths (relative to current directory), and the ~ shorthand are all essential daily tools for any developer or security researcher working on Linux.

    Other useful navigation commands:

    • pwd -- print working directory (shows where you currently are)
    • ls -la -- list all files including hidden ones with details
    • cd - -- jump back to the previous directory
    • find / -name "*.txt" -- search the entire filesystem for .txt files

Flag

picoCTF{...}

The three flag files are split across different directory locations; each file tells you where to find the next one.

More General Skills