Skip to content
Tutorials Center
My learning

Topics

Lesson 11 of 38 ยท Target and Spider

Target Scope in Burp Suite

Define target scope in Burp Suite with include and exclude rules, use advanced scope control, and make every tool respect it so you only test what you are allowed to.

The scope is Burp's list of what you are allowed to test. It is the on-screen copy of your written rules of engagement. Once defined, scope lets you filter history and the site map to in-scope items only, stop the proxy from intercepting other sites, and, most importantly, stop automated tools from touching hosts you were never cleared to test.

Scope turns "be careful" from a habit into a setting. A tester who forgets to set it will eventually point a crawl or an Intruder run at something they should not. This lesson explains how to define it and how to make Burp enforce it.

Scope in Burp is a convenience, not a legal shield. The written agreement decides what is allowed. If the two ever disagree, the agreement wins; fix the Burp scope.

Where scope lives

Open Target > Scope. There are two lists:

  • Include in scope: items that are permitted.
  • Exclude from scope: items to skip even if they match an include rule (for example logout or delete-account URLs that would end your session or destroy data).

Excludes always win over includes.

Simple scope rules

The easiest method is prefix rules. In newer Burp versions you add a URL, such as:

TEXT
Include:  https://shop.lab.test/
Exclude:  https://shop.lab.test/logout
Exclude:  https://shop.lab.test/admin/delete

A prefix matches anything that starts with that text, so https://shop.lab.test/ covers every path on that host and port, over HTTPS only. A request to http://shop.lab.test/ (plain HTTP) is a different prefix and would be out of scope until you add it.

The fastest way to build scope is from the site map: right-click a host or folder and choose Add to scope. Burp may then offer to stop logging out-of-scope traffic.

Advanced scope control

For finer control tick Use advanced scope control. Each rule then has four parts:

Part Example Notes
Protocol HTTPS HTTP, HTTPS or Any
Host or IP range ^shop\.lab\.test$ A regular expression, or an IP range such as 192.168.56.0/24
Port ^443$ A regular expression
File `^/(shop api)/.*`

Advanced rules are powerful but precise: a missing anchor lets shop.lab.test.evil.example match, which is exactly the kind of accident scope exists to prevent. Always anchor hosts with ^ and $, and escape dots as \..

Making Burp respect the scope

Defining scope does nothing by itself. Connect it to the tools:

  1. Proxy history: filter "Show only in-scope items".
  2. Site map: filter the same way, to hide the CDN, analytics and social widgets.
  3. Proxy interception rules: intercept only in-scope requests (see Intercepting requests).
  4. Crawls and scans (Professional): they only follow in-scope links, and ask before leaving scope.
  5. Intruder, Repeater and extensions do not check scope for you, so look at the host before you hit Send.

When Burp asks "Do you want to stop sending out-of-scope items to the history and other Burp tools?", answering Yes is usually right. It keeps your project clean and your evidence relevant, and it reduces the personal data you store from unrelated sites.

What goes in scope

  • Hosts and paths named in the agreement.
  • Related API hosts, if explicitly listed (api.shop.lab.test).
  • Not third-party services (payment, analytics, identity providers) unless the agreement names them.
  • Not other tenants' resources on shared platforms.

Where a front-end calls several domains, list each one you may test, and exclude the rest. A short, explicit scope is easier to defend than a broad one.

Maintaining scope during a test

Scope changes. A new subdomain turns up, the client expands the window, or a path turns out to belong to a vendor. Update scope in Burp and in your notes, and ask for confirmation in writing when it expands. Keep the scope file in your exported configuration so the whole team uses the same one.

Try it: a scope matcher

A stand-in that implements include and exclude rules with protocol, host regex, port and file regex, and tells you whether a URL is in scope and why. It shows how an unanchored regex goes wrong.

Python Stand-in: include and exclude scope rules

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: filter a request list by scope

A second stand-in uses the scope to split a captured list into "keep" and "drop", the same thing "stop logging out-of-scope items" does.

Python Stand-in: drop out-of-scope traffic

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.

Check your understanding

Quick check ยท 4 questions

of 4 answered You scored / 4 ยท perfect!

  1. 1. If a URL matches both an include and an exclude rule, what happens?

    Exclude rules override includes. Use them for URLs like logout or delete-account that would disrupt the test.
  2. 2. Why is the regex shop.lab.test (with no end anchor) risky in advanced scope?

    Without ^ and $ anchors, extra text after the host still matches. Anchor hosts and escape dots.
  3. 3. Which tools automatically respect scope in Burp Professional?

    Automated crawling and scanning follow scope. Manual tools like Repeater and Intruder send what you tell them, so check the host yourself.
  4. 4. When should scope be changed?

    Scope mirrors the authorisation. Expand it only after the owner agrees in writing.

Summary

  • Scope is Burp's version of your rules of engagement: include what is permitted, exclude what is risky.
  • Simple prefix rules are quick; advanced rules use protocol, host, port and file with anchored regular expressions.
  • Connect scope to history and site map filters, interception rules and automated tools.
  • Third-party services stay out of scope unless the agreement names them.
  • Keep Burp's scope, your notes and the agreement in step.

Next: The site map