---
title: "Decode until you understand"
description: "Practice identifying layers, choosing the next operation, and replacing guesses with an explicit workflow."
---

> Documentation Index
> Fetch the complete documentation index at: https://help.serialize.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Decode until you understand

The [University Politehnica of Bucharest introductory security lab](https://ocw.cs.pub.ro/courses/isc/labs/01) includes a “Decode 'til You Drop” exercise. This version focuses on the repeatable investigation method behind that style of challenge.

## Learning objectives

- Recognize Base64, hex, URL encoding, and compression clues
- Predict whether the next output is text or bytes
- Inspect one layer at a time
- Use Magic for discovery without leaving it as an unexplained final answer
- Document the final explicit sequence

## Warm-up

Open [Unwrap nested encoding](/recipes/unwrap-nested-encoding/) and install the sample. Magic proposes likely decoding paths and previews results.

Before accepting a suggestion, ask:

1. Does the current alphabet match the proposed encoding?
2. Does the decoded output have a recognizable header or readable structure?
3. Is another layer expected from the context?
4. Can the same result be reproduced with explicit operations?

## Lab A: two URL layers

Use this input:

```text
username=Dang&password=foo%2532%26%5E2&referrer=Hacker+M%CE%BFon
```

Run one URL Decode step and inspect the residual `%32`. Then run the second step.

**Solution:** [Decode double URL encoding](/recipes/encoding/decode-double-url-encoding/).

This exercise is derived from [Coventry University's public encoding lesson](https://github.coventry.ac.uk/pages/aa9863/6005-CEM/4_Crypto/Encoding/).

## Lab B: transport plus compression

Install [Decode Base64 and Gunzip](/recipes/binary-files/gunzip-base64/). Notice that the first output is not readable text: it begins with Gzip bytes. The correct next operation is determined by the header, not by trial and error.

## Lab C: representation plus cipher

Install [Decode Base64 and XOR](/recipes/security-analysis/decode-base64-xor/). Step through it and record the type after each stage:

1. Printable Base64 text
2. Binary ciphertext bytes
3. Recovered UTF-8 text

## Assignment

Choose one completed multi-step recipe. Remove its final operation, inspect the intermediate output, and explain the evidence that justifies restoring that operation. Save the explicit recipe and include the sample input in your lab notes.

Source: https://help.serialize.dev/courses/decode-until-you-understand/index.mdx
