← All lessons Stage 2 · Lesson 3
20 min

Recon: mapping an application

Stage 2 · Lesson 3 · 20 minutes · Requires Lesson 2


The one-line answer

Before testing anything, you map what an application actually exposes — every page, parameter and endpoint — because you cannot test what you have not found.

The boundary: mapping means visiting an application deliberately and recording it. Do this only on applications you own or are authorised to test. Your scope — the list of what you're allowed to touch — is a legal line, not a suggestion.


Why you should care

Beginners jump straight to "try SQL injection on the login form". Experienced testers spend the first part of every test just looking. The reason is simple: the bug is usually somewhere you haven't been yet — an old API endpoint, a parameter only the admin page uses, a JSON field the mobile app sends.

A good map also makes you faster. When you know every input point, you can work through them methodically instead of poking at random.


How it actually works

What "attack surface" means

Recall Stage 0 Lesson 2: every open port is a door. In a web application, the doors are smaller and more numerous. The attack surface is every place the application accepts input or reveals something:

  • every page and URL path,
  • every parameter in those URLs,
  • every form, header, cookie and request body,
  • every API endpoint the front-end calls behind the scenes.

Mapping is writing all of that down.

Step 1: walk the app as a normal user

With Burp running and intercept off, use the application the way a real user would:

  • open every menu item and link,
  • create an account and log in (if the target allows it),
  • fill in every form — search, contact, profile, checkout,
  • use every feature: upload a picture, change settings, log out.

You're not attacking. You're letting Burp record everything passively in HTTP history. Normal use generates most of the map for free.

Step 2: Burp's site map

Go to Target → Site map. Burp builds a tree of every host and path it has seen. Paths you actually visited appear in black; paths Burp noticed (in links or scripts) but you haven't requested appear in grey. Grey items are a to-do list.

Step 3: set the target scope

Your HTTP history is full of noise — analytics, fonts, ad networks, browser update checks. Those aren't your target and you must not test them.

In Target → Scope, add the application's host (e.g. https://<lab-id>.web-security-academy.net). Then in HTTP history, use the filter to show only in-scope items.

Scope does two jobs:

  1. Focus — you only see what matters.
  2. Legal safety — it's much harder to accidentally send a test request to a third-party service. In a real engagement, the client gives you a written scope. Testing outside it can be a crime under the IT Act, even if you "found something".

Step 4: list every input point

For each in-scope request, ask: where does user-controlled data go in?

Input pointExampleWhere you've seen it
URL parameters/product?productId=3Stage 0 Lesson 5
Form fieldsusername=...&password=...Stage 1 Lesson 4
HeadersUser-Agent, Referer, custom X- headersStage 1 Lesson 4
Cookiessession=..., lang=en, role=userStage 1 Lesson 5
JSON bodies{"email":"a@b.com","qty":2}API calls in devtools, Stage 0 Lesson 7
The path itself/user/1043/ordersIDs inside paths

Anything the client sends, an attacker can change. So anything on this list is something to test later.

Step 5: look for hidden hints

Recall Stage 0 Lesson 7 (devtools). Applications leak structure in places users never look:

  • HTML comments — <!-- TODO: remove /admin-old before launch -->
  • JavaScript files — front-end code often lists every API endpoint the app calls, including ones for features you can't see.
  • API calls in the background — watch HTTP history while a page loads; the page may call /api/v2/... endpoints that never appear in a link.

In Burp, you can search across everything with Burp → Search (or right-click a host in the site map → engagement tools, in Pro). In Community, searching HTTP history and reading JS files in the response panel works fine.

Step 6: take notes as you go

For each endpoint, record:

Endpoint:     GET /product?productId=
Purpose:      shows one product
Inputs:       productId (number)
Auth needed:  no
Notes:        abc → 500 error with stack trace (see Lesson 2)
Test later:   access control? injection?

This table becomes your test plan. It's also the start of your writeup (Stage 0 Lesson 10) and, later, your finding reports (Stage 3 Lesson 11).


