Drifter Level 11
Drifter Level 11 — the executable base and the stack are randomised, so you must defeat ASLR to get code execution.
Table of Contents
Source: This content is aggregated from overthewire (MIT). Visit the original repository for the latest version.
This level randomizes the executable base and stack – can you beat the randomisation to get code execution?
Study guide
Where it fits: Drifter level 11 of 0–15, in the randomisation and reversing stage of the game. The page does not say which account you start as, so check with id after connecting.
What this level teaches
Address space layout randomisation and how to work around it.
Key ideas
- What is randomised. The page says both the executable’s base address and the stack move on each run.
- Information leaks. A leaked pointer gives you the layout for that run.
- Relative addressing. Offsets between things in the same module do not change, even if their base does.
- Brute force. On a 32-bit system, the entropy may be small enough to guess.
How to approach it
- Run the program several times and record which addresses change.
- Look for a leak or a part of the layout that stays fixed.
- Build an exploit that is robust to the randomness.
Why it matters
ASLR is one of the main defences in use, and bypasses are routine in real exploit chains.