Skip to content
PURPLEDUEL

The final riddle

Encodings & secrets · hard level · 5 objectives · 1000 XP in total

The Crow has vanished, leaving a locked chest and a few clues scattered across several files: a legend, an order, a program. Rebuild the riddle, reopen the chest and find out why encoding is not encrypting.

Lab 6 of 6 in the Encodings & secrets path. If you get stuck you have 3 hints, from the vaguest to the most precise: they cost 0, 60 and 200 XP.

What you learn

Objectives complete themselves while you work in the terminal; each one is worth experience points:

  • Read the Crow's diary (50 XP)
  • Extract the order of the seals from the probe (strings) (150 XP)
  • Read the legend of the seals (base64 -d) (150 XP)
  • Remove the last seal too, ROT13 (tr) (200 XP)

Topics: codici, rebus, pipe.

Commands you will use

The terminal is simulated and understands about forty Linux commands. In this lab you will mostly need these:

  • cat: prints the contents of a file: the most direct way to read configurations, notes and logs.
  • file: recognises what kind of file you are looking at (text, executable, image) from its contents, not its name.
  • base64: encodes and decodes Base64, the format that turns bytes into text. It protects nothing: it can be undone without a key.
  • strings: extracts the readable text from a binary file: it reveals passwords and addresses left inside a program.
  • grep: finds the lines that contain a word, even across whole folders with -r. It is the main tool for analysing text and logs.
  • xxd: shows a file in hexadecimal and can also turn hexadecimal back into text.
  • rev: reverses each line character by character, like a mirror.
  • tr: replaces characters with others: with the right rules it applies or undoes ROT13.
  • |: the vertical bar | chains commands: the output of the first becomes the input of the next, so small tools form a complete analysis.

The simulated environment

You work in a simulated Linux shell, in the home folder of the user runner: invented files and folders, no network target.

The defensive lesson

Once the lab is solved, the write-up explains what went wrong and how to protect yourself:

The Crow stacked four disguises (ROT13, mirror, hexadecimal, base64) and left the legend and the order lying around; but even without clues an analyst would have removed them all, because none of them needs a key. Encoding is not encrypting. To really protect a secret you need real encryption (AES-GCM, ChaCha20-Poly1305) with a long random key kept away from the data and, for passwords, a slow salted hash (bcrypt, scrypt, Argon2), like the one in impronta.txt: a hash is not decoded, it is recomputed and compared. And do not leave secrets in files, binaries or notes.

Before and after this lab

To unlock it you must have solved:

It is one of the final labs: no other lab requires it.

The Encodings & secrets path

Encodings & secrets teaches a distinction that saves a lot of data: encoding is not encrypting. Base64, hexadecimal, ROT13 and mirrored text change how information looks but do not protect it, because anyone can turn it back into plain text without a key. In the labs you recognise these formats by their look, peel them off one layer at a time even when they are stacked, extract readable text from a compiled program and understand why real protection needs real encryption, salted hashes and a secrets manager.

All labs in the Encodings & secrets path

Learn more with the guides

All guides