Hacking challenges › Web

Learning route · 7 challenges

</> Web

How your browser talks to a server and the most common web flaws: hidden stuff that isn't really hidden, cookies, headers, parameters and access control.

⚠ For educational purposes only. A simulation for strictly educational purposes. Everything happens in your browser against made-up machines: it doesn't connect to any real system. Using these techniques against computers or networks without their owner's written permission is a crime (articles 197 bis and 264 of the Spanish Criminal Code). Learn in order to defend.

The basics before you start

01HTTP is text

Every page is a request (GET, POST…) with headers and, sometimes, data. The server replies with a code (200, 403, 404…), headers and the content. curl lets you write those requests by hand.

02The client lies if it wants to

Everything that comes from the browser can be changed: cookies, headers, parameters, hidden fields. If the server trusts them to decide who you are, someone will pretend to be someone else.

03Access control

Just because there's no link doesn't mean the page doesn't exist. If /factura?id=7 is yours, what about id=8? Checking permissions on the server, on every request, is the defence.

04What gets left published

Comments in the HTML, backups, robots.txt, .git files, test panels. A lot of intrusions start by reading what a website shows without meaning to.

Challenges, from easiest to hardest

▮▯▯▯ Easy10 pts · 10 minBack doorThe website of a KOI estate agency is hiding something. Do your recon, look for what they don't want you to see and find the flag.You learn Recon with nmap, requests with curl and why robots.txt protects nothing.Enter →🩸 no first blood yet▮▯▯▯ Easy10 pts · 10 minThe forgotten .envKOI publishes a map of “streets under redevelopment” that's really the list of streets it's going to erase. Read the code the website sends you and find the config file someone left in plain sight.You learn Reading a website's source code (HTML and JavaScript), why comments reach the browser and what happens if a .env file or a .git folder is left inside the public folder.Enter →🩸 no first blood yet▮▮▯▯ Medium20 pts · 15 minRole cookieThe Fog has a panel for managing the cameras on FROG's street. There's a guest account that can log in but can't see anything. Work out how the server decides who you are and make yourself an admin.You learn What a cookie is, how to see one with curl -i, how to send one with curl -b and why the server should never trust what the client says about itself.Enter →🩸 no first blood yet▮▮▯▯ Medium20 pts · 15 minTrusted headersKOI's intranet only lets in people coming “from inside”. But to check, it looks at headers the visitor writes themselves. Pass yourself off as an office computer and download the report on the next erasure.You learn What HTTP headers are, how to change them with curl (-H and -A) and why X-Forwarded-For, User-Agent and Referer are no good for access control.Enter →🩸 no first blood yet▮▮▮▯ Hard35 pts · 20 minSomeone else's fileOn KOI's paperwork portal, every resident can see their own file. Log in with the account CIPHER has set up for you, watch how the website requests the data and reach the file KOI doesn't want anyone to read.You learn Logging in with curl, reusing the session cookie, reading a JSON API and what an IDOR is: changing a number in the URL to see someone else's data.Enter →🩸 no first blood yet▮▮▮▯ Hard35 pts · 25 minForbidden verbsEvery night, a Fog file server runs the erase orders it finds in a folder. Tonight it's FROG's street. Find out what the server lets you do, get in and cancel the order.You learn HTTP methods (GET, PUT, DELETE, OPTIONS), basic authentication with curl -u, and the danger of default credentials and of leaving write methods switched on.Enter →🩸 no first blood yet▮▮▮▮ Elite50 pts · 40 minTest tokenKOI's supervisor portal decides who's in charge with a token it keeps in a cookie. Someone testing left one inside the JavaScript. Find it, open it up, change its role and get into the panel that controls the erasures.You learn Reading JavaScript in search of secrets, what a JWT is (header.payload.signature in base64), how it's decoded and why a server that doesn't check the signature accepts any forged token.Enter →🩸 no first blood yet

FAQ

What do you learn on the Hacklab's Web route?

How your browser talks to a server and the most common web flaws: hidden things that aren't, cookies, headers, parameters and access control. Concepts: http is text, the client lies if it wants to, access control, what gets left published.

How many challenges are on the Web route?

7 challenges ordered from easy to elite. Complete them all to earn the route badge.

More questions about Cyberpunks España →