Skip to content
Tutorials Center
My learning

Topics

Lesson 7 of 38 ยท Scoping, Rules and Methodology

Rules of Engagement

Learn what rules of engagement contain: permitted techniques, testing windows, communication, stop conditions, data handling and escalation, with a checkable example.

If the scope says what may be tested, the rules of engagement (RoE) say how the test is conducted. They cover which techniques are allowed, when testing happens, how tester and client communicate, and what to do when something goes wrong. The RoE is usually a short document signed by both sides before work begins. It is the document you will reach for at 2 a.m. when a service stops responding and someone asks whether you are allowed to keep going.

What the rules cover

Permitted and forbidden techniques

State clearly what is allowed. Common decisions:

Technique Typical stance
Port and vulnerability scanning Allowed, with agreed rate limits
Exploiting vulnerabilities Allowed, with limits on impact
Password guessing Often limited to avoid account lockouts
Denial of service and stress testing Usually forbidden unless specifically requested
Social engineering Allowed only if named, with target lists and pretexts approved
Physical entry Only with an authorization letter
Data extraction Minimal proof only; no bulk copying
Persistence (leaving backdoors) Usually forbidden, or only agreed markers
Lateral movement to unlisted systems Forbidden unless approved

When a technique is not addressed, treat it as not allowed and ask.

Time windows

Agree when testing may occur (business hours, nights, weekends) and when it must pause, such as during a product launch or financial close. For internet-facing tests, record the source IP addresses you will use so the client's monitoring team can tell your traffic from a real attack.

Rate and impact limits

Scanning too fast can crash old devices. Write down limits such as "no more than 100 packets per second per host" and "no destructive payloads". If a service shows signs of stress, slow down.

Communication plan

  • A technical contact who can answer questions and confirm scope.
  • An emergency contact, reachable 24 hours, who can stop the test.
  • A status cadence, for example a short daily update.
  • A secure channel for sensitive findings (encrypted email or a client portal), never plain chat.
  • Who is informed inside the client organization, and who is not.

Stop conditions and escalation

Define in advance when to pause and call:

  • A system becomes unavailable or degraded.
  • You discover evidence of a real attacker already inside.
  • You reach data that is more sensitive than expected.
  • You find a critical vulnerability that is trivial to exploit from the internet (report immediately, do not wait for the final report).
  • You realize you may have left scope.
flowchart TD
    A["Something unexpected happens"] --> B{"Service down or<br/>real attacker seen?"}
    B -->|"yes"| C["Stop testing"]
    C --> D["Call emergency contact"]
    D --> E["Write down time and actions"]
    B -->|"no"| F{"Possible scope breach?"}
    F -->|"yes"| C
    F -->|"no"| G["Continue, note it in the log"]

Decision flow for unexpected events. The safe default is to stop and call.

Data handling rules

Agree on what you may collect, how it is stored (encrypted), who may see it, how long you keep it and how it is destroyed. Also agree on how credentials you discover are treated: usually reported and then protected, not reused outside scope.

Cleanup and handover

Rules should say what you must remove afterwards: test accounts, uploaded files, scheduled tasks and any tools you placed. Keep a list as you go. If you leave an artifact on purpose, for example a harmless text file as proof of access, record its exact location and name so the client can delete it.

Stand-in: encode the rules and check an action

Writing the rules as data lets a script judge a planned action. The first example checks planned actions against a ruleset and the testing window.

Python Is this action allowed by the RoE?

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.

The second example is a rate limiter that enforces a packets-per-second ceiling. It models the polite scanning behavior that RoE usually require, and it is a simulation: it sleeps nothing and just computes the schedule.

Python Plan scan pacing under a rate limit

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.

A short RoE checklist

  1. Scope document attached and signed.
  2. Allowed and forbidden techniques listed.
  3. Time windows and source IPs recorded.
  4. Rate and impact limits written.
  5. Contacts, emergency number and update cadence.
  6. Stop and escalation conditions.
  7. Data handling, retention and destruction.
  8. Cleanup obligations.

See also Scoping a Penetration Test and Note-Taking and Evidence, because your log is what proves you stayed within the rules.

Check your understanding

Quick check ยท 4 questions

of 4 answered You scored / 4 ยท perfect!

  1. 1. What do the rules of engagement define that the scope does not?

    Scope says what is tested. The RoE says how, when, with what limits, and what to do when things go wrong.
  2. 2. Why record your source IP addresses in the RoE?

    Clients monitor their networks. Known tester addresses prevent false alarms and confusion with real incidents.
  3. 3. You find evidence that a real attacker is already inside the client network. What is correct?

    A live incident needs the client's incident response immediately, and your activity must not interfere.
  4. 4. A technique is not mentioned in the RoE. How should you treat it?

    Silence is not permission. Ask and get written approval first.

Summary

  • The RoE sets permitted techniques, windows, rate limits, communication, stop conditions, data handling and cleanup.
  • Unaddressed techniques are not allowed until approved in writing.
  • Record tester source IPs and keep an emergency contact reachable.
  • Stop and call when a service fails, a real intruder appears or you may have left scope.
  • Encoding rules as data lets scripts check planned actions, but people remain responsible.

Next: Penetration Testing Methodologies and Standards