See it yourself

  1. Open any Web Security Academy apprentice lab (an Information disclosure lab is ideal).
  2. Add the lab's host to Target → Scope. Filter HTTP history to in-scope only.
  3. Use the site for five minutes: every link, every form, every feature.
  4. Open Target → Site map. Count the paths. Which are grey (seen but not visited)?
  5. Make a notes table with at least five endpoints and their inputs.
  6. Open one page's HTML in the response panel and search for <!--. Open one .js file and look for paths that start with /.

How attackers abuse this

Attackers do exactly this, just without permission. A complete map lets them find:

  • forgotten admin or debug pages,
  • old API versions (/api/v1/) that lack the fixes added to /api/v2/,
  • parameters that only privileged users are supposed to send,
  • developer comments that reveal internal paths or credentials.

The defensive fix — shrink the map:

  • Remove HTML comments, debug pages and unused endpoints before release.
  • Don't ship admin-only routes in the JavaScript sent to ordinary users where avoidable — and always enforce permissions on the server, because hiding a link is not protection.
  • Retire old API versions instead of leaving them running.
  • Don't put secrets in front-end code. Anything sent to the browser is public.

Common mistakes

  • Testing before mapping. You'll miss most of the application.
  • No scope set. You'll waste time on third-party noise — or worse, send test traffic to services you're not allowed to touch.
  • Only following visible links. The most interesting endpoints are often only in JS files or background API calls.
  • Not logging in. A logged-out map is usually a fraction of the real application (when your authorisation allows creating an account).
  • No notes. Burp Community doesn't save projects. If it's not written down, it's gone.

Check yourself

  1. Why does setting a target scope matter for legal safety, not just convenience?
  2. You find fetch('/api/admin/users') in a JavaScript file, but there's no admin link on the site. What does this tell you, and what's the defensive lesson?
  3. Name four different kinds of input point in a web request.
Answers
  1. Scope keeps your testing inside what you're authorised to test. Without it, it's easy to send test requests to analytics, payment or other third-party services that are not part of your permission — which can be unauthorised access.
  2. The endpoint exists and the browser knows about it, even though the UI hides it. Hiding a link is not access control. The fix is that the server must check that the requester is an admin on every request to that endpoint.
  3. Any four of: URL parameters, form fields, headers, cookies, JSON/request bodies, and IDs in the URL path.

Your lab

  • PortSwigger Information disclosure topic and its apprentice labs: https://portswigger.net/web-security/information-disclosure
  • Before the labs, do PortSwigger's "Set the target scope" tutorial in the Burp getting-started series, if you haven't already.

Writeup: your endpoint table for one lab, plus where you found the disclosed information.


Summary in your language

தமிழில் சுருக்கம்

எதையும் சோதிப்பதற்கு முன், application-இல் உள்ள ஒவ்வொரு page, parameter, endpoint-ஐயும் பட்டியலிடுங்கள் — கண்டுபிடிக்காததைச் சோதிக்க முடியாது. Burp இயங்கும்போது ஒரு சாதாரண பயனராக app-ஐப் பயன்படுத்துங்கள்; Site map-ஐப் பாருங்கள்; target scope அமைத்து வெளிப்புற சேவைகளைத் தவிர்க்கவும் — scope என்பது சட்டப்பூர்வ எல்லை. URL parameters, forms, headers, cookies, JSON bodies ஆகிய அனைத்து input இடங்களையும் குறித்துக் கொள்ளுங்கள். பாதுகாப்பு: comments, debug pages, பழைய endpoints-ஐ நீக்குங்கள்; அனுமதியை எப்போதும் server-இல் சரிபார்க்கவும்.

हिंदी में सारांश

कुछ भी test करने से पहले application के हर page, parameter और endpoint की सूची बनाएँ — जो मिला नहीं, उसे test नहीं कर सकते। Burp चलाते हुए app को आम user की तरह इस्तेमाल करें, Site map देखें, और target scope सेट करें ताकि third-party services पर गलती से test न हो — scope एक कानूनी सीमा है। URL parameters, forms, headers, cookies और JSON bodies — हर input point नोट करें। बचाव: comments, debug pages और पुराने endpoints हटाएँ, और permission हमेशा server पर जाँचें।

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


What's next

You've mapped what's linked — now find what isn't: Subdomains, directories and content discovery