A Network Assessment from Scope to Retest
The previous sections taught the pieces: inventory, scanning, configuration review, the common weaknesses, segmentation, firewalls, VPNs, IDS, vulnerability scanning and prioritisation. This lesson puts them in order as one assessment of the lab network 10.10.0.0/24 (the flat network of the introduction), the way a small internal security team or a consultant would run it. Formal methodologies (NIST SP 800-115, Technical Guide to Information Security Testing and Assessment; PTES; OSSTMM) differ in names, but share the same arc:
scope → inventory → review → validate safely → impact → remediation → retest
1. Scope
Signed by the IT manager, as in Scope and Authorization: 10.10.0.0/24 minus the leased printer 10.10.0.40, the public address 203.0.113.10, 2–6 February 2026 18:00–22:00 UTC, sources 10.10.0.99 and 198.51.100.20, at most 100 probes per second, no password guessing, no exploitation, firewall configuration export provided, read-only SSH accounts on the Linux servers for authenticated checks.
2. Inventory
Passive data first (Asset Inventory): DHCP leases, the firewall's ARP table and the DNS zone, merged and compared with the official list. Result: 9 official assets, plus an unknown Raspberry Pi (10.10.0.77), a phone on the staff network and a stale DNS record. Then an internal top-1000 TCP scan and an external scan (Nmap Inventories), saved as XML.
3. Review
Each open service is reviewed for the seven weaknesses, and the configurations are read: the firewall export (Misconfigured Firewalls, Rule Shadowing), TLS and SSH (Service Configuration Review), the VPN (OpenVPN and VPN Hardening), authenticated package data (Outdated Software) and the vulnerability scan (Vulnerability Scanners).
4. Validate safely
Every candidate finding needs evidence that it is real, gathered without causing harm and within the rules of engagement:
| Candidate | Safe validation | Not allowed here |
|---|---|---|
| Telnet on the printer | out of scope (leased): only the host's presence is known (ARP, DNS); report the suspected Telnet service to the client and ask the leasing company to check it | connecting to it |
| FTP on the file server | connect, read the banner, check whether AUTH TLS is offered; log in only with a test account the owner created |
trying users' passwords |
| PostgreSQL reachable from staff | a TCP connection from 10.10.0.99 and the server's pg_hba.conf (read-only account) |
logging in as an application user |
| Old OpenSSH / PostgreSQL 12 | package versions from the authenticated check | running an exploit to "prove it" |
| Cleartext HTTP login | a capture of the test login made by the assessor, value redacted (Unencrypted Protocols) | capturing real users |
| Firewall default accept | the exported ruleset and a scan of an unlisted port from outside | changing rules |
A finding that can't be validated within the rules is reported as "observed, not validated" with a recommendation, never silently dropped and never "proven" by breaking the rules.
5. Impact
Each validated finding gets a risk rating from likelihood (exposure, ease, known exploitation) and impact (what an attacker gains, given the asset and the network), the method of Risk Assessment. The register below is the core of the report.
import pandas as pd
L = {"low": 1, "medium": 2, "high": 3}
reg = pd.DataFrame([
("F1", "Firewall default policy accept; vendor SSH rule expired but active", "fw.lab.test", "high", "high",
"rules export, external scan", "policy drop; remove rule 2; review all rules with owners"),
("F2", "Flat network: every host reaches every service", "10.10.0.0/24", "high", "high",
"internal scan from 10.10.0.99", "zones (DMZ, servers, staff, management, devices) with a policy matrix"),
("F3", "PostgreSQL 12 (end of life) on Ubuntu 20.04, reachable from staff", "db.lab.test", "medium", "high",
"package versions, TCP connect", "upgrade; restrict 5432 to the web server; require TLS"),
("F4", "FTP cleartext logins on the file server", "files.lab.test", "medium", "medium",
"banner, no AUTH TLS offered", "replace with SFTP or SMB 3 with encryption; disable FTP"),
("F5", "Unknown device with SSH and web interface", "10.10.0.77", "medium", "medium",
"DHCP, ARP, scan", "identify owner; remove or move to a device zone; NAC"),
("F6", "VPN: shared certificate, no MFA, weak ciphers", "vpn.lab.test", "high", "high",
"config review", "per-user certificates + MFA; modern data-ciphers; tls-crypt; CRL"),
("F7", "Weak TLS on legacy service (static RSA, CBC-SHA1, expired certificate)", "www.lab.test:9443", "low", "medium",
"openssl s_client, ssl-enum-ciphers", "TLS 1.2/1.3 with ECDHE+AEAD; renew certificate via ACME"),
("F8", "No egress filtering on servers; beacon-like attempts seen", "www.lab.test", "medium", "high",
"firewall logs", "egress allow list per server; investigate 203.0.113.66:4444 as a possible incident"),
], columns=["id", "finding", "asset", "likelihood", "impact", "evidence", "recommendation"])
reg["score"] = reg.likelihood.map(L) * reg.impact.map(L)
reg["rating"] = pd.cut(reg.score, bins=[0, 2, 4, 6, 9], labels=["Low", "Medium", "High", "Critical"])
reg = reg.sort_values(["score", "id"], ascending=[False, True])
print(reg[["id", "rating", "score", "asset", "finding"]].to_string(index=False))
print()
print(reg.rating.value_counts().reindex(["Critical", "High", "Medium", "Low"]).to_string())id rating score asset finding
F1 Critical 9 fw.lab.test Firewall default policy accept; vendor SSH rule expired but active
F2 Critical 9 10.10.0.0/24 Flat network: every host reaches every service
F6 Critical 9 vpn.lab.test VPN: shared certificate, no MFA, weak ciphers
F3 High 6 db.lab.test PostgreSQL 12 (end of life) on Ubuntu 20.04, reachable from staff
F8 High 6 www.lab.test No egress filtering on servers; beacon-like attempts seen
F4 Medium 4 files.lab.test FTP cleartext logins on the file server
F5 Medium 4 10.10.0.77 Unknown device with SSH and web interface
F7 Low 2 www.lab.test:9443 Weak TLS on legacy service (static RSA, CBC-SHA1, expired certificate)
rating
Critical 3
High 2
Medium 2
Low 1
F8 is special: beacon-like traffic is a sign of a possible existing compromise, which the rules of engagement treat as a stop condition. In the lab story the assessor reported it to the on-call contact on the day it was seen, and incident response took over that part; the report records it, with the time it was handed over.
6. Remediation
The report gives each finding an owner, a recommended fix, a deadline matched to its rating, and quick wins separately from projects:
- Quick wins (days): F1 (policy drop, remove the expired rule), F4 (disable FTP), F7 (certificate and TLS settings), F5 (identify the Pi).
- Short projects (weeks): F6 (VPN rebuild with MFA), F8 (egress allow lists), F3 (restrict 5432 now, upgrade the database on a planned date).
- Programme (months): F2 (segmentation, Zones, DMZs and Trust Boundaries), with an IDS sensor at the new boundaries (IDS and IPS).
7. Retest
After the owners report fixes, the assessor repeats the same checks with the same options and compares. The session plays the retest of two findings in miniature on loopback: before the fix, an "FTP" listener exists and a "database" listens on all interfaces; after the fix, FTP is gone and the database is bound to loopback only.
start() { ncat -lk "$@" >/dev/null 2>&1 & }
wait_ports() { for i in $(seq 50); do [ "$(ss -Htln | wc -l)" -ge "$1" ] && break; sleep 0.1; done; }
echo "== before the fix"
start 0.0.0.0 2121; start 0.0.0.0 5433; wait_ports 2
nmap -sT -p 2121,5433 -oX before.xml 127.0.0.1 >/dev/null
ss -Htln | awk '{print "listening on", $4}' | sort
kill $(jobs -p); wait 2>/dev/null
echo "== after the fix"
start 127.0.0.1 5433; wait_ports 1
nmap -sT -p 2121,5433 -oX after.xml 127.0.0.1 >/dev/null
ss -Htln | awk '{print "listening on", $4}' | sort
kill $(jobs -p); wait 2>/dev/null
python3 - <<'PY'
import xml.etree.ElementTree as ET
def states(f):
return {p.get("portid"): p.find("state").get("state") for p in ET.parse(f).getroot().iter("port")}
b, a = states("before.xml"), states("after.xml")
for port in sorted(b):
print(f"port {port}: {b[port]} -> {a[port]}")
PY== before the fix
listening on 0.0.0.0:2121
listening on 0.0.0.0:5433
== after the fix
listening on 127.0.0.1:5433
port 2121: open -> closed
port 5433: open -> open
FTP (2121) is now closed: F4 fixed. The database port still answers on loopback, as it should, but ss shows it bound to 127.0.0.1 instead of 0.0.0.0: from another host it would no longer be reachable, which the retest from 10.10.0.99 confirms on the real network. A scan from the same host alone would have shown "open → open" and missed the fix; choosing the right vantage point is part of the retest.
The retest report lists every finding as fixed, partly fixed (with what remains) or open, and is dated: the security state it describes starts ageing on the day it is written.
Pitfalls
- Skipping validation and reporting scanner output.
- Validating by exploitation when the rules don't allow it.
- A report without owners and deadlines: nobody acts on it.
- Retesting with different options or vantage points and calling the difference "fixed".
- Forgetting the possible-incident finding: report it immediately, not in the final PDF two weeks later.
Practice
1. Which steps of the workflow could the lab company run itself every month, and which need an outside assessor?
Inventory merging, nightly scan diffs, configuration checks with scripts and authenticated vulnerability scans can run monthly in-house. An outside assessor adds independence, a fresh view (things the team is used to), and skills such as design review; many organisations combine continuous internal checks with a yearly external assessment.
2. Change F7's likelihood to "medium". What rating does it get, and does the order change?
Score 2 × 2 = 4, rating Medium; it moves up from the bottom, level with F4 and F5.
3. In the retest session, why is ss needed next to Nmap?
Both scans ran on the same host, so the database answered on 127.0.0.1 before and after. Only the listening address (0.0.0.0 → 127.0.0.1) shows that the exposure to other hosts is gone. On the real network a scan from another host shows it directly.
Test yourself
What is the correct order of the assessment workflow?
- Scan → exploit → report
- Scope → inventory → review → validate safely → impact → remediation → retest
- Inventory → scope → retest
- Report → scope → scan
A finding can't be validated within the rules of engagement. What do you do?
- Drop it
- Exploit it anyway
- Report it as observed but not validated, with a recommendation
- Mark it fixed
Why was finding F8 reported immediately rather than in the final report?
- It was the easiest
- Beacon-like traffic suggests an existing compromise, a stop-and-report condition
- The client asked for daily reports
- It had the highest CVSS
What makes a retest comparable to the original test?
- A different tool
- The same checks, options and vantage points
- A faster scan
- Only reading the owner's ticket