🛡️Cyber Security
Foundations · Lesson 1/9

Setup & Prerequisites — Build Your Lab

30 min 1 exercise 1 quiz

What you'll set up

Before you touch a single security tool, you need your own workbench. In this lesson you will:

  1. Install a code editor (VS Code) — where you'll write every script in this roadmap
  2. Install Python itself on your machine — not just in the browser
  3. Build a safe, legal virtual lab (VirtualBox + Kali Linux) — your own private "shooting range"
  4. Create free accounts on two hands-on practice platforms for later
  5. Prove it all works with a real, checked script — your first working result today

Twenty minutes of setup now saves you hours of confusion later. Let's go.

Why a locksmith owns their own locks 🔧

A locksmith practices on locks they bought — never on a stranger's front door. Cybersecurity works the same way: you need your own private lab to safely practice attacking and defending, without ever touching a system you don't own or have written permission to test. That's not just good practice — it's the line between "student" and "criminal" (you'll revisit this in the Penetration Testing lesson).

Three tools make up your workbench:

  • A code editor (VS Code) — a smart text editor for writing Python scripts, reading config files, and editing code with color-highlighting and autocomplete. Notepad works; VS Code works much better.
  • Python — the automation language you'll use throughout this roadmap (you met it in the Python lesson). You need it installed on your actual computer, not just running in this browser.
  • A Virtual Machine (VM) — a "computer inside your computer." It runs a separate operating system in a sandboxed window. If you break it, misconfigure it, or even get it infected while practicing — your real computer is completely untouched. This is where you'll safely run Kali Linux, the standard operating system built specifically for security work (loaded with hundreds of pre-installed tools).

Step 1 — Install a code editor

Download and install Visual Studio Code — it's free, and works on Windows, macOS, and Linux.

  1. Click the link above and download the installer for your operating system
  2. Run it and accept the defaults — no special options needed
  3. Open VS Code once installed. You'll use it to write every Python script in this roadmap

That's it — you now have a real development environment, the same one professional security engineers use.

Step 2 — Install Python on your machine

Go to python.org/downloads and download the latest version for your OS.

⚠️ On Windows, this matters: on the first installer screen, tick the checkbox "Add python.exe to PATH" before clicking Install. Skip this and your terminal won't find Python later.

To confirm it worked, open a terminal (Command Prompt / Terminal app) and type:

python --version

If it prints something like Python 3.12.x, you're done. (On some systems the command is python3 instead of python.)

Step 3 — Build your safe hacking lab

  1. Download VirtualBox (free, by Oracle) and install it — this is the program that runs virtual machines.
  2. Download the official Kali Linux VirtualBox image — a ready-made Kali VM, no manual OS install needed.
  3. Open VirtualBox → Import the downloaded Kali file → start it. Default login is usually kali / kali.

You now have an isolated, disposable security lab. Anything you do inside Kali stays inside Kali — practice freely, break things on purpose, and reset it anytime by re-importing the image.

The one rule that matters most: only ever scan, attack, or test systems you own (like this VM) or have explicit written permission to test. Everything else is illegal — no exceptions.

A note on VM networking — NAT vs Bridged 🌐

When you first open your Kali VM, VirtualBox asks how it connects to the internet. This trips up almost every beginner, so know the two main modes:

  • NAT (default, and what you want for now) — Kali shares your real computer's internet connection but stays on its own private network, invisible to other devices on your WiFi. Safe default for practicing.
  • Bridged Adapter — Kali gets its own address directly on your real network, as if it were a second physical computer plugged into your router. Useful later when a lab needs your VM to be reachable from another device, but it also means your practice machine is now visible to your whole home network.

Rule while you're learning: leave it on NAT. Only switch to Bridged when a specific tutorial tells you to, and switch back afterward — an exposed practice VM is a real, if small, security risk on shared networks (cafés, dorms, offices).

Step 4 (optional but recommended) — Free practice accounts

Later in this roadmap (especially the Penetration Testing lesson) you'll want deliberately-vulnerable machines to practice on legally. Create free accounts now so they're ready when you need them:

  • TryHackMe — guided, beginner-friendly hands-on labs
  • Hack The Box — more advanced, unguided challenges

Both have generous free tiers — no payment needed to start learning.

Exercise 1

Prove your setup works. This exercise runs right here in your browser (via an in-browser Python engine) — a preview of the real Python you just installed locally.

Write code that:

  1. Stores your name in a variable called my_name
  2. Stores your target job title (e.g. "SOC Analyst") in a variable called goal
  3. Prints: "<my_name> is ready to become a <goal>."

This is your first checked, working result on this roadmap — small, but real.

Quick quiz

Question 1 of 6

Why practice inside a Virtual Machine instead of directly on your main computer?

Question 2 of 6

On Windows, what must you check during the Python installer's first screen?

Question 3 of 6

Which of these is it legal and ethical to scan or attack?

Question 4 of 6

What is Kali Linux?

Question 5 of 6

Which VirtualBox network mode should you use by default while learning?

Question 6 of 6

Why should you switch back to NAT after using Bridged mode?

You're ready ✅

Your checklist:

  • [x] Code editor installed (VS Code)
  • [x] Python installed on your machine
  • [x] VirtualBox + Kali Linux — your private lab
  • [x] TryHackMe / Hack The Box accounts created
  • [x] Your first working, checked script ran successfully

Nothing left standing between you and the rest of this roadmap. Next up: Computer Basics — the foundations everything else builds on.

Practice

Reading is not learning until you run something. Pick one.

Open an example in Code Lab