Skip to content

Drifter Level 4

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

Level 4 is a binary requiring some simple analysis / reverse engineering.

Hint: Keep in mind about resource limits

Study guide

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

What this level teaches

Basic reverse engineering, and how process resource limits affect behaviour.

Key ideas

  • Resource limits. ulimit controls things like maximum file size, number of processes and core dump size. The hint says these matter to how the level behaves.
  • Simple analysis. Disassemble the binary, find the check and understand what it needs.
  • Environment. Anything you can change about how the program is launched may help.

How to approach it

  1. Run file, strings, ltrace and strace on the binary.
  2. Read the relevant disassembly and note what limit-related calls it makes.
  3. Adjust limits or input accordingly.

Why it matters

Limits and environment variables are an under-appreciated part of the attack surface.