← All lessons Stage 0 · Lesson 7
15 min

Your browser's devtools — the free hacking tool

Stage 0 · Lesson 7 · 15 minutes · Requires Lessons 1–6


The one-line answer

You already have a professional web security tool installed. Press F12.


Why you should care

Beginners believe they need Kali Linux, Burp Suite Pro and a black hoodie before they can start. They don't. Browser developer tools are genuinely powerful, completely free, and already on your machine.

Real bugs are found with devtools every day. Hidden admin panels, exposed API keys, client-side price checks, session cookies without protection flags — all visible in seconds, no installation required.

More importantly, this lesson is where the mental shift happens. A website stops being a picture you look at and becomes a system you can inspect.


How it actually works

Press F12, or right-click anywhere and choose Inspect. On Mac, Cmd + Option + I.

You'll see a panel with several tabs. Five of them matter.

1. Elements — the live page structure

This shows the DOM: the page as the browser currently understands it, not the original source file.

Why it matters: you can edit it live. Change text, delete elements, un-hide hidden ones, remove a paywall overlay.

Important caveat: these changes exist only in your browser and vanish on refresh. You have not "hacked" anything. But it's genuinely useful for finding what exists:

  • Hidden form fields — <input type="hidden" name="price" value="4999">
  • Disabled buttons that can be re-enabled
  • Elements hidden with display:none that contain real data
  • HTML comments developers forgot to remove

That last one is a real recon technique. Developers leave notes like <!-- TODO: remove admin bypass before launch --> more often than you'd think.

2. Console — run JavaScript on any page

The console executes JavaScript in the context of the current page.

Try these on any site:

document.cookie          // cookies readable by JavaScript
localStorage             // data stored in your browser
sessionStorage           // data cleared when the tab closes
document.forms           // every form on the page

document.cookie is a security lesson in itself. Any cookie you can see here is readable by JavaScript — which means any XSS vulnerability on the site can steal it. Cookies marked HttpOnly won't appear. That's the flag doing its job.

localStorage is where secrets go to die. Developers store JWTs, API keys and user data there because it's convenient. It's readable by any script on the page. Check it on sites you use — you may be surprised.

3. Network — every request and response

This is the most important tab for security work.

Reload the page with Network open and you'll see every request the page makes: HTML, CSS, images, and crucially, API calls.

Click any request and inspect:

  • Headers — the full HTTP exchange from Lesson 3
  • Payload — what was sent
  • Response — what came back
  • Cookies — what identified you

The technique that matters: right-click any request → Copy → Copy as cURL. Paste into a terminal and you've replayed that exact request outside the browser. Now you can change anything in it.

That single move is the bridge between browsing and testing. Everything in Stage 2 builds on it.

What to look for:

  • API endpoints not linked anywhere in the visible site
  • Responses containing more data than the page displays
  • Requests carrying tokens, keys or internal IDs
  • Version headers like X-Powered-By: Express

Responses that over-share are extremely common. A profile page shows a name and photo, but the API response behind it includes email, phone number, address and role. The page hid it; the server sent it anyway.

4. Application — storage and sessions

Here you'll find cookies, localStorage, sessionStorage, and service workers.

Look at the Cookies section and check the flags on each one:

FlagWhat it does
HttpOnlyJavaScript cannot read it — blocks theft via XSS
SecureOnly sent over HTTPS
SameSiteControls sending on cross-site requests — CSRF defence

A session cookie missing HttpOnly is a genuine finding worth reporting.

5. Sources — the actual code

Every JavaScript file the site loaded. You can read all of it.

JavaScript files leak constantly. API endpoints, internal URLs, feature flags, and sometimes credentials. Use Ctrl+Shift+F to search across all loaded files at once for terms like api, key, token, admin, password.

Minified code looks unreadable, but the {} pretty-print button at the bottom left reformats it.


See it yourself

Do all five. It takes ten minutes and it changes how you see the web.

1. Find a hidden element Open any site, press F12, go to Elements, press Ctrl+F and search for type="hidden". Read what's in those fields.

2. Read your own cookies Console tab. Type document.cookie and press Enter. Now open Application → Cookies and compare — anything present there but missing from the console output has HttpOnly set.

3. Watch an API call Open a site with a search box. Open Network, filter to Fetch/XHR, then search for something. Watch the API request appear. Click it and read the raw response.

4. Copy a request as cURL Right-click that request → Copy → Copy as cURL. Paste it into a terminal. Run it. Same response, no browser.

5. Search the JavaScript Sources tab, Ctrl+Shift+F, search for api. See how many internal endpoints are listed in code the site sent you voluntarily.

Boundary: everything above is reading data the server already sent to your own browser. That's fine. Modifying requests to access other people's data, or automating requests against systems you don't own, is a different matter entirely. Lesson 9 covers exactly where the line sits.


How attackers abuse this

Finding undocumented API endpoints. The visible site uses /api/v1/products. The JavaScript also references /api/v1/admin/users — never linked, often less protected.

Over-fetching APIs. The UI shows three fields; the API returns fifteen, including internal role names and email addresses. This is a very common data exposure bug and devtools finds it in seconds.

Client-side validation bypass. A form checks the price in JavaScript before submitting. Disable JavaScript, or replay the request with curl, and that check never runs. Lesson 8 explores exactly why this fails.

Hardcoded secrets in JavaScript. API keys, Firebase configs and cloud credentials get shipped to the browser regularly. Anything in client-side code is public — there is no way around this.

Session cookie inspection. Missing HttpOnly turns any XSS into full account takeover. Missing Secure means the cookie can travel over plain HTTP. Missing SameSite opens CSRF possibilities.

