Building a legal home lab: VMs, DVWA and safe practice on TryHackMe or Hack The Box

TL;DR. A home lab is a place you fully control, isolated from the rest of your network, where deliberately weak applications can be studied without putting anyone else at risk. Start with a hypervisor, a host-only or internal virtual network, a Linux guest, and one official vulnerable app such as DVWA or OWASP Juice Shop. Use TryHackMe or Hack The Box for structured, invited practice. Do not expose lab ports to the internet, do not scan past your lab, and treat snapshots as your undo button. This is a setup and hygiene guide, not a catalogue of attacks.

Why isolation is the first design decision

The point of a lab is to make mistakes in a box that cannot wander. A virtual machine that shares your home Wi-Fi, has a bridged adapter, and publishes a weak web app on all interfaces is not a lab. It is an unpatched server on a network that also holds phones, laptops and, sometimes, a neighbour’s traffic.

Write the design down before you click “install”:

  1. The lab network is not the family or office network.
  2. Vulnerable applications listen only on that lab network.
  3. The hypervisor host is kept updated and is not itself the vulnerable target.
  4. Snapshots exist before you install anything messy.
  5. When you are done for the day, the guests are shut down, not left accepting connections.

If you cannot satisfy those five points, delay the weak applications and fix the network first.

Definitions you will actually use

  • Hypervisor. Software that runs virtual machines. Type-2 tools such as VirtualBox or a desktop hypervisor run on top of your everyday operating system and are enough for a first lab.
  • Host-only / internal network. A virtual switch that reaches the host and the guests, or only the guests, and does not route to the internet or to other physical LAN hosts unless you deliberately add that path.
  • NAT adapter. Useful when a guest needs to fetch packages. It should not be the only adapter on a machine that also runs DVWA, and it should not forward lab ports inward from the internet.
  • Snapshot. A restore point. Take one after a clean OS install, and again after the vulnerable app is installed and confirmed to be reachable only on the lab network.
  • Intentionally vulnerable application. A project designed for learning, such as DVWA or OWASP Juice Shop, installed from its official documentation, with default credentials changed on any interface that might be reachable outside the lab (in a well-built lab, that should be none).

A practical build order

1. Prepare the host

Update the computer that will run the hypervisor. Create a dedicated folder for virtual disks, not on a nearly full system drive. Disable any habit of “just forwarding a port so I can reach the lab from work.” Remote access to a weak app is how labs become incidents.

2. Create the virtual network first

In the hypervisor, define a host-only or internal network with a small private range you will remember (for example a 192.168.56.0/24 style network that does not collide with your real LAN). Write the range in the lab journal. Then create the first guest attached to that network. Add a second NAT adapter only if the guest must install packages, and remove or disable it later if you want a fully offline target.

3. Install a boring, updated Linux guest

Debian or Ubuntu Server is a good default. Use a non-root daily user, SSH keys that work only from the host or from another lab guest, and a unique password stored in a password manager. This guest can later hold DVWA or Juice Shop in Docker or as a package, following the project’s current docs. Do not hunt for old “one-click hack lab” images of unknown origin.

4. Install one official practice application

Pick one:

  • DVWA (Damn Vulnerable Web Application) if you want a PHP and MySQL style teaching app with documented difficulty levels, installed from the project’s own repository and documentation.
  • OWASP Juice Shop if you prefer a modern JavaScript application with a clear official getting-started path.

Complete the official install, then prove reachability from the host browser via the lab address only. If the app answers on a physical LAN address, you have a misconfiguration: fix the bind address or the adapter before you do anything else.

5. Add a second guest only when the first is stable

A separate “analyst” Linux guest on the same lab network is useful so you are not scanning from the same machine that serves the app. Keep both on the isolated network. This is also the right moment to practice authorized network inventory against addresses you allocated — and only those addresses.

6. Optional: invited online platforms

TryHackMe and Hack The Box provide legal targets under their terms. Use a normal account, stay inside their environments, and do not copy those targets onto a public server. They complement a home lab; they do not replace isolation at home. Official starting paths are enough for the first month.

A comparison you can decide from

