Scope, authorization & rules of engagement
Write a scope and rules of engagement that a client could sign.
By Invicly Tech, , in Ethical Hacking & Penetration Testing. About 9 minutes to read.
In short
The scope lists exactly which systems may be tested, and the rules of engagement set the conditions: when, how, and what is forbidden. A clear, signed document protects both tester and client and prevents accidental harm.
Explained simply
Before a test starts, the client and the tester write down two things. The scope says exactly what may be tested: these IP addresses, these domains, this app. The rules of engagement (often shortened to RoE) say how and when: test hours, forbidden techniques, who to call, and what to do if something breaks.
Think of it like a map for a building inspector. The map shows which rooms to inspect and which rooms are private. The rules say the inspector may open doors but not knock down walls, and must call the manager if a pipe bursts.
A good scope is precise. "Our website" is too vague. "https://app.example.com and the API at api.example.com, IP range 203.0.113.0/28, excluding 203.0.113.5" is clear. When in doubt, the tester asks and gets the answer in writing.
The final piece is the signed authorization letter. It is your proof of permission. Keep a copy with you during the test, because if someone at the client spots your traffic and calls the police, this letter is what shows you are working legally.
Press Play on a diagram to walk through it one step at a time.
- Scope
- In-scope assets
- Out-of-scope assets
- Timing
- Test windows
- Blackout periods
- Limits
- No DoS
- No real data
- Contacts
- Emergency contact
- Escalation
- Client to Tester: Request a test, share goals1Request a test, share goals
- Tester to Client: Draft scope and RoE2Draft scope and RoE
- Client to Tester: Corrections, out-of-scope list3Corrections, out-of-scope list
- Client to Tester: Signed contract and letter4Signed contract and letter
- Tester to Client SOC: Source IPs and test window5Source IPs and test window
- Tester to Client: Testing starts in the window6Testing starts in the window
In depth
Writing a scope that leaves no gaps
List every in-scope asset in a form a machine could check: full domain names, URLs, IP ranges in CIDR notation (for example 10.10.20.0/24), cloud account IDs, and app or API versions. Then list the out-of-scope assets explicitly, such as production databases, a payment provider, a partner's network, or a fragile legacy server.
Watch out for wildcards. *.example.com might include a subdomain that points to a third-party service the client does not own. Agree how new discoveries are handled: the usual rule is that anything not listed is out of scope until the client confirms it in writing. Also ask which user accounts you will get and what test data you may create.
- Use exact hostnames and CIDR ranges
- Write an explicit out-of-scope list
- Unlisted discoveries need written approval
- Agree on test accounts and test data
Timing, contacts and stop conditions
Rules of engagement set test windows, for example weekdays 09:00 to 17:00 in the client's time zone, and blackout periods such as month-end payroll. They list the tester's source IP addresses so the client's security team can recognise the traffic, and decide whether that team is told about the test at all.
Contacts matter most. You need a technical contact for questions and an emergency contact who answers the phone 24/7. Agree on stop conditions: if a system crashes, if you find signs that a real attacker is already inside, or if you find a critical issue, you pause and call. Critical findings are usually reported at once, not saved for the final report.
- 1Notice the problem
Service down or signs of a real intruder
- 2Stop testing
Pause all tools at once
- 3Call emergency contact
Use the number in the RoE
- 4Record what happened
Time, command, target, result
- 5Resume only on approval
Written go-ahead from the client
Forbidden and restricted techniques
Most RoE documents ban denial of service (anything meant to overload or crash a system), social engineering of staff unless explicitly ordered, physical entry, and changes to production data. Some allow techniques only with extra approval, such as password spraying against real accounts, which can lock users out.
Cloud providers add their own rules. AWS, Azure and Google Cloud do not require pre-approval for testing most of a customer's own resources, but their published policies still forbid things like DoS and stress testing and attacks on the provider's shared infrastructure. Read the current policy for each provider involved and reference it in the RoE.
- No DoS or stress testing
- No social engineering unless ordered
- No changes to real production data
- Account lockout risks need sign-off
- Follow each cloud provider's testing policy
The authorization letter
The authorization letter (sometimes jokingly called the "get out of jail" letter) is a short, signed statement. It names the client company, the testing company and testers, the in-scope assets, the dates, and a 24/7 contact who can confirm the test is real. It must be signed by someone with authority over those assets, such as the CISO or CTO, not just the project manager who hired you.
The letter does not replace the full contract. The contract also covers liability, confidentiality, how findings and data are stored and destroyed, and payment. Testers must never start before both documents are signed, even when the client says "go ahead, the paperwork is coming".
Learn it in 4 short steps
About 40m each. Track them with a timer in your plan.
- 1Define in-scope and out-of-scope assets~40m
- 2Set testing windows and contacts~40m
- 3List forbidden techniques like DoS~40m
- 4Get signed written authorization~40m
Key points
- Scope names in-scope and explicitly out-of-scope assets.
- Rules of engagement set timing and forbidden techniques.
- An emergency contact lets testing stop quickly if needed.
- Both parties sign before any testing begins.
Key terms
Tap a card to flip it. 0/4 known
Examples
Turning a vague request into a scope
The client says: "Test our online shop." Step 1: Ask which hosts make up the shop. Answer: www.shop.example, api.shop.example and an admin panel at admin.shop.example. Step 2: Ask about hosting. The checkout uses a payment provider, so that goes on the out-of-scope list. Step 3: Ask for test accounts: one customer and one admin. Step 4: Agree on hours and an emergency phone number. Step 5: Write it in a scope file that tools can use, and get it signed.
# scope.txt (in scope, from the signed RoE)
www.shop.example
api.shop.example
admin.shop.example
203.0.113.16/29
# out-of-scope.txt
pay.provider.example # third-party payments
203.0.113.20 # legacy server, too fragile
Window: Mon-Fri 09:00-17:00 UTC, 3-14 March
Emergency: J. Lee, +44 20 7946 0000 (24/7)A subdomain that turns out not to be the client's
During recon you find help.shop.example. It is under the client's domain, so it looks in scope. Step 1: Resolve it and see that it points to a hosted help-desk SaaS company. Step 2: Stop. The client owns the name, but not the server behind it. Step 3: Note it as a finding for the client (for example, check that the DNS record is still needed) and ask in writing whether anything about it may be tested. Step 4: Do not test the SaaS platform itself; only its owner can allow that.
Quick reference
- Scope = what you may test; RoE = how, when and with what limits
- Write targets as exact hostnames and CIDR ranges, plus an explicit exclusion list
- Anything not listed is out of scope until confirmed in writing
- Always have a 24/7 emergency contact and clear stop conditions
- Report critical findings immediately, not only in the final report
- Keep the signed authorization letter with you during the test
- Feed scope files to tools, for example nmap -iL scope.txt --excludefile out.txt
Quick quiz
Pick an answer to see if you're right and why.
Practice exercises
Try each one yourself first. Use the hint if you get stuck, then compare with the solution.
- Exercise 1easy
Write a scope section for your own home lab: list the in-scope VMs and the out-of-scope devices on your home network.
- Exercise 2medium
Draft a one-page rules of engagement for a made-up client web app, with timing, forbidden techniques, contacts and stop conditions.
- Exercise 3hard
Make nmap refuse to touch excluded hosts by using scope files, and prove it with a list scan that sends no packets.
Check yourself
Answer in your head, reveal, then be honest with yourself.
Feel confident about this topic?
Frequently asked questions
- What is the difference between scope and rules of engagement?
- Scope is the list of what you may test. Rules of engagement are the conditions: when, how, which techniques are forbidden, and who to contact.
- Do I need permission from AWS or Azure to pentest my cloud app?
- For most services, no pre-approval is needed when you test your own resources, but each provider's published policy still applies and forbids things like DoS. Always check the current policy before you start.
- Is an email saying "go ahead" enough authorization?
- It is risky. Use a signed letter and contract from someone with authority, listing assets and dates. An informal email can be disputed later.