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/natas18.md
URL /wargames/natas/natas18/
Date 2026-04-07

Natas Level 18

Natas Level 18 — session identifiers come from a small number space; learn how predictable session IDs can be brute-forced to hijack an admin session.

Table of Contents

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

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

Study guide

Level map: sign in as natas18 and find the password for natas19.

What this level teaches

Why session identifiers must be large, random and unpredictable.

Key ideas

  • Sessions. After login the server gives you an identifier in a cookie, and that identifier alone proves who you are.
  • Small space. If IDs are just small numbers, an attacker can try them all and eventually find an authenticated admin.
  • Scripting. Loop over the possible values, set the cookie and look for a change in the response.

How to approach it

  1. Read the source and work out the range of session IDs the application can issue.
  2. Write a loop that sends each candidate in the session cookie.
  3. Detect success by a distinctive difference in the reply.

How developers prevent it

Use long cryptographically random session IDs from your framework, rotate them at login, expire them and bind them to additional checks where appropriate.