Skip to main content

Settings

Color Mode

Theme Skin

Background

Appearance preferences are saved in this browser only.

Environment

Current Environment Production

Built with JEKYLL_ENV=production. Changes require deployment.

Quick Links

Theme & Build

Jekyll v3.10.0
Last BuildNov 24, 17:25

Page Location

Page Info

Layout default
Collection wargames
Path _wargames/natas/natas11.md
URL /wargames/natas/natas11/
Date 2026-04-07

Natas Level 11

Natas Level 11 — a cookie is "encrypted" with repeating-key XOR; learn how a known plaintext reveals the key and lets you forge the cookie.

Table of Contents

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

Username: natas11
URL:      http://natas11.natas.labs.overthewire.org

Study guide

Level map: sign in as natas11 and find the password for natas12.

What this level teaches

How weak, home-made encryption fails against someone who knows part of the plaintext.

Key ideas

  • XOR. Combining two byte strings with exclusive-or is reversible: (a XOR b) XOR b = a.
  • Known-plaintext attack. If you know the original data and see the encrypted result, XOR-ing them together reveals the key.
  • Repeating key. A short key reused over a long message leaks quickly, as in Krypton’s Vigenère levels.
  • Forgery. Once you have the key, you can build your own valid cookie.

How to approach it

  1. Read the source to learn what data is stored in the cookie and how it is encoded.
  2. Work out what plaintext the server started with and use it with the cookie value to recover the key.
  3. Create the data you want, encrypt it the same way, and send it back.

How developers prevent it

Never invent encryption. Use authenticated encryption from a trusted library, or keep state on the server and send only a random session ID.