Mini Project: A Complete Mock Engagement
This project is the whole course as one engagement. The target is a described lab network: you won't scan anything. You receive the client's request, the network description and the testers' raw notes and transcripts, and you produce what a professional produces: a rules-of-engagement document, recon notes, a test plan, three findings with CVSS scores, the report, and a retest plan. The runnable parts compute and assemble; the judgement is yours. Every address is in the lab range 10.10.0.0/24 or a documentation range, every name is under lab.test, and the organisation is fictional.
The brief
Lab Retail Ltd runs an online shop (
shop.lab.test), a small office network and a VPN for staff and contractors. After a competitor's breach, the CIO wants to know: Could an attacker on the Internet, or a staff member on the VPN, reach customer data? Budget: eight testing days, December 2026, with a retest in January. The security team (two people) will be told about the test; the help desk will not.
The network (from the client's documentation):
| Zone | Hosts |
|---|---|
| Internet-facing (DMZ) | www.lab.test / shop.lab.test 10.10.0.10 (nginx, PHP shop), mail.lab.test 10.10.0.25, vpn.lab.test 10.10.0.5 (VPN appliance) |
| Servers | dc01 10.10.0.11 (domain controller), files01 10.10.0.21 (file server), db01 10.10.0.40 (PostgreSQL, shop database), jenkins 10.10.0.62 (CI/CD), legacy01 10.10.0.20 (old FTP server for a supplier's uploads, "to be retired") |
| Office | workstations 10.10.0.100–10.10.0.150, printers 10.10.0.160–10.10.0.164 |
| Excluded by the client | the router 10.10.0.1, the backup appliances 10.10.0.200/29, the printers |
| Third parties | status.lab.test (status page provider, 203.0.113.80), the card payment provider |
Step 1: rules of engagement
Fill in the RoE template for this brief. Decide and justify: windows and time zone, source addresses, allowed and forbidden techniques, rate limits, how far validation may go, data handling, stop conditions, the blue team arrangement. Then run your scope through the scope checks: expand the target list with the exclusions removed and screen the third parties.
A model answer (abridged)
Window 2026-12-01 to 2026-12-10, 08:00–17:00 UTC (the client is in UTC+7: 15:00–24:00 local, agreed with the security team, who will watch the first evening), retest 2027-01-14. Sources: 10.10.0.99 (internal, a laptop provided by the client) and 198.51.100.20 (external). Allowed: discovery, enumeration, authenticated web testing with accounts lab-a and lab-b, internal testing with domain account lab\pt-user and a VPN account, validation up to rung 3 of the ladder, higher rungs only with per-finding approval. Forbidden: DoS, social engineering, physical access, persistence, credential collection from memory or stores, data copying beyond counts and one masked sample, any traffic to excluded or third-party addresses. Rates: --max-rate 100 per host, 10 web requests/s. Data: stop, record the minimum, notify the CIO within 1 hour by phone. Stop conditions: degradation (shop error rate > 2 % for 2 minutes), out-of-scope access, signs of a real attacker, client request. Blue team: security team announced, help desk not; white-cell contact: the CIO.
Step 2: recon notes
The testers' passive and active recon produced the notes below (lab data). Sort each item into test, observe only or ask the client, using the recon lessons.
CT log search (2026-11-28): lab.test, www, shop, mail, vpn, vpn-old (expired 2024), staging-pay (issued 2026-11-15)
DNS (2026-12-01, window): MX mail.lab.test; SPF "v=spf1 ip4:10.10.0.25 include:_spf.mailprovider.test -all";
AXFR refused; staging-pay.lab.test -> 203.0.113.61; vpn-old.lab.test -> NXDOMAIN
Job advert (public): "experience with Jenkins pipelines and PostgreSQL 14"
Public code search: repository "labretail/shop-deploy" contains ci/Jenkinsfile with db host db01.lab.test (no secrets)Answer
Test: www/shop, mail, vpn (in scope, inside the window). Observe only: mailprovider.test (third-party mail provider in SPF), vpn-old (no longer resolves). Ask the client: staging-pay.lab.test, a payment staging system on 203.0.113.61, outside the scope range (whose system is it?). The job advert and the public repository confirm Jenkins and PostgreSQL and point at the CI-to-database link: a lead for the test plan (and the repository is an observation for the report: internal host names are public).
Step 3: scan transcripts and the test plan
Lab session, internal position 10.10.0.99, window day 2 (abridged; printers and excluded hosts not scanned):
tester@lab:~$ sudo nmap -sS -sV --top-ports 1000 --max-rate 100 -iL targets/servers.txt -oA scans/servers-d2
10.10.0.11 dc01 53/tcp domain, 88/tcp kerberos-sec, 389/tcp ldap, 445/tcp microsoft-ds (signing required)
10.10.0.20 legacy01 21/tcp ftp vsftpd 2.3.4; 22/tcp ssh OpenSSH 4.7p1 Debian 8ubuntu1
10.10.0.21 files01 445/tcp microsoft-ds (signing not required)
10.10.0.40 db01 5432/tcp postgresql PostgreSQL DB 9.6.0 or later
10.10.0.62 jenkins 8080/tcp http Jetty 10.0.18 (Jenkins)
tester@lab:~$ curl -s -o /dev/null -w '%{http_code}\n' http://jenkins.lab.test:8080/script
200From the scan, the recon and the attack-surface model, write a test plan with priorities. Then the three findings the testers confirmed:
- Jenkins at
jenkins.lab.test:8080serves its script console without login to every VPN and office address; a pipeline's configuration stores thedb01credentials. Validated by loading the console page (no script run) and, with the CIO's written approval, one read-only connection todb01with the stored credentials returning the row count of the customer table (48,211). Blue team: no alert. - Shop IDOR:
GET /api/invoices/{id}returns any invoice to any logged-in customer. Validated withlab-areadinglab-b's invoice. Blue team: no alert for 50 sequential ids. - legacy01 runs the backdoored vsftpd 2.3.4 build, confirmed by the administrator's binary check against the distribution package (rung 2, not triggered). The server is reachable from the office and VPN networks.
Step 4: scores, report summary and retest plan
The code below scores the three findings with CVSS v3.1, records the reasoning for each vector, and assembles the findings summary and the retest plan from the same records. Change the vectors if you disagree with them, and say why in your write-up.
import math
W = {"AV": {"N": 0.85, "A": 0.62, "L": 0.55, "P": 0.2}, "AC": {"L": 0.77, "H": 0.44}, "UI": {"N": 0.85, "R": 0.62},
"CIA": {"H": 0.56, "L": 0.22, "N": 0.0}}
PR = {"U": {"N": 0.85, "L": 0.62, "H": 0.27}, "C": {"N": 0.85, "L": 0.68, "H": 0.5}}
def roundup(x):
i = round(x * 100000)
return i / 100000.0 if i % 10000 == 0 else (math.floor(i / 10000) + 1) / 10.0
def cvss31(vector):
m = dict(p.split(":") for p in vector.split("/")[1:])
iss = 1 - (1 - W["CIA"][m["C"]]) * (1 - W["CIA"][m["I"]]) * (1 - W["CIA"][m["A"]])
imp = 7.52 * (iss - 0.029) - 3.25 * (iss - 0.02) ** 15 if m["S"] == "C" else 6.42 * iss
exp = 8.22 * W["AV"][m["AV"]] * W["AC"][m["AC"]] * PR[m["S"]][m["PR"]] * W["UI"][m["UI"]]
if imp <= 0:
return 0.0
return roundup(min((1.08 if m["S"] == "C" else 1) * (imp + exp), 10))
def rating(s):
return "Low" if s < 4 else "Medium" if s < 7 else "High" if s < 9 else "Critical"
findings = [
{"id": "F-01", "title": "Jenkins script console without authentication, stored database credentials",
"vector": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H",
"why": "no Jenkins account needed (PR:N; the network position is AV:N); db01 via the stored credentials is the next step of the chain, not a scope change",
"verify": "anonymous GET /script returns 403 + login; no credentials in job configs; admins can log in"},
{"id": "F-02", "title": "Shop API returns other customers' invoices (IDOR)",
"vector": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N",
"why": "any registered customer (PR:L), reads all invoices (C:H), no change possible",
"verify": "lab-a GET /api/invoices/<lab-b id> -> 404; own invoice -> 200; same on /api/v1/"},
{"id": "F-03", "title": "Backdoored vsftpd 2.3.4 build on legacy01",
"vector": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H",
"why": "the backdoor needs no account; full control of the host",
"verify": "host rebuilt or retired; port 21 closed or a trusted FTP build; incident review documented"},
]
for f in findings:
f["score"] = cvss31(f["vector"])
f["rating"] = rating(f["score"])
print("4. FINDINGS SUMMARY")
for f in sorted(findings, key=lambda f: -f["score"]):
print(f"{f['id']} {f['rating']:<8} {f['score']:>4} {f['title']}")
print(f" {f['vector']} ({f['why']})")
print("\nRETEST PLAN (2027-01-14)")
for f in findings:
print(f"{f['id']}: {f['verify']}")
print(f"\nseverity overview: " + ", ".join(f"{r} {sum(f['rating'] == r for f in findings)}" for r in ["Critical", "High", "Medium", "Low"]))4. FINDINGS SUMMARY
F-01 Critical 9.8 Jenkins script console without authentication, stored database credentials
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H (no Jenkins account needed (PR:N; the network position is AV:N); db01 via the stored credentials is the next step of the chain, not a scope change)
F-03 Critical 9.8 Backdoored vsftpd 2.3.4 build on legacy01
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H (the backdoor needs no account; full control of the host)
F-02 Medium 6.5 Shop API returns other customers' invoices (IDOR)
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N (any registered customer (PR:L), reads all invoices (C:H), no change possible)
RETEST PLAN (2027-01-14)
F-01: anonymous GET /script returns 403 + login; no credentials in job configs; admins can log in
F-02: lab-a GET /api/invoices/<lab-b id> -> 404; own invoice -> 200; same on /api/v1/
F-03: host rebuilt or retired; port 21 closed or a trusted FTP build; incident review documented
severity overview: Critical 2, High 0, Medium 1, Low 0
Two of the three are Critical by CVSS, and the IDOR is a Medium by the number. Your report should explain why the IDOR still belongs in the 30-day bucket (risk prioritisation: Internet-facing, all customers' personal data). It should also explain why F-03 is handled as a possible incident rather than a patch (a backdoor that may have been present for years on a host reachable from the office): isolate, investigate, rebuild.
Step 5: the report
Write the report with the template. Required content:
- an executive summary of at most one page that answers the CIO's question in its first two sentences;
- scope and limitations: the excluded hosts,
staging-pay.lab.test(asked, answer pending), the third parties observed, the validation limits; - methodology: the ten steps, the standards, the RoE highlights;
- the three findings in full (evidence and reproduction appropriate to the audience, remediation with fix, stop-gap, defence in depth, detection and verification);
- an attack path: VPN user → Jenkins → stored credentials →
db01; - positive observations: AXFR refused, SMB signing required on
dc01, the perimeter otherwise clean; - the detection results: none of the three findings triggered an alert;
- appendices: triage list, cleanup status (test accounts
lab-a,lab-b,lab\pt-user, the VPN account: to be disabled by the client).
Write-up template
MOCK ENGAGEMENT: Lab Retail Ltd author: .......... date: ..........
1. Rules of engagement (one page) decisions + one-line reason each
2. Scope check target list, exclusions, third parties, open questions
3. Recon notes item | source | date | test / observe / ask
4. Test plan service | checks | priority | reason
5. Findings (3) full findings, CVSS vector + reasoning, evidence refs
6. Prioritisation order, buckets, overrides with reasons (incident handling for F-03)
7. Report executive summary, scope & limitations, methodology,
findings, attack path, positive observations, appendices
8. Retest plan per finding: verification, variants to check, date
9. Reflection what you would ask the client next time; what the
blue team should add; what you would test with two more daysSelf-check
- Does every claim in the executive summary point to a finding, and every finding's impact to evidence?
- Could an engineer reproduce F-02 and verify the fix from your steps alone, using only the test accounts?
- Is every address you wrote down in scope, or explicitly labelled as observed, excluded or third-party?
- Did your RoE say what happens at 02:00 UTC+7 if the shop slows down?
- Does the retest plan check the variants (the
v1API, other pipelines with stored credentials)?
Test yourself
Recon finds staging-pay.lab.test resolving to 203.0.113.61, outside the scope range. What goes in the report?
- Test results for it
- It is listed as observed, with the open question to the client; not tested
- Nothing
- A critical finding
Why does the model RoE require per-finding approval for the database connection in F-01?
- Databases are slow
- Using stored credentials to reach db01 goes beyond rung 3 of the validation ladder and touches customer data
- It is always forbidden
- CVSS requires it
Why is F-03 (backdoored vsftpd) handled as a possible incident?
- Its CVSS is 10
- A backdoor may have been used for years on a host reachable from internal networks; investigation is needed, not only a patch
- FTP is old
- The client asked
Which part of the engagement gives the IDOR (CVSS 6.5) a 30-day priority?
- The CVSS score alone
- Risk prioritisation: Internet exposure and all customers' personal data
- The scanner
- The executive summary