Vortex Level 24
Vortex Level 24 — guess the seed of a generator using the GNU C library's random_r implementation as a reference.
Table of Contents
Source: This content is aggregated from overthewire (MIT). Visit the original repository for the latest version.
Guess the seed
You might want to analyze “random_r.c” from the GLIBC source code.
Study guide
Level map: logged in as vortex24, obtain access to vortex25.
What this level teaches
How rand/random work internally and how to predict them.
Key ideas
- glibc source. The page suggests reading
random_r.cfrom glibc. - State. The generator keeps a small internal state that is updated by a simple recurrence, so a modest number of outputs can reveal the rest.
- Seed guessing. If the seed has limited entropy (for example a timestamp), you can try all candidates.
How to approach it
- Read
random_r.cand implement or reuse the generator. - Compare candidate seeds against observed outputs.
- Predict the next values and use them.
Why it matters
rand() is not suitable for security; this level shows exactly why.