Approach What you control Best first use Main risk if sloppy
Local VMs + DVWA or Juice Shop Almost everything: network, snapshots, uptime Learning HTTP, accounts, and defensive fixes on an app you installed Bridged networking or port forwards that publish the weak app
TryHackMe browser / VPN lab The platform’s ranges and rules Guided beginner paths and a clock you will actually follow Treating platform permission as permission to scan unrelated internet hosts
Hack The Box starting content Official machines in their lab Slightly more open-ended practice after the first guided rooms Spoilers, credential reuse, or tunneling lab access in unsafe ways
A spare physical PC on a dedicated switch Hardware and a very clear “this cable is the lab” story Later, when VMs feel limiting Plugging the weak box into the house switch “just for a minute”

Start with the first row. Add a platform account in week two or three, not on day one.

Daily hygiene that keeps the lab legal and dull (in a good way)

  1. Confirm the guest IP is in your written lab range before you open a browser.
  2. After each session, shut the guests down. A weak app that runs all night is a gift to whatever else is on a mis-attached network.
  3. Keep a changelog: packages installed, default passwords replaced, ports observed with ss on the guest itself.
  4. Never point a scanner at your default gateway, your ISP’s address, or a cloud VM you opened “to be reachable.”
  5. If you take screenshots for notes, blur tokens and home network details. A lab journal can still leak a Wi-Fi name or an API key.
  6. When a platform or a vendor publishes a revised install guide, prefer that over a year-old blog post.

What this lab is not for

It is not a place to build malware, to store other people’s data, or to replay techniques against a production site “because it worked in DVWA.” It is also not a substitute for written authorization at work. A successful local exercise should end with a defensive note: which control would have made the issue boring on a real system.

If you keep study notes or ask a model to rephrase a lab report, keep host names and credentials out of the prompt. SiberAI can help you turn a messy journal page into a clearer checklist, and the security page is a reminder to treat keys and logs as sensitive even when you are only studying. You do not need a special “lab AI integration”; a short local note and, if you use the product, the ordinary quickstart are enough.

Key takeaways

  • Isolation is the architecture, not an afterthought.
  • Official, maintained practice apps beat mystery images from the internet.
  • Snapshots and a written address range will save the weekend you break the guest.
  • TryHackMe and Hack The Box are invited environments; your home router is not.
  • Every lab session should end with the guests off and a sentence about the defensive lesson.

Last updated: November 2026.

FAQ

Q: Can I run DVWA in Docker on my laptop without a VM?
A: You can, but only if the bind address stays on a loopback or an isolated interface you understand. A published port on 0.0.0.0 on a café Wi-Fi is a common, avoidable failure. A VM with a host-only network is harder to get wrong.

Q: Do I need a second physical computer?
A: Not at the beginning. A modest laptop and a hypervisor are enough. Add hardware later if you want a dedicated switch and a very obvious physical separation.

Q: Is it all right to give the lab VM internet access?
A: For updates and official image pulls, a NAT adapter is reasonable. Do not combine that with a weak application listening on every interface, and do not set up inbound port forwarding from the public internet.

Q: Which should I install first, DVWA or Juice Shop?
A: Whichever official guide you will actually finish. One application, documented and isolated, is better than three half-installed stacks.

Q: Can I practice against my own home router or a cloud trial server?
A: Your router often sits on a network that other people use, and breaking it can take the household offline. A cloud server is in scope only if you own it and you have not accidentally left it open to the world with a weak app. Prefer local isolation.

Q: How do I know the lab is not reachable from the LAN?
A: From a device that is not in the lab, the lab addresses should not answer. From the guest, ss should show the app bound to the lab interface or localhost, not to every address. If a phone on Wi-Fi can open the vulnerable page, rebuild the network.

Q: What if a practice platform asks me to connect a VPN?
A: Use the official client, read the current documentation, and disconnect when the session ends. The VPN is a path into their lab, not a licence to scan anything else that becomes reachable.

Yorumlar

Bu blogdaki popüler yayınlar

SiberAI’de Chat Completions mi, Responses mi?

Связь с нативным движком SiberAI: приватный IPC, не публичный API расширений

KVKK perspektifinden yapay zeka API'lerine veri gönderirken dikkat edilecekler