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

Behemoth Level 3

Behemoth Level 3 — a format-string vulnerability in a binary without source, used to write to memory and take control.

Table of Contents

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 behemoth3, find the password for behemoth4.

What this level teaches

Format-string exploitation starting from a compiled program.

Key ideas

  • Recognising the bug. The program prints your input with a printf-style call without a fixed format. Feeding %x specifiers shows stack contents.
  • Locating your input on the stack with positional specifiers.
  • Choosing a target to overwrite. A function pointer, a Global Offset Table entry or a return address can redirect execution.
  • Where to put shellcode. An environment variable is a convenient place, and its address can be computed.

How to approach it

  1. Confirm the vulnerability with a harmless sequence of specifiers.
  2. Find the stack index of your own input.
  3. Decide on the target and the value, then build the write.

Why it matters

It repeats a technique you learned earlier in a more realistic setting.