TExcelTAD
Home › Ethical Hacking & Penetration Testing Methodology › The Rules of Engagement Document

The Rules of Engagement Document

The authorization says whether you may test, the scope says what. The rules of engagement (RoE) say how: which techniques, at what rate, in which hours, who to call when something breaks, what to do with a password found in a file, and what makes the test stop. A short authorization letter can be enough for a lab; a production engagement needs an RoE that both project leads sign and that every tester has read. This lesson gives a complete template and a linter that finds the vague sentences which cause trouble later.

What the RoE has to settle

Section The question Example of a good answer
Parties and contacts who decides, who answers the phone client lead, technical contact, 24/7 emergency number, tester lead, with deputies
Scope reference which signed scope this RoE applies to "Scope v2 signed 2026-11-24, 10.10.0.0/24 minus 10.10.0.1 and 10.10.0.200/29"
Test windows when dates, daily hours with a time zone, change freezes, quiet hours
Source addresses where the traffic comes from the testers' fixed addresses, so the blue team can tell test from attack
Allowed techniques what may be done discovery, authenticated testing with the given accounts, validation of findings, password guessing at max 3 attempts per account per hour
Forbidden techniques what may not be done without a written amendment denial of service, social engineering, physical access, changing or deleting production data, persistence
Rates and load how hard --max-rate 100 per host, no more than 5 concurrent web requests, back off on errors
Exploitation limits how far validation goes proof of access only; no lateral movement beyond the scope; stop at the first proof per finding
Sensitive data what to do on finding it stop browsing, record minimum evidence, notify within 1 hour, don't copy
Critical findings when to interrupt the test any finding allowing unauthenticated access to customer data or remote code execution: phone at once, written note within 4 hours
Stop conditions when testing halts service degradation, out-of-scope access, signs of a real attacker, client request
Communication how status is reported daily e-mail summary, encrypted channel for findings
Evidence and data how results are kept encrypted storage, retention period, deletion certificate
Blue team do the defenders know? announced (they log and observe) or unannounced (white-cell contact only)
Signatures who agrees both leads, dated

The template

Copy this into your engagement folder and fill every line. A blank line is a decision nobody made.

text
RULES OF ENGAGEMENT                                   Version: ....  Date: ..........
Engagement: .........................................  SOW ref: ....................
Applies to scope document: ........................... (version, date signed)

1. CONTACTS
   Client lead (decisions):        name ............ phone ............ email ............
   Client technical contact:       name ............ phone ............ email ............
   Emergency 24/7 (stop the test): name ............ phone ............
   Tester lead:                    name ............ phone ............ email ............
   Testers:                        ......................................................

2. WINDOWS
   Dates: .......... to ..........   Daily hours: ..... to ..... Time zone: ......
   Blackout dates / change freezes: ..................................................
   Testing outside the window requires: written approval from the client lead.

3. SOURCES
   Tester source addresses: ...........................  VPN / jump host: ..........

4. TECHNIQUES
   Allowed:   ........................................................................
   Forbidden: denial of service; social engineering; physical access; modifying or deleting
              production data; persistence; anything not listed as allowed.
   Credential testing: max ... attempts per account per ...; accounts provided: ............
   Rate limits: max ... probes/s per host; max ... concurrent requests per application.

5. VALIDATION AND EXPLOITATION
   Validation may: ...................................................................
   Validation may not: ...............................................................
   After proof of access: stop, record, report. No pivoting outside scope.

6. DATA
   Sensitive data found (personal, payment, health, credentials): stop, record the minimum
   (location, type, count, time), do not copy, notify ............ within ... hours.
   Evidence storage: ........................ (encrypted)  Retention: ... days after report.
   Deletion confirmed in writing by: ....................

7. ESCALATION AND STOP CONDITIONS
   Critical finding: phone ............ at once; written note within ... hours.
   Stop at once if: service degradation; out-of-scope access; signs of a real compromise;
   client request. Resume only after: ...............................................

8. COMMUNICATION
   Status: ..................... (daily / weekly)  Channel: ...........................
   Findings are never sent by unencrypted email.

9. BLUE TEAM
   Announced / unannounced (circle).  White-cell contact: ..............................

10. SIGNATURES
   Client lead: ................ date ......   Tester lead: ................ date ......

A linter for vague rules

The RoE is read under pressure: at 02:00 when a server stops answering, or when a tester finds a spreadsheet of passwords. Vague phrases ("normal business hours", "the website", "as appropriate") fail exactly then. The linter below checks a draft for missing sections and for phrases that need a number, a name or a time zone. The draft is a typical first version.

python · try it yourself
import re

draft = """RULES OF ENGAGEMENT
1. CONTACTS: client lead J. Pham; tester lead A. Nguyen.
2. WINDOWS: 2026-12-01 to 2026-12-12, normal business hours.
3. SOURCES: the tester's office.
4. TECHNIQUES: allowed: scanning and testing of the website as appropriate.
   Rate limits: reasonable.
6. DATA: sensitive data will be handled carefully.
7. STOP CONDITIONS: stop if there are problems.
10. SIGNATURES: J. Pham 2026-11-24, A. Nguyen 2026-11-24.
"""

