Skip to content

Drifter Level 15

Source: This content is aggregated from overthewire (MIT). Visit the original repository for the latest version.

Explosive decompression :-)

Study guide

Where it fits: Drifter level 15 of 0–15, in the open-ended stage of the game. The page does not say which account you start as, so check with id after connecting.

What this level teaches

The dangers of decompression code and of untrusted compressed data.

Key ideas

  • The only hint. The level is titled "Explosive decompression".
  • Why decompressors are risky. They turn small inputs into large outputs, and bugs in size calculations can lead to overflows or resource exhaustion.
  • Careful analysis. Identify the format, how output size is computed and what is trusted.

How to approach it

  1. Identify what is being decompressed and with what code.
  2. Study the size and bounds handling.
  3. Craft input that breaks an assumption.

Why it matters

Decompression bugs have affected image libraries, archive tools and network protocols.