Skip to content

Beginner · Your legal practice lab · topic 5 of 35 · 16 min

Why you need an isolated lab

Explanation

A lab is a set of computers that exist only to be practised on, kept separate from the real internet and from your home network. You attack machines you own, on a private network, so nothing can leak out. This is how you learn attacks legally and safely.

You cannot learn attacks by pointing tools at real websites — that is illegal, as the last module explained. The answer is a lab: machines that belong to you, running on your own computer, that you are allowed to attack as much as you like. Because they are yours and isolated, nothing you do can harm anyone else.

What a virtual machine is

A virtual machine (VM) is a whole computer running as a program inside your real computer. The software that runs VMs is a hypervisor; VirtualBox is a free one. You can run several VMs at once: one as the attacker (Kali Linux) and one or more as targets (deliberately weak machines). They talk to each other but, if you set it up right, not to the outside world.

Think of it like this: Think of a flight simulator. A trainee pilot crashes the simulator a hundred times and no one is hurt, because it is not a real plane. A lab is a flight simulator for hacking: you break things safely and learn from every crash.

Isolation: the most important setting

The key idea is isolation: your targets must not be reachable from the real internet, and your attacks must not escape your lab. In VirtualBox you do this with a host-only or internal network, which connects the VMs to each other (and optionally your host) but not to the internet. Deliberately vulnerable machines are full of holes; if one were exposed online, a real attacker could take it over and use it against others.

Careful: Never put a deliberately vulnerable VM (Metasploitable, DVWA, Juice Shop) on a network that can reach the internet, and never expose it with port forwarding. It would be a gift to real attackers. Use host-only or internal networking for targets.

A typical beginner lab

VMRoleNotes
Kali LinuxAttackerShips with nmap, Burp, Metasploit and more
Metasploitable 2/3TargetA Linux box full of old, weak services
DVWATarget (web)Damn Vulnerable Web Application
OWASP Juice ShopTarget (modern web)A modern, deliberately broken shop app
Tip: Take a snapshot of each VM when it is freshly set up. If you break a machine beyond repair (easy to do), you can roll back to the snapshot in seconds instead of reinstalling.

Need help?

Stuck on a word or an idea? Search this course, or every course, and jump straight to the explanation or a worked question.

Try:

Watch the lesson

Why you need an isolated lab · 1/7

Lab = machines you own, made to attack

You cannot practise on real websites. You build a lab instead.

Prefer a video by a teacher? Find free videos on “virtualbox kali linux hacking lab setup host only network beginners” on YouTube ↗

In real life: A student's laptop lab

A final-year student in Pune with an 8 GB laptop installs VirtualBox, a Kali VM and a DVWA VM, both on a host-only network. She practises SQL injection on DVWA every evening. Nothing she does can reach the real internet, so she can try anything without fear. When she corrupts the DVWA database, she restores a snapshot and carries on. Her whole "hacking lab" cost nothing but disk space.

Practice (0/3 done)

Task 1 · Question

What is a virtual machine?

Task 2 · Question

Why must a deliberately vulnerable VM stay off the internet?

Task 3 · Practice

Plan a beginner lab on paper: list the VMs you would create and the network setting that keeps them isolated.

Quick quiz

Question 1

1.The software that runs virtual machines is called a…

Question 2

2.Which VirtualBox network keeps targets off the internet?

Question 3

3.A snapshot lets you…

Question 4

4.The most important property of a practice lab is…

Read more (free)

Open a question to see the answer and why. The first ones are this topic's own quiz, so try the quiz above before you peek.

The software that runs virtual machines is called a…

Answer: Hypervisor

A hypervisor (like VirtualBox) runs VMs.

Which VirtualBox network keeps targets off the internet?

Answer: Host-only or internal

Host-only/internal networks connect the VMs privately without internet access.

A snapshot lets you…

Answer: Roll a VM back to an earlier state

Snapshots save a VM's state so you can restore it after breaking things.

The most important property of a practice lab is…

Answer: Isolation from real systems and the internet

Isolation keeps your attacks safe and legal.

Where should you get a Windows VM for your lab legally?Related

Answer: Microsoft's Evaluation Center (time-limited evaluation)

Microsoft offers free, time-limited evaluation editions for testing.

From Building a home lab and a portfolio

On a practice platform, which target may you attack?Related

Answer: Only the practice targets the platform assigns you

Permission covers only the assigned practice targets.

From Legal online platforms: TryHackMe, Hack The Box and more

Metasploitable is most useful for practising…Related

Answer: Scanning, enumeration and service exploits

It is a Linux VM full of weak network services to scan and exploit in your lab.

From Vulnerable targets: Metasploitable, DVWA and Juice Shop

Which port range does your computer usually pick its source port from?Related

Answer: 49152–65535

Clients use dynamic (ephemeral) ports, 49152–65535 in the IANA range.

From Ports and protocols

Pass the quiz (60% or more) or mark this topic as done when you are ready.

Your progress is saved on this device only.

Next steps

  1. 3 more topics in “Your legal practice lab” before its exam: Kali Linux: the attacker machine, Vulnerable targets: Metasploitable, DVWA and Juice Shop, Legal online platforms: TryHackMe, Hack The Box and more.
  2. Module 2 exam: the practice lab · 12 questions · 20 min, without help. 4 topics of this module still to finish first.
  3. Then the next module, Methodology and reconnaissance. 35 topics left in the course before the final exam.

← Previous: The CIA triad and the tester's mindset