TExcelTAD
Home › Security Foundations: Concepts, Law, Ethics & Your Lab › Mini Project: Design Your Lab and Its Risk Register

Mini Project: Design Your Lab and Its Risk Register

Every later course of this track assumes you have a place to practise: a web app to attack in Web Application Security, a Windows domain for Windows & Active Directory, a SIEM to feed in the blue-team course. In this project you design that place on paper first, and you treat it the way a professional treats any system: you write down what it contains, how it is isolated, what could go wrong and what you do about it.

The deliverable is a short lab design document plus a risk register for the lab itself, checked by a small program. Nothing in it needs a purchase: the design must fit the computer you have.

The brief

Design an isolated home lab that can host, at minimum:

  • one attacker / analyst machine (Kali Linux or an Ubuntu desktop with the tools you need),
  • one Linux target (Ubuntu Server) running at least one deliberately vulnerable web app in Docker (OWASP Juice Shop or DVWA),
  • optionally a Windows Server VM for the Windows and Active Directory courses,
  • optionally a monitoring VM (a SIEM or simply a log collector) for the defensive courses.

and that satisfies the lab safety rules: vulnerable machines never reachable from your home network or the Internet, snapshots before experiments, test accounts and synthetic data only.

Step 1: the design document

Copy the template into your learning journal and fill it in. Keep it to two pages.

text
# Lab design: <your lab name>                 version 1, <date>

## 1. Purpose and scope
What I will practise:        <courses / skills>
In scope (mine to attack):   the VMs and containers listed in section 3, network <10.10.0.0/24>
Out of scope:                my home LAN <192.168.x.0/24>, my ISP router, every Internet host,
                             the host operating system itself

## 2. Host
Hardware:     <CPU, cores, RAM, free disk>
Hypervisor:   <VirtualBox / KVM + virt-manager / VMware / Hyper-V>, version <...>
Host updates: <how and how often the host and hypervisor are patched>

## 3. Machines
| name          | role             | OS / image        | vCPU | RAM  | network          | address     | snapshot     |
|---------------|------------------|-------------------|------|------|------------------|-------------|--------------|
| kali          | attacker/analyst | Kali Linux        | 2    | 4 GB | lab (internal)   | 10.10.0.5   | clean-base   |
| target-linux  | Linux target     | Ubuntu Server LTS | 2    | 2 GB | lab (internal)   | 10.10.0.10  | clean-base   |
| ...           |                  |                   |      |      |                  |             |              |

## 4. Networks (diagram + one line per network)
lab:      internal / host-only, no DHCP from the home router, no gateway to the Internet
updates:  NAT, attached ONLY to non-vulnerable machines, ONLY while updating, then detached

## 5. Safety rules I follow
<the rules from the lab-safety lesson, in your own words, plus anything specific to your setup>

## 6. Accounts and data
Test accounts:   <naming scheme, e.g. alice.lab / bob.lab, passwords used nowhere else>
Data:            synthetic only, generated by <script>; no real personal data, no real credentials

## 7. Snapshots and recovery
Before each experiment: <snapshot name scheme>; after: revert or delete; keep at most <n> per VM

## 8. Risk register (see step 2)

Draw the network diagram by hand or as ASCII art; it must show every machine, every network, and where (if anywhere) a path to the Internet exists.

Step 2: the lab's risk register

