The idea
Bram has an authorised job: a penetration test of Meridian Credit Union's customer portal, from a test machine on Meridian's DMZ segment (the part of the network that faces the internet). Before any tool runs, he has a signed Rules of Engagement document that says exactly which systems he may touch, from where, and when.
The same scan is a paid service against one host and a criminal offence against the one beside it. What tells them apart is the owner's authorisation, and the signed scope is how Bram proves he has it. So he reads it, then works inside it.
Steps
-
Read the rules before you touch anything
A penetration test is authorised access, and the Rules of Engagement write that authorisation down: the hosts in scope, the ones explicitly out of scope, the techniques allowed, the dates, the tester's source address and who to call.
Running these same tools against a system without its owner's permission is a criminal offence, under laws like the UK Computer Misuse Act and the United States' CFAA, however reachable the system is. The law turns on authorisation; the signed scope is Bram's proof of it, and the limit of it.
Scope lists names and addresses. A name such as
portal.meridian.testcan resolve to a shared address that also serves other customers, so each address must be confirmed as the client's own. Open the scope for this engagement.tester:~# cat /root/engagement/scope.txt
-
Sweep only what the scope names
Discovery is the first active step. A ping sweep asks addresses whether a host is up, touching no services yet. Even that is an active touch: every probe leaves a record on the target's side, so discovery stays inside the scope like everything else.
Enforce the scope in the tool, not only in your head. Bram copied the scope's in-scope addresses into
targets.txtand its out-of-scope ones intoexclude.txt.nmapreads its targets from one and refuses the other, so a mistyped range cannot reach the gateway.tester:~# cat /root/engagement/targets.txt /root/engagement/exclude.txt tester:~# nmap -sn -n -iL /root/engagement/targets.txt --excludefile /root/engagement/exclude.txt
-
Test only what you're authorised to
The portal at 10.0.5.10 is in scope, so Bram tests it within the rules: no denial-of-service, inside the dates. Scan its web ports, then read its
/statuspage, the sort of page that often says more than it should.This is the work Bram is paid for: probing an authorised host to find what an attacker could.
tester:~# nmap -n -p 80,443 10.0.5.10 tester:~# curl -sS -m 3 http://10.0.5.10/status
-
Stop at the boundary
The finding is a working lead: a core-banking host at 10.0.6.10. An attacker would pivot to it at once, using what one system gave away as the stepping stone to the next. Bram has a signed scope, so he checks the lead against it before acting on it.
Look up the core banking network in the scope.
tester:~# grep -ni 'core banking' /root/engagement/scope.txt
Run these steps on real machines