Natas Level 19
Source: This content is aggregated from overthewire (MIT). Visit the original repository for the latest version.
Username: natas19
URL: http://natas19.natas.labs.overthewire.org
Study guide¶
Level map: sign in as natas19 and find the password for natas20.
What this level teaches¶
That apparent randomness may hide a predictable structure, which can be decoded and forged.
Key ideas¶
- Decoding the cookie. Compare the cookie values you receive for different usernames and look for a pattern, for example a standard encoding of readable text.
- Predictable plus enumerable. Once the format is understood, building candidate values is a short script.
- Same goal as before. You are still after the administrator's session.
How to approach it¶
- Log in with several different usernames and compare the resulting cookie values.
- Work out what is being encoded, and what part varies.
- Generate candidates for the admin account and test them.
How developers prevent it¶
Treat session IDs as opaque random tokens. Never derive them from user attributes.