A lab is a system with its own risks: a vulnerable VM accidentally bridged onto your home Wi-Fi is exposed to every device in the house; a malware sample opened on a VM with a shared folder can reach your real files. Use the register of Risk Assessment: the same columns, likelihood and impact from 1 to 5, score =likelihood×impact= \text{likelihood} \times \text{impact}, and the bands low 1 to 4, medium 5 to 9, high 10 to 19, critical 20 to 25. Every row needs a treatment (reduce, avoid, transfer, accept) and an owner (that's you), and every accepted risk a review date.

Write at least eight risks. Starting points:

Asset Threat Vulnerability
home LAN a vulnerable VM attacked by anything on the LAN VM attached in bridged mode
host files a test sample or a compromised VM shared folders, shared clipboard, drag and drop
your real accounts credential theft in the lab real password typed into a lab app
third parties your own scan or tool run wrong target address, no scope check
the host hypervisor escape (rare, high impact) unpatched hypervisor
your time / the lab a broken experiment no snapshot before the change
the journal a leak when you share it secrets copied into notes
the host hardware heavy builds and VMs overheating, full disk

Step 3: check the design with a program

The program below holds a sample lab (your own goes in the two lists) and checks the rules a reviewer would check: every vulnerable machine is on an isolated network, nothing vulnerable has a shared folder or a NAT adapter, every machine has a snapshot, every risk has a valid score, band, treatment and owner, and accepted risks have a review date. Then it prints the register sorted by score.

python · try it yourself
ISOLATED = {"internal", "host-only"}
machines = [
    # name,          role,        vulnerable, networks,                 shared_folder, snapshot
    ("kali",         "attacker",  False,      ["internal"],             False,         "clean-base"),
    ("target-linux", "target",    True,       ["internal"],             False,         "clean-base"),
    ("win-dc",       "target",    True,       ["internal", "nat"],      False,         ""),
    ("siem",         "monitor",   False,      ["internal"],             True,          "clean-base"),
    ("juice-shop",   "container", True,       ["bridged"],              False,         "n/a"),
]

def band(score):
    return "critical" if score >= 20 else "high" if score >= 10 else "medium" if score >= 5 else "low"

risks = [
    # id,  asset,           vulnerability,                         L, I, treatment, owner,  review
    ("L1", "home LAN",       "vulnerable VM in bridged mode",       3, 5, "reduce",  "me",   ""),
    ("L2", "host files",     "shared folder on a lab VM",           3, 4, "reduce",  "me",   ""),
    ("L3", "real accounts",  "real password typed into a lab app",  2, 5, "avoid",   "me",   ""),
    ("L4", "third parties",  "tool run against a wrong address",    2, 5, "reduce",  "me",   ""),
    ("L5", "host",           "hypervisor escape, unpatched host",   1, 5, "reduce",  "me",   ""),
    ("L6", "lab time",       "experiment without a snapshot",       4, 2, "reduce",  "me",   ""),
    ("L7", "journal",        "secrets copied into notes",           2, 3, "reduce",  "",     ""),
    ("L8", "host hardware",  "overheating during long builds",      2, 3, "accept",  "me",   ""),
]

problems = []
for name, role, vulnerable, nets, shared, snap in machines:
    if vulnerable and not set(nets) <= ISOLATED:
        problems.append(f"{name}: vulnerable but attached to {sorted(set(nets) - ISOLATED)}")
    if shared:
        problems.append(f"{name}: shared folder enabled")
    if not snap:
        problems.append(f"{name}: no snapshot")
for rid, asset, vuln, l, i, treatment, owner, review in risks:
    if not (1 <= l <= 5 and 1 <= i <= 5):
        problems.append(f"{rid}: likelihood/impact out of range")
    if treatment not in {"reduce", "avoid", "transfer", "accept"}:
        problems.append(f"{rid}: unknown treatment {treatment!r}")
    if not owner:
        problems.append(f"{rid}: no owner")
    if treatment == "accept" and not review:
        problems.append(f"{rid}: accepted without a review date")

print(f"{len(problems)} problem(s):")
for p in problems:
    print("  -", p)
print()
print(f"{'id':<4}{'asset':<15}{'score':>5}  {'band':<9}{'treatment'}")
for rid, asset, vuln, l, i, treatment, owner, review in sorted(risks, key=lambda r: (r[3] * r[4], r[4]), reverse=True):
    print(f"{rid:<4}{asset:<15}{l * i:>5}  {band(l * i):<9}{treatment}")
6 problem(s):
  - win-dc: vulnerable but attached to ['nat']
  - win-dc: no snapshot
  - siem: shared folder enabled
  - juice-shop: vulnerable but attached to ['bridged']
  - L7: no owner
  - L8: accepted without a review date

id  asset          score  band     treatment
L1  home LAN          15  high     reduce
L2  host files        12  high     reduce
L3  real accounts     10  high     avoid
L4  third parties     10  high     reduce
L6  lab time           8  medium   reduce
L7  journal            6  medium   reduce
L8  host hardware      6  medium   accept
L5  host               5  medium   reduce

The sample lab fails review on purpose: the Windows VM has a NAT adapter (so a vulnerable machine can reach the Internet, and anything that compromises it can too), and no snapshot; the SIEM has a shared folder; the Juice Shop container is on a bridged network, that is, on your home LAN; one risk has no owner and the accepted one has no review date. Fix the lists until the program reports 0 problem(s), then replace the sample with your own lab.

Step 4: treat the top risks

For each high or critical risk, write the control and the residual score. For example, L1 (bridged vulnerable VM, 3×5=153 \times 5 = 15, high): reduce by attaching every vulnerable VM only to the internal network, checking the adapter settings before every boot, and binding containers to 127.0.0.1 or an internal: true Docker network; likelihood falls to 1, residual 1×5=51 \times 5 = 5, medium. The impact stays 5: if it happens anyway, the harm is the same.

Step 5: the write-up

Finish with half a page in your journal:

text
## Lab review, <date>
Checker result:      0 problems (after fixing: <list what you changed>)
Top three risks:     <id, score before, control, score after>
Accepted risks:      <id, why acceptable, review date>
What I can practise: <courses of the track this lab supports now>
What is missing:     <e.g. Windows Server needs 4 GB more RAM; plan: ...>
Next review:         <date, or "when I add a machine">

Assessment checklist

Criterion Done when
Scope in-scope and out-of-scope written down, with your home network explicitly out
Isolation every vulnerable machine on an internal or host-only network; any Internet access only for non-vulnerable machines, only while updating
Inventory every machine with role, OS, resources, network, address and snapshot
Safety the lab safety rules adopted, test accounts and synthetic data described
Register at least eight risks, scored with the track's bands, each with treatment and owner; accepted risks with review dates
Treatment residual scores for every high or critical risk
Check the program reports 0 problems on your own lab
Law your scope matches Authorization, Scope and Rules of Engagement: even in your own lab, you only test what you listed

Extensions

  • Add a column cia to the register (which property the risk hits) and print how many risks threaten each, as in CIA, AAA and Access Control.
  • Add an annual_cost estimate to the hardware risk and compute its ALE, as in Risk Assessment.
  • Extend the checker: a container that publishes a port on 0.0.0.0 counts as exposed, like a bridged VM.

Test yourself

In the sample, why is win-dc with networks ["internal", "nat"] a problem?

  1. NAT is slower
  2. A vulnerable machine with a NAT adapter can reach the Internet, and so can anyone who compromises it
  3. Windows cannot use internal networks
  4. Two adapters use too much RAM

Risk L1 has likelihood 3 and impact 5. After moving every vulnerable VM to the internal network, likelihood is 1. What are the residual score and band?

  1. 5, medium
  2. 3, low
  3. 15, high
  4. 1, low

What must an accepted risk have in the register, according to the checker?

  1. A score of zero
  2. A review date (and an owner)
  3. A transfer to an insurer
  4. Nothing

Which address range belongs in the lab design's 'out of scope' line?

  1. 10.10.0.0/24, the lab network
  2. Your home LAN, e.g. 192.168.1.0/24, and every Internet host
  3. 127.0.0.1
  4. The addresses of your vulnerable VMs