TExcelTAD
Home › Network Security: Discovery, Segmentation, Firewalls, VPN & IDS › Scope and Authorization for Network Assessments

Scope and Authorization for Network Assessments

A network scan is a few seconds of typing. A scan of the wrong address range is a legal problem, an outage, or both: an assessor who mistypes 10.10.0.0/16 for 10.10.0.0/24 scans 256 times more addresses, most of them belonging to somebody else, and a scan with aggressive options can knock over an old printer or a medical device. Everything in this course starts with a written answer to three questions: who allowed this, what exactly may be touched, and how.

The legal background (why unauthorised scanning can fall under computer-misuse laws, and what "authorization" means in court) is in Authorization, Scope and Rules of Engagement, US law, UK and EU law and Vietnamese law. This lesson turns it into the paperwork and checks of a network assessment.

Who can authorise

Only the owner of the systems (or someone with documented delegated authority) can authorise testing. Three traps are common in network work:

  • Hosting and cloud. The server is yours, the network and the hypervisor are the provider's. Most cloud providers allow customers to scan their own instances without asking, but forbid some activities (denial-of-service testing, scanning other tenants, DNS zone walking of their infrastructure). Read the provider's current policy and cite it in the scope.
  • Managed services and shared ranges. An IP range in the company's firewall rules may belong to an outsourced mail filter or a partner VPN. Being reachable from your network is not permission.
  • Third-party devices on your network. A vendor's appliance or a tenant's office in a shared building may sit on your switches but under someone else's contract.

The scope document

