Using the Dojo


Getting Started

This module contains challenges that will teach you to interact with the platform!

You can interact with challenges in three ways:

We'll run you through the first two in this module, and show off some other features of the platform!

Below, you will see a list of learning resources ("Lectures and Reading") and a set of practice problems ("Challenges"). Each entry in the list is expandable: click/tap on it to expand the content. You can go ahead and watch the Getting Started video below, or dive straight into the Using the VSCode Workspace challenge!


Lectures and Reading

Two dojo concepts that this module does not yet cover are connecting over ssh and the VM.

Connecting over SSH. In order to ssh into your challenge instances, you must add a public ssh key to Settings > SSH Key. You can quickly generate an ssh key by running ssh-keygen -f key -N '' in a terminal on your (unix-friendly) host machine. This will generate files key and key.pub, which are your private and public keys respectively. Once you have linked your ssh key to your account, you can connect to the dojo host. For example, if your URL bar for this page reads https://EXAMPLE.COM/welcome/welcome, you would run ssh -i key hacker@EXAMPLE.COM to connect into your challenge instance.

The VM. For some of the later (kernel-focused) challenges, you will need to solve the challenge in a virtual machine. You can interact with the virtual machine using the vm command.


Challenges

This challenge will teach you to use the Visual Studio Code workspace. You can start this challenge using the Start button below. Wait for confirmation that it started, and then click on the Workspace tab in the navigation bar (or, if you are quick enough, the Workspace link in the brief popup)! Once VSCode loads, launch a terminal (press Control-Shift-Backtick or click the button in VSCode's left panel, select the Terminal menu, and click New Terminal) and run the challenge!

The challenges itself, like all the other challenges, lives in the /challenge directory. In this case, the challenge program is /challenge/solve. Just by running it in VSCode, you will get the flag!

As a reminder, this platform uses "flags" to track your progress. Flags are cryptographic tokens that are given to you when you solve challenges. Once you see it, copy-paste it into the submission box below and submit! Then, once you get the confirmation that the flag was correct, move on to the next challenge!

Next, we will explore the Desktop! Start the challenge and click over to the Desktop on the navigation tab. This challenge requires you to run /challenge/solve from the terminal inside the Desktop.

Next, we will learn to paste into the Desktop! You will need this secret token: f8e5eb3178faf47ce5692f7f618e8f6f0e8769de7dd67ffe62b4375430a31e1b9d18a9574e8231e98572. Start the challenge and run /challenge/solve in the challenge for further directions!

So far, the challenges have been giving you flags directly. In this challenge, you will learn that the flag actually lives in the /flag file. Your real goal, in any challenge, is to get the contents of this file through any means necessary, even if the challenge program does not do it on purpose.

You might try to just read the /flag file on your own. Unfortunately for you, you are executing as the hacker user and /flag is only readable by the root user, so you cannot access it. In the previous challenges, the challenge program itself (e.g., /challenge/solve), which runs as the root user (and, thus, can read the flag), read this file and printed its contents, but this level is harder.

Like many of the other challenges on the platform, this challenge's /challenge/solve program will not read the flag file directly. However, it will make the flag world-readable when you run it! After that, you will need to read /flag yourself (e.g., using cat /flag or a text editor), and submit its contents as the solution.

You can launch challenges in two modes, using the buttons below! So far, you have been using Start, which launches the challenge so that you can attempt to solve it for real. You can also Practice! This will grant you administrative privileges (via sudo) in the challenge container, allowing you greater capabilities to debug solutions and otherwise experiment with the challenge. You cannot use this to actually solve the challenge because the /flag file, in practice mode, is replaced with a practice flag that cannot be redeemed for points.

You never need Practice mode to solve a challenge, except for this challenge, because it is designed to expose you to Practice mode. This challenge has a /challenge/secret file that is only readable by root, but it doesn't change between Practice mode and normal mode. To solve this challenge:

  • Launch the challenge in Practice mode.
  • Read the /challenge/secret file.
  • Relaunch the challenge in normal mode (using Start).
  • Provide the secret when /challenge/solve asks for it.

Your home directory in the dojo is persistent between challenges. This means that when you start a new challenge, all of the files you have saved in there will still be there. You can use it to build up notes across multiple challenges in a module, reference old solutions, or rerun solutions perfected in Practice mode against challenges in non-Practice mode.

This challenge, and the next, will drive home the point by having you write a file in your home directory. Launch this challenge and follow its instructions!

Now that you have created a file in your home directory, this challenge will use it! Launch this challenge and follow its instructions!


Module Ranking

This scoreboard reflects solves for challenges in this module after the module launched in this dojo.

Rank Hacker Badges Score