Read a sample: 1. Scope, Permission, and the Tester's Job
A browser receives security instructions alongside the pages it displays. Some of those instructions arrive as HTTP response headers: fields sent by a server or intermediary before the response body. They can influence whether a page may be framed, where scripts may load from, how certain content is interpreted, and what information accompanies a navigation.
The tester’s job is not simply to count those headers. It is to determine which response was observed, what a policy says, whether the setting is relevant to the application, and what the available evidence supports. A missing header may be worth correcting, but it is not, by itself, proof that an attacker can compromise a user. A restrictive-looking header may be incomplete, ineffective for a particular response, or different from the policy the browser actually applies.
This book develops a workflow for making those distinctions. Before opening developer tools or issuing a command, however, you need a boundary: permission to test, an agreed definition of what may be tested, and a plan for handling what you collect.
An authorized security assessment begins with a clear agreement from someone empowered to grant permission for the systems involved. That agreement should identify the target, the permitted activities, the testing period, and the people to contact if something unexpected happens. It should also explain any restrictions on accounts, data, automated requests, or changes to the environment.
A public website is not automatically an authorized target. The fact that a browser can request a page does not establish permission to conduct a security assessment of it. An organization may publish a security testing policy, but its terms still need to cover the asset and activity you intend to test. If the scope is unclear, ask before proceeding.
For a workplace engagement, authorization may be documented in a statement of work, an internal ticket, a rules-of-engagement document, or another record appropriate to the organization. The format matters less than the ability to establish what was approved and by whom. Keep the approved scope accessible throughout the work, especially when several hostnames, environments, or teams are involved.
A useful authorization record answers questions such as these:
- Who owns or controls the target, and who approved the work?
- Which hostnames, ports, environments, and accounts are included?
- Which routes and testing techniques are allowed or excluded?
- When may testing occur, and whom should the tester contact?
- How should evidence be stored, shared, and eventually disposed of?
- What should happen if testing reaches a third-party service or reveals sensitive data?
These questions are practical controls, not paperwork to complete after the interesting work. If an approved hostname redirects to a different service, for example, the tester needs to know whether that destination is also in scope. A redirect is evidence about the original response; it is not permission to test every destination the browser can reach.
Scope is easiest to follow when it describes actions, not just an organization’s name. “Test the company website” leaves too much unresolved. Does it include a separate login provider? A content delivery network? An administrative interface? A route accessible only to customers? Does it allow changing server settings, or only reading responses?
For a header-focused assessment, the permitted work might include ordinary requests to named routes, inspection of responses in a browser and on the command line, and harmless local demonstrations of browser policy behavior. It might exclude password guessing, attempts to bypass authentication, load testing, changes to application data, and requests to unrelated hosts.
Authentication deserves particular attention. A login page may be in scope while the identity provider behind it is not. Even where authenticated testing is approved, use the account and role specified in the agreement. Do not assume that a session obtained for one role authorizes exploration of another role or access to another user’s information.
Also distinguish scope from reachability. A response may contain links to assets on another domain, and a browser may fetch them as part of rendering a page. The engagement should say whether those requests are acceptable and whether their responses may be assessed. If the answer is uncertain, stop and clarify rather than treating an automatic browser request as approval for further investigation.
When a result suggests a problem outside the agreed boundary, record the observation without expanding the test. For instance, you might note that an in-scope route redirects to an out-of-scope login service. You do not need to inspect that service’s policies to establish the redirect. The client can decide whether a separate authorization is appropriate.
Throughout this book, we will use a fictional application called Harbor Notes. It is a small local web application for viewing and editing notes. Its purpose is to give us controlled responses whose headers can be inspected, compared, and changed without involving a public service or real user data.
The engagement is equally fictional, but its boundaries resemble those of a real assignment:
> Objective: Assess selected browser security policies on responses served by the Harbor Notes lab and provide evidence-led configuration findings. > > Authorized environment: The local Harbor Notes application and lab pages created for this book, running on the tester’s own machine. > > Permitted activity: Send ordinary requests to the lab, inspect response headers and browser behavior, use the designated lab account where provided, and change lab configuration as directed by the exercises. > > Excluded activity: Test public…