Field Example for the lab network
Client and authoriser Lab Ltd., signed by the IT manager (name, role, date)
In scope 10.10.0.0/24; the public address 203.0.113.10 (the web server's NAT address)
Out of scope 10.10.0.40 (printer, owned by the leasing company); anything not listed
Activities host discovery, TCP connect and SYN scans, top 100 UDP ports, version detection, unauthenticated vulnerability scan, configuration review of firewall exports
Not allowed password guessing, denial of service, exploitation, changes to systems, social engineering
Window 2026-02-02 to 2026-02-06, 18:00–22:00 UTC
Source addresses assessor laptop 10.10.0.99, external scanner 198.51.100.20
Rate limits at most 100 probes per second per target; stop on any service degradation
Contacts client's on-call engineer (24 h phone), assessor lead; emergency stop word
Data handling results encrypted at rest, deleted 90 days after the report

The source addresses matter twice: the client's SOC must know them (otherwise your scan correctly becomes an incident), and they let the client prove afterwards which traffic was yours.

Checking the scope in code

A scope is only useful if every command is checked against it. Python's ipaddress module makes the check exact; the program below is the kind of guard an assessor puts in front of every tool run.

python · try it yourself
import ipaddress
from datetime import datetime, timezone

IN_SCOPE  = [ipaddress.ip_network(n) for n in ("10.10.0.0/24", "203.0.113.10/32")]
EXCLUDED  = [ipaddress.ip_network(n) for n in ("10.10.0.40/32",)]
WINDOW    = [(datetime(2026, 2, d, 18, tzinfo=timezone.utc), datetime(2026, 2, d, 22, tzinfo=timezone.utc)) for d in range(2, 7)]

def check_target(text):
    """Accept a single address or a network; every address in it must be in scope and not excluded."""
    net = ipaddress.ip_network(text, strict=False)
    if not any(net.subnet_of(s) for s in IN_SCOPE if s.version == net.version):
        return "REFUSE: not inside the scope"
    for ex in EXCLUDED:
        if net.overlaps(ex):
            return f"REFUSE: overlaps excluded {ex}"
    n = net.num_addresses
    return f"ok ({n} address{'es' if n != 1 else ''})"

def check_time(when):
    return any(a <= when < b for a, b in WINDOW)

for target in ["10.10.0.10", "10.10.0.0/24", "10.10.0.0/25", "10.10.0.64/26", "10.10.0.0/16", "203.0.113.10", "203.0.113.11"]:
    print(f"{target:15} {check_target(target)}")

for t in [datetime(2026, 2, 3, 19, 30, tzinfo=timezone.utc), datetime(2026, 2, 3, 22, 5, tzinfo=timezone.utc)]:
    print(t.isoformat(), "inside window" if check_time(t) else "OUTSIDE window: stop")
10.10.0.10      ok (1 address)
10.10.0.0/24    REFUSE: overlaps excluded 10.10.0.40/32
10.10.0.0/25    REFUSE: overlaps excluded 10.10.0.40/32
10.10.0.64/26   ok (64 addresses)
10.10.0.0/16    REFUSE: not inside the scope
203.0.113.10    ok (1 address)
203.0.113.11    REFUSE: not inside the scope
2026-02-03T19:30:00+00:00 inside window
2026-02-03T22:05:00+00:00 OUTSIDE window: stop

Notice the trap the checker catches: 10.10.0.0/24 is the scope, but scanning it as one block would hit the excluded printer. The correct target list is the scope minus the exclusion, which Nmap expresses with --exclude 10.10.0.40 (or --excludefile), and the checker should be run on the final list, not on what you meant to type.

python · try it yourself
import ipaddress
scope = ipaddress.ip_network("10.10.0.0/24")
excluded = ipaddress.ip_network("10.10.0.40/32")
blocks = list(scope.address_exclude(excluded))
blocks.sort()
print(len(blocks), "blocks:", " ".join(str(b) for b in blocks))
print("addresses:", sum(b.num_addresses for b in blocks))
8 blocks: 10.10.0.0/27 10.10.0.32/29 10.10.0.41/32 10.10.0.42/31 10.10.0.44/30 10.10.0.48/28 10.10.0.64/26 10.10.0.128/25
addresses: 255

Eight CIDR blocks cover the 255 addresses that remain; tools that take only CIDR targets get exactly this list.

Rules of engagement for network testing

  • Announce the window and source addresses to the SOC and the network team; agree how they confirm a call really comes from you.
  • Start gently: discovery and a slow scan first, aggressive timing only where agreed. Fragile devices (printers, PLCs, VoIP phones, old embedded web servers) get the lowest rate or none.
  • Stop conditions: service degradation, an unexpected system that looks critical, evidence of a real intruder (which you report at once instead of continuing).
  • Keep logs of every command with a timestamp and its output. They are your evidence of staying in scope.
  • No change: a network assessment reads; it doesn't "fix" a router config during the test.

How out-of-scope activity is detected

From the defender's side, the same scope document is a detection rule: scans from the agreed source addresses inside the window are expected; scans from anything else, or outside the window, are incidents. A SOC that whitelists "the assessor" by name instead of by address and time has made the assessment a perfect cover for a real attacker.

Pitfalls

  • Scoping by host name: DNS names move. Resolve them, write the addresses into the scope and re-check before testing.
  • Forgetting IPv6: a host in scope over IPv4 may have a global IPv6 address that the scope doesn't mention; say whether it is included.
  • NAT and load balancers: scanning 203.0.113.10 may land on a provider's shared load balancer serving other customers. Confirm what the public address really is.
  • Verbal extensions ("just look at the VPN too"): get them in writing before touching anything.

Practice

1. The client says "scan our office network, 10.10.0.0/24, and the cloud server www". What is missing before you can start?

A signature from someone authorised; the cloud server's exact address and the provider's policy; exclusions (the leased printer); allowed activities and forbidden ones; the time window; your source addresses; rate limits; contacts and a stop procedure; data handling.

2. During the test you find a host 10.10.1.7 reachable through the web server. May you scan it?

No. It is outside the written scope. Report the finding (the web server can reach another network) and ask for a scope extension in writing.

3. Use the checker: is 10.10.0.32/27 a valid target?

It lies inside the scope but covers 10.10.0.32–10.10.0.63, which includes the excluded 10.10.0.40, so the checker refuses it. Split it, or use --exclude.

Test yourself

Who can authorise a scan of a company's network?

  1. Any employee
  2. The owner of the systems or someone with documented delegated authority
  3. The assessor
  4. The Internet provider

Why does the scope document list the assessor's source addresses?

  1. For billing
  2. So the SOC recognises the traffic and the client can later tell assessor traffic from attacks
  3. Because Nmap requires it
  4. To bypass the firewall

How many CIDR blocks does address_exclude return for 10.10.0.0/24 minus 10.10.0.40/32?

  1. 1
  2. 2
  3. 8
  4. 255

While testing you find evidence that a real intruder is on a host. What do you do?

  1. Continue, it's out of scope
  2. Stop and report it to the agreed contact at once
  3. Remove the intruder yourself
  4. Delete your logs