Skip to content

Natas Level 7

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

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

Study guide

Level map: sign in as natas7 and find the password for natas8.

What this level teaches

How an unvalidated filename parameter can be abused to read files the developer never meant to expose.

Key ideas

  • Parameters name files. A URL like index.php?page=something can cause the server to load a file by name.
  • Path traversal. Sequences such as ../ move up directories, letting a request escape the intended folder.
  • Absolute paths. Depending on how the server code is written, you may not even need traversal.
  • A hint is given. The page source tells you where the password is stored; the stated location is the route.

How to approach it

  1. Look at how the pages link to each other and what parameter changes.
  2. Read the source comment for the file location, then work out how to request it through the parameter.

How developers prevent it

Never build file paths from user input. Map user choices to a fixed allow-list of identifiers and resolve paths on the server.