Reading source maps. Some sites ship .js.map files to production, which reconstruct the original, un-minified source — including comments and developer notes.


Common mistakes

"I edited the HTML, so I hacked the site." You changed a picture on your own screen. The server has no idea. Editing price="4999" to price="1" in Elements proves nothing — unless the server accepts that value when you submit it. That would be the bug, and it's a server-side flaw, not a devtools trick.

"Disabled buttons and hidden fields are secure." They're UI states, not security controls. Anything the browser received can be modified before it's sent back.

"Minified JavaScript is obfuscated." Minification saves bandwidth; it isn't protection. Pretty-print reverses it in one click.

"Devtools are for developers, real hackers use Burp." Burp is more powerful for repeated testing and automation, and you'll learn it in Stage 2. But devtools is faster for initial reconnaissance, and plenty of real findings never need anything else.


Check yourself

  1. You run document.cookie in the console and see theme=dark but not session=abc123, even though Application → Cookies shows both. What does that tell you?
  2. A checkout page has <input type="hidden" name="total" value="2499">. Is this automatically a vulnerability?
  3. Why is storing a JWT in localStorage riskier than storing it in an HttpOnly cookie?
Answers
  1. The session cookie has the HttpOnly flag set, which prevents JavaScript from reading it. That's correct, secure behaviour — it means an XSS vulnerability could not steal the session token directly.
  2. Not by itself. It's a lead. The vulnerability exists only if the server trusts that value instead of looking up the authoritative price in its own database. You'd confirm by submitting a modified value and checking whether the server accepts it — and only on a system you're permitted to test.
  3. localStorage is readable by any JavaScript running on the page, so a single XSS flaw exposes the token completely. An HttpOnly cookie is invisible to JavaScript, so the same XSS cannot read it. The trade-off is that cookies need CSRF protection, which is what SameSite addresses.

Your lab

Challenge 05 — What's in the page source?

A page displays very little. The source, the scripts and the network traffic tell a different story. Find the flag.

→ Open Stage 0 labs


Summary in your language

தமிழ் சுருக்கம் (Tamil summary)

Browser Devtools — உங்களிடம் ஏற்கனவே இருக்கும் இலவச கருவி

Kali Linux, Burp Suite எல்லாம் இப்போது தேவையில்லை. F12 அழுத்தினால் போதும்.

முக்கியமான 5 tabs:

1. Elements — பக்கத்தின் அமைப்பு. மறைக்கப்பட்ட fields (type="hidden"), developer-கள் விட்டுச் சென்ற comments இங்கே தெரியும்.

2. Console — JavaScript இயக்கலாம்.

  • document.cookie — JavaScript படிக்கக்கூடிய cookies
  • localStorage — இங்கே developers தவறாக token, API key சேமிப்பார்கள்

3. Network — ஒவ்வொரு request-ஐயும் பார்க்கலாம். மிக முக்கியமான tab.

  • API calls, server-ன் முழு response
  • Copy as cURL — இதுதான் testing-ன் அடிப்படை

4. Application — cookies-ன் flags சரிபார்க்கலாம் (HttpOnly, Secure, SameSite)

5. Sources — website-ன் முழு JavaScript code. Ctrl+Shift+F போட்டு api, key என்று தேடுங்கள்.

முக்கிய புரிதல்:

Elements-ல் விலையை 4999 என்பதை 1 என்று மாற்றினால் — அது hacking அல்ல. உங்கள் திரையில் மட்டும் தான் மாறியது; server-க்கு தெரியாது. Server அந்த மதிப்பை ஏற்றுக்கொண்டால் மட்டுமே அது உண்மையான bug.

எச்சரிக்கை: உங்கள் browser-க்கு server ஏற்கனவே அனுப்பிய தகவலைப் படிப்பது சரி. ஆனால் request-ஐ மாற்றி மற்றவர்களின் data-வை அணுகுவது சட்டவிரோதம்.

हिंदी सारांश (Hindi summary)

Browser Devtools — जो टूल पहले से आपके पास है

अभी Kali Linux या Burp Suite की ज़रूरत नहीं है। बस F12 दबाइए।

5 ज़रूरी tabs:

1. Elements — पेज का ढाँचा। छिपे हुए fields (type="hidden") और developers के छोड़े हुए comments यहाँ दिखते हैं।

2. Console — JavaScript चला सकते हैं।

  • document.cookie — जो cookies JavaScript पढ़ सकता है
  • localStorage — यहाँ developers ग़लती से token और API key रख देते हैं

3. Network — हर request दिखती है। सबसे महत्वपूर्ण tab।

  • API calls और server का पूरा response
  • Copy as cURL — यही testing की नींव है

4. Application — cookies के flags जाँचें (HttpOnly, Secure, SameSite)

5. Sources — website का पूरा JavaScript code। Ctrl+Shift+F से api, key खोजें।

सबसे ज़रूरी समझ:

Elements में क़ीमत 4999 से 1 कर देना — यह hacking नहीं है। यह सिर्फ़ आपकी स्क्रीन पर बदला; server को पता ही नहीं चला। असली bug तभी है जब server वह बदली हुई क़ीमत मान ले।

चेतावनी: server ने जो data आपके browser को भेजा है, उसे पढ़ना ठीक है। लेकिन request बदलकर दूसरों का data देखना क़ानूनी अपराध है।

Want this summary in Malayalam, Telugu, Kannada or another language? Tell us — the most requested languages get added next.


What's next

You've now seen that the browser can be changed by whoever is holding it. That leads directly to the most important principle in web security — and the reason so many applications are broken.

→ Lesson 8: Client-side vs server-side (and why it matters)