Natas Level 4
Natas Level 4 — the server decides who you are from the Referer header, which you control; learn to craft and modify HTTP requests.
Table of Contents
Source: This content is aggregated from overthewire (MIT). Visit the original repository for the latest version.
Username: natas4
URL: http://natas4.natas.labs.overthewire.org
Study guide
Level map: sign in as natas4 and find the password for natas5.
What this level teaches
That HTTP request headers are user-controlled, so any decision based on them is a weak one.
Key ideas
- Request headers. Besides the URL, a browser sends headers such as
User-Agent,CookieandReferer(sic) describing the request. - The Referer header says which page you came from. Servers sometimes use it as a crude access check.
- You can send any header.
curl -Hand a proxy let you set values the browser would not.
How to approach it
- Read what the page tells you about where it expects you to come from.
- Use a tool that lets you set the header yourself, then request the page again.
How developers prevent it
Never use a client-supplied header as proof of identity or origin. Use real authentication and authorisation checks.