Skip to content
Tutorials Center
My learning

Topics

Lesson 14 of 38 ยท Target and Spider

Mapping the Attack Surface

Turn a site map into an attack surface inventory: list inputs, forms, identifiers, hidden fields, roles and technologies, and rank what deserves testing first.

A site map lists places. An attack surface inventory lists ways in: every spot where data enters the application, every identifier that points at someone's data, and every function with consequences. It is the analysis stage of the testing methodology, and it decides what you test and in what order.

The goal of this lesson is a repeatable way to read a mapped application and produce a ranked list of hypotheses, using Burp's views and a bit of structured thinking.

What counts as an input

Any value the client controls can be wrong, missing or malicious. Look for inputs in all of these places:

  • Query string parameters: ?id=7&sort=price.
  • Form fields: visible, hidden, disabled and read-only fields all get sent.
  • Cookies: including ones that look like settings (role=user, cart=...).
  • Headers: Referer, Origin, X-Forwarded-For, User-Agent and custom ones.
  • Path segments: /orders/1002 has an identifier in the path.
  • JSON bodies and nested fields: {"user": {"id": 5, "plan": "free"}}.
  • File uploads: names, types and contents.
  • WebSocket messages and API calls made by JavaScript.

Burp's Inspector and the site map filter "parameterised requests" list many of these automatically.

Identifiers: where access control breaks

Any parameter that selects a record (orderId, userId, invoice, file) is an object reference. The security question is always the same: does the server check that the logged-in user owns this object? Mark every identifier in your inventory; they are the highest-value items for access-control testing.

Patterns to notice:

  • Sequential numbers (1001, 1002): easy to guess.
  • Predictable names (report-2026-03.pdf).
  • Identifiers in cookies or hidden fields.
  • Different formats for the same object across pages.

Functions with consequences

Rank features by what could go wrong:

Feature Why it is interesting
Login, reset, registration Account takeover paths
Payments, coupons, refunds Money and business logic
Profile and role settings Privilege changes
File upload and download Content and path handling
Search, comment, message boxes Output of user input back to others
Admin panels, export tools High privilege, bulk data
API endpoints Often less protected than the web UI

Information in responses

While analysing, read responses for clues beyond the visible page:

  • Comments in HTML and scripts (<!-- TODO remove test route /debug -->).
  • Hidden inputs (<input type="hidden" name="role" value="user">).
  • JavaScript containing endpoints, keys or feature flags.
  • Error messages naming frameworks, database types or file paths.
  • Headers such as Server and X-Powered-By.
  • Cookie names hinting at the framework.

Roles and states

Applications behave differently per role (anonymous, user, moderator, admin) and per state (cart empty versus full, order paid versus unpaid). Create a small role matrix: for each function, record which roles should reach it, then test whether each role actually does.

flowchart LR
  A["Site map"] --> B["Inputs"]
  A --> C["Identifiers"]
  A --> D["Functions"]
  A --> E["Roles"]
  B --> H["Hypotheses"]
  C --> H
  D --> H
  E --> H
  H --> R["Ranked test list"]

Four views of the map feed one ranked list of hypotheses.

Writing hypotheses

Turn each finding into a testable sentence:

  • "/orders/{id} might return other users' orders if I change the id."
  • "The hidden field role=user might be trusted by the server on update."
  • "/debug was in a comment; it may still exist."
  • "The reset token might not expire."

Then rank by impact (what is exposed?) and likelihood (how plausible given what you saw?) and begin with the top of the list.

Try it: extract inputs from a page

A stand-in that scans a page's HTML for forms, fields (including hidden ones), comments and script endpoints, producing the start of an inventory. It uses only Python's standard library.

Python Stand-in: inventory a page's inputs

Press Run (or Ctrl + Enter) to see the result here.

Program input ยท what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

Try it: rank hypotheses

A second stand-in scores hypotheses by impact and likelihood and prints an ordered test plan, a tiny version of how professionals prioritise limited time.

Python Stand-in: rank test hypotheses

Press Run (or Ctrl + Enter) to see the result here.

Program input ยท what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

A worked example

Suppose the site map shows /account, /api/v1/orders/1001 and /support/tickets. As user A you note that your order id is 1001, the account form has a hidden userId=1001 and a role field. Your inventory records:

  1. Identifier: 1001 in path and hidden field. Test with user B's id (second account).
  2. Hidden role: test whether changing it has any server-side effect.
  3. Support tickets: user-generated content shown to staff, so check output encoding.
  4. API: confirm it requires authentication and the same authorisation as the web UI.

Four hypotheses, each testable in minutes with Repeater.

Check your understanding

Quick check ยท 4 questions

of 4 answered You scored / 4 ยท perfect!

  1. 1. Why are identifier parameters such as orderId high-value to test?

    Object references are where broken access control appears: the server must verify the caller may access that specific object.
  2. 2. What do hidden form fields tell a tester?

    Hidden only means not displayed. The browser sends them, and a proxy can change them.
  3. 3. What is a role matrix?

    Comparing intended access to actual access for each role finds privilege problems.
  4. 4. How should you decide what to test first?

    Time is limited, so rank hypotheses by how bad and how plausible they are.

Summary

  • An attack surface inventory lists inputs, identifiers, consequential functions, information leaks, roles and states.
  • Inputs live in query strings, forms (including hidden ones), cookies, headers, path segments, JSON and uploads.
  • Identifiers are prime access-control targets; hidden fields are editable and must not be trusted.
  • Use a role matrix to compare intended and actual access.
  • Convert observations into ranked, testable hypotheses.

Next: Repeater basics