Map the application inside a scope you enforce

Unit 1 of 5 in Testing web applications.

You will be able to turn a scope into something your tools enforce, and walk an app to build an inventory of entry points you can test against and report coverage from.

Lesson

A web test is a list of categories, not one big attack

The OWASP Web Security Testing Guide splits web application testing into eleven categories: information gathering, configuration and deployment management, identity management, authentication, authorization, session management, input validation, error handling, weak cryptography, business logic and client-side testing. The split matters because it gives you a checklist to cover and a way to say, at the end, which parts you tested.

Information gathering comes first on purpose. You cannot test an entry point you never found, and you cannot honestly report coverage without a map.

Enforce the scope in the tool

Burp's documentation says that setting a scope tells the tool which URLs you want to test and which you do not. It gives three reasons to leave a URL out: you do not have permission to test it, it is not safe to test (for example it holds potentially dangerous functionality), or it is simply not relevant.

Burp decides by prefix. Any URL that starts with an exact prefix on the include list is in scope, and anything that does not start with a listed prefix is out. You can also exclude a path that sits under an included prefix. The practical lesson is that scope written as words must be turned into precise prefixes, and a prefix written loosely can include more than you meant. The lab shows one such trap. The documentation also notes that in the Community Edition your scope settings are lost when you close Burp, so write the scope in a file first and load it again each session.

Learn how the app is meant to work first

The crAPI project's own README recommends following the intended user workflow, the happy path, to understand how the application is supposed to work before attempting any security challenges. That advice is general. A tester who has used every feature as a normal user knows which requests are normal, which ids belong to whom and where a multi-step process begins and ends.

OWASP describes Juice Shop as an insecure web application built for training, awareness demos and as a test subject for security tools, and crAPI as vulnerable by design but safe to run yourself. They are practice targets, so the rule from the earlier class still holds: your machine, your container, your accounts.

Build the inventory

WSTG-INFO-06 says that enumerating the application and its attack surface is a key step before thorough testing. As you walk the application, note every request, parameter and form field, whether it is a GET or a POST (or another method), and any hidden form fields. The guide points out that hidden fields often carry state, quantities or prices that the developer never meant anyone to see or change, and that an intercepting proxy is the way to see parameters sent in a request body.

The guide suggests an intercepting proxy plus a spreadsheet. The spreadsheet records the page, the proxy request number, interesting parameters, the type of request, whether access is authenticated, whether TLS is used, whether it is part of a multi-step process and whether WebSockets are used. On responses, note where cookies are set, redirects, 403 and 500 responses and unusual headers.

Say how much you covered

WSTG-INFO-07 admits that in black-box testing it is extremely difficult to test the whole codebase, so one way to reconcile this is to document which code paths were discovered and tested. It suggests starting with a spreadsheet of the links found by spidering, then looking at decision points and recording the significant paths. It says the trade-off between methods should be negotiated with the application owner, and that asking the owner which functions worry them most is a simple and valid approach.

That is where an inventory pays off twice: it plans the testing, and it is the evidence for the limitations section of the report. A route that appears in the code or an API description but never in your proxy history is a gap you can name rather than hide. The lab builds exactly that comparison.

Key points

Sources

Practice in the labs

Stand up a practice target you own, write the scope, enforce it, then map the app and keep an inventory.

Knowledge check

  1. You add the Burp include prefix http://127.0.0.1:3000 with no trailing slash. Why is that a risk? Answer: Burp matches by prefix, so a longer address that starts with the same characters can also be in scope. Burp's documentation says any URL that starts with the exact prefix is in scope, so a loose prefix can cover more than you intended. The scope lab demonstrates this with a longer port number.
  2. Why does WSTG-INFO-06 suggest recording hidden form fields during mapping? Answer: They often carry state, quantity or price values the developer never meant anyone to see or change. The guide says hidden fields usually contain information such as state, quantities or prices, and that you need a proxy or the page source to see them.
  3. A route appears in the app's source code but never in your proxy history. What is the right way to treat it? Answer: Record it as a gap in coverage and a planning hint, not as a finding. WSTG-INFO-07 asks you to document which paths were discovered and tested. An unseen route is evidence of what you did not cover, which belongs in the limitations section.
  4. What does crAPI's README advise doing before trying any security challenge? Answer: Follow the intended user workflow to learn how the app is supposed to work. Knowing the normal flow tells you which requests, ids and steps are expected, which is what makes a surprising one stand out.

Back to the syllabus or see all classes.

Related