REQUIRED = ["CONTACTS", "WINDOWS", "SOURCES", "TECHNIQUES", "VALIDATION", "DATA",
            "STOP CONDITIONS", "COMMUNICATION", "BLUE TEAM", "SIGNATURES"]
VAGUE = {
    r"normal business hours": "give hours and a time zone (09:00-17:00 Asia/Ho_Chi_Minh)",
    r"the website": "name hosts or URLs exactly",
    r"as appropriate|reasonable": "give a number or a named decision-maker",
    r"handled carefully": "say what to do: stop, record what, notify whom, within how long",
    r"if there are problems": "list the conditions (degradation, out-of-scope access, real attacker)",
    r"tester's office": "list source IP addresses",
}

present = {s for s in REQUIRED if re.search(rf"^\d+\.\s*{s}\b", draft, re.M)}
for s in REQUIRED:
    if s not in present:
        print(f"MISSING  section {s}")
for n, line in enumerate(draft.splitlines(), 1):
    for pattern, advice in VAGUE.items():
        m = re.search(pattern, line, re.I)
        if m:
            print(f"VAGUE    line {n}: '{m.group(0)}' -> {advice}")
if not re.search(r"\b(24/7|emergency)\b", draft, re.I):
    print("MISSING  an emergency contact who can stop the test")
MISSING  section VALIDATION
MISSING  section COMMUNICATION
MISSING  section BLUE TEAM
VAGUE    line 3: 'normal business hours' -> give hours and a time zone (09:00-17:00 Asia/Ho_Chi_Minh)
VAGUE    line 4: 'tester's office' -> list source IP addresses
VAGUE    line 5: 'the website' -> name hosts or URLs exactly
VAGUE    line 5: 'as appropriate' -> give a number or a named decision-maker
VAGUE    line 6: 'reasonable' -> give a number or a named decision-maker
VAGUE    line 7: 'handled carefully' -> say what to do: stop, record what, notify whom, within how long
VAGUE    line 8: 'if there are problems' -> list the conditions (degradation, out-of-scope access, real attacker)
MISSING  an emergency contact who can stop the test

Every line of output is a question to settle in the kick-off meeting. The draft has no emergency contact, so nobody can stop the test at night. It also says nothing about how far validation may go, so the first proof of access becomes a judgement call made alone.

How RoE violations are detected

The blue team, if announced, compares alerts with the testers' declared source addresses and windows; traffic from an unknown source or outside the window is treated as a real attack (which is exactly right). Rate limits show up as load graphs and WAF blocks. The testers' own activity log (target, time, technique, tool, command) is checked against the RoE at the end of each day by the tester lead.

How it is prevented

Kick-off meeting with the RoE on the screen; every tester signs that they have read it; tools are configured from it (rate limits in the scanner profile, target lists generated from the scope file, a clock in the client's time zone); a daily check of the activity log against it. Any change, however small, becomes a new RoE version.

Pitfalls

  • Time zones. "09:00–17:00" with a tester in Hanoi and servers in Frankfurt has two meanings. Write the zone, or use UTC.
  • "Anything not forbidden is allowed." The safe default is the opposite: anything not explicitly allowed is forbidden.
  • No deputies. The single emergency contact is on a plane when the database slows down.
  • An RoE nobody on the testing team has read, because it was signed by sales.

Practice

  1. Rewrite the draft's sections 2, 4 and 7 so that the linter has nothing to say about them.
  2. Add a check to the linter that every date in the WINDOWS line is followed, somewhere on that line, by a time zone or "UTC".
Answers
  1. For example: 2. WINDOWS: 2026-12-01 to 2026-12-12, 08:00-17:00 UTC, no testing 2026-12-05 (release freeze). 4. TECHNIQUES: allowed: discovery and authenticated web testing of shop.lab.test and api.lab.test with accounts lab-a and lab-b; max 50 requests/s; password guessing max 3 attempts per account per hour. 7. STOP CONDITIONS: stop at once on error rates above 1 % or response times above 2 s, any access outside scope, signs of a real compromise, or a request from the client lead or the emergency contact.
  2. Find the WINDOWS line with re.search(r"^\d+\.\s*WINDOWS.*
    quot;, draft, re.M)
    , then check it with re.search(r"\b(UTC|[A-Z][a-z]+/[A-Za-z_]+)\b", line); report VAGUE if dates are present but no zone is.

Test yourself

Which document answers 'what do we do if a tester finds a file full of customer passwords'?

  1. The scope
  2. The rules of engagement (sensitive-data handling)
  3. The NDA
  4. The invoice

Why should the RoE list the testers' source IP addresses?

  1. For billing
  2. So defenders can tell test traffic from a real attack and spot traffic that is neither
  3. To bypass the firewall
  4. It is required by CVSS

What is the safe default for techniques the RoE doesn't mention?

  1. Allowed, if careful
  2. Forbidden until added in writing
  3. Allowed at night
  4. Allowed for senior testers

The RoE says 'testing during normal business hours'. What is wrong?

  1. Nothing
  2. No hours or time zone: it means different things to the client, the testers and the servers
  3. Testing must be at night
  4. Business hours are illegal