Skip to content
Tutorials Center
My learning

Topics

Lesson 33 of 38 ยท Testing and Tooling

Authorized Testing, Scope and Rules of Engagement

Learn the legal and ethical basics of security testing: written authorization, scope, rules of engagement, safe labs, responsible disclosure and reporting findings.

Security testing uses techniques that are crimes when applied without permission. The same request to a server is a professional assessment when you are authorized and an offense when you are not. Good testers therefore treat authorization as seriously as technique. This lesson explains how professional testing is arranged, how to practice legally, and how to report what you find.

This is general education, not legal advice. Laws differ by country (for example computer misuse and unauthorized access statutes). Never test a system you do not own without clear, written permission from someone who has the authority to give it.

What counts as authorization

Permission means a written agreement from the owner of the system, or someone empowered to act for them. "It was easy to get in" is not permission. "The site had no login" is not permission. A friend's server needs the friend's explicit written consent, and a company's cloud environment may involve the cloud provider's rules too.

Typical documents:

  • Statement of work or contract: what is bought, for how long.
  • Scope document: exactly which systems may be tested.
  • Rules of engagement (RoE): how testing may be done.
  • Authorization letter ("get out of jail letter"): a signed note the tester carries, naming the tester, dates and systems, for use if security staff or police ask questions.
  • Non-disclosure agreement covering anything you see.

Scope

Scope lists what is in and what is out:

  • In scope: hostnames, IP ranges, applications, APIs, mobile apps, and the test accounts provided.
  • Out of scope: production databases with real customer data, third-party services (payment providers, SaaS tools), shared hosting neighbors, employees' personal devices, and social engineering unless explicitly approved.
  • Time window: dates and hours; testers announce when they start and stop.
  • Allowed techniques: for example no denial of service, no destructive actions, no data exfiltration beyond proof.

Staying inside scope is part of the job. If you discover a connected system that is not listed, stop and ask. Do not "just check".

Before any test

Written permission From the owner.
Clear scope In and out of scope.
Rules of engagement What is allowed.
Emergency contact Who to call.

No document, no test.

1 / 2

Rules of engagement

An RoE agreement answers practical questions in advance:

  • Testing from which IP addresses, so the defender can tell you from a real attacker?
  • Which hours, and is production allowed?
  • Rate limits for tooling, to avoid accidentally taking the service down.
  • Who is the emergency contact if something breaks or a critical flaw appears?
  • What happens with sensitive data found (do not copy it; note that access was possible)?
  • How are credentials and findings transferred (encrypted channels only)?
  • Is the defending team told (white box) or not (a "red team" exercise with limited knowledge)?

Practicing legally

You can learn a great deal without touching anyone else's systems:

  • Your own lab: virtual machines on your computer, isolated from the internet.
  • Deliberately vulnerable apps designed for learning (for example OWASP Juice Shop, DVWA, WebGoat), installed locally.
  • Capture-the-flag (CTF) events and platforms with their own rules.
  • Bug bounty programs: the program's published policy is the authorization, but only for the listed scope and rules. Read the policy every time.

Even in a lab, keep vulnerable apps off public networks.

Responsible disclosure

If you notice a weakness in something you were not testing, such as a leaked file you stumbled upon, the safe path is to stop, avoid using or copying the data, and report to the owner through a published security contact (a security.txt file or a vulnerability disclosure policy). Give enough detail to reproduce the issue, give them reasonable time to fix, and do not publish exploit details before that. Some jurisdictions give weak protection to well-meaning finders, so prefer organizations that publish a policy promising not to take legal action.

Writing a useful finding

A report is the product of testing. Each finding should contain:

  1. Title and severity with a reasoned rating.
  2. Where: the affected component and version.
  3. What: a description in plain language.
  4. Impact: what an attacker could achieve, tied to the business.
  5. Evidence: steps to reproduce, screenshots or sanitized logs.
  6. Fix: concrete remediation and references (for example the matching OWASP Top 10 category).
Python A scope checker for your own tooling

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.

Real testers build this kind of guard into their scripts so that a typo can never send traffic outside the agreed range.

Python Format a finding for a report

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. What makes a security test legal and professional?

    Authorization must be explicit, written and come from someone with authority. Ease of access is never permission.
  2. 2. During a test you find a connected system that is not listed in the scope. What should you do?

    Scope is a hard boundary. Unlisted systems need new written approval.
  3. 3. Which is a legal place to practice web attacks?

    Your own lab, CTFs and bug bounty programs within their published rules are legitimate ways to learn.
  4. 4. What should a good finding report contain besides a title?

    The goal is remediation: reproducible evidence and clear fix guidance help the owner act.

Summary

  • Testing without written permission is illegal in most places; scope and rules of engagement define what is allowed.
  • Stop and ask when something falls outside the agreement.
  • Practice in your own lab, on intentionally vulnerable apps, CTFs and within bug bounty policies.
  • Disclose responsibly and write findings with impact, evidence and fixes.

Next: A Tour of Common Security Tools