Skip to content

Leviathan Level 1

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

There is no information for this level, intentionally.

Study guide

Level map: logged in as leviathan1, find the password for leviathan2.

What this level teaches

Dynamic analysis: running a program under a tracer instead of reading its code.

Key ideas

  • Setuid. The program runs with its owner's privileges, which is why it can reach files you cannot.
  • Library calls. Compiled programs call functions such as strcmp to compare strings, and ltrace prints each call with its arguments.
  • Secrets in memory. If the program compares your input with a hard-coded password, the tracer shows both strings.

How to approach it

  1. Run the program normally and see what it asks.
  2. Run it again under ltrace, giving it some input, and read the comparisons it makes.
  3. After you gain a shell, check which user you are with id.

Why it matters

Tracing is a fast first step in malware analysis and debugging when you lack source code.