Latest / CyberCode Academy / Course 14 - Wi-Fi Pentesting | Episode 1: Setting Up the Virtual Hacking Lab: VirtualBox and Kali Linux
Transcript
- 0:00Speaker 1: So if you're serious about getting into cybersecurity or programming,
- 0:05Speaker 1: or really just trying to figure out how things break,
- 0:09Speaker 1: you inevitably hit the same wall. How do you actually
- 0:11Speaker 1: do it? How do you run experimental code or launch
- 0:14Speaker 1: a test attack without completely wrecking the computer you use
- 0:18Speaker 1: for everything else?
- 0:19Speaker 2: That risk is, it's very real, and it's exactly why
- 0:23Speaker 2: you need a dedicated lab, a clean space. You can't
- 0:26Speaker 2: learn how to break things and then, more importantly, how
- 0:29Speaker 2: to fix them. If every failure means spending a day
- 0:32Speaker 2: reinstalling your whole system, you need a sandbox, a place
- 0:36Speaker 2: where it's okay, even expected to fail.
- 0:38Speaker 1: And for a long time that meant hardware, lots of it.
- 0:41Speaker 1: I'm talking multiple computers, different operating systems. Network switch is
- 0:45Speaker 1: a total mess of cables. It was a huge barrier
- 0:47Speaker 1: to entry.
- 0:48Speaker 2: It was absolutely and that's our mission for this deep dive.
- 0:51Speaker 2: We're going to show you how to bypass all of that.
- 0:53Speaker 2: We're going to build a complex, professional grade testing lab
- 0:56Speaker 2: using just one machine, the one you're probably listening on
- 0:58Speaker 2: right now, all thanks to virtualization.
- 1:00Speaker 1: Okay, let's unpack this right.
- 1:02Speaker 2: So the core idea here is virtualization software. Think of
- 1:06Speaker 2: it as a hypervisor tools like VirtualBox for example. What
- 1:10Speaker 2: this software does is let your main computer, we call
- 1:13Speaker 2: that the host, run multiple completely separate virtual computers right
- 1:16Speaker 2: inside of.
- 1:17Speaker 1: It, the virtual machines or vms exactly.
- 1:19Speaker 2: And it doesn't matter if your host is Windows, Mac, Os, Linux.
- 1:24Speaker 2: You can spin up other machines inside it.
- 1:26Speaker 1: So I could have like a whole simulated office network
- 1:29Speaker 1: running on my laptop, a server, my hacking machine, a victim,
- 1:35Speaker 1: all at once.
- 1:35Speaker 2: That's the power of it. It's a game changer for
- 1:38Speaker 2: the lab we'ar building. Will want three main things. First,
- 1:40Speaker 2: a dedicated hacking machine will use Collie Linux for that,
- 1:43Speaker 2: it's our toolkit. Then we need at least two target
- 1:46Speaker 2: machines to practice on, maybe one running Windows and another
- 1:48Speaker 2: one called metasploitable.
- 1:50Speaker 1: Let's pause on that one. Metasploidable. The name kind of
- 1:52Speaker 1: gives it away, but what's its specific purpose here?
- 1:56Speaker 2: Metasploitable is fantastic for learning. It's a Linux machine that
- 1:59Speaker 2: has been deliberately designed to be vulnerable. It lets you
- 2:03Speaker 2: practice those classic textbook attacks in an environment where you
- 2:06Speaker 2: know they'll work. It's perfect for building up skills and
- 2:09Speaker 2: confidence before you try tackling a modern patched system, which.
- 2:13Speaker 1: Brings us to the biggest advantage of using VMS. I mean,
- 2:16Speaker 1: why is this better than just installing Collige directly on
- 2:19Speaker 1: my computer?
- 2:20Speaker 2: Two words, containment and flexibility. Containment or sandboxing means the
- 2:26Speaker 2: lab is totally isolated. If you crash a target machine
- 2:30Speaker 2: or even accidentally download some real malware inside the VM,
- 2:34Speaker 2: it can't get out. It can't touch your main operating system.
- 2:36Speaker 2: Your host is safe. And flexibility that's where it gets
- 2:39Speaker 2: really good. Let's say you completely break a machine, just
- 2:41Speaker 2: destroy it. Instead of spending hours reinstalling, you can use
- 2:45Speaker 2: a future called snapshots to instantly revert it back to
- 2:48Speaker 2: a clean working state in seconds. Wow. If we connect
- 2:52Speaker 2: this to the bigger picture, that ability to safely mess
- 2:55Speaker 2: up and instantly reset is what enables real learning. You
- 2:59Speaker 2: can practice one attack one hundred times without any real
- 3:02Speaker 2: world consequences.
- 3:03Speaker 1: Okay, I'm sold, let's build it. Step one has to
- 3:06Speaker 1: be getting the software that does all this, which is VirtualBox.
- 3:10Speaker 2: That's the one. It's a fantastic tool. It's free and
- 3:13Speaker 2: installation is super simple on any os. You just download
- 3:16Speaker 2: it and click next a few times. But the really
- 3:18Speaker 2: important part is what you install right after it the
- 3:21Speaker 2: Virtual Box Extension Pack.
- 3:23Speaker 1: The extension pack, A lot of people might just skip
- 3:25Speaker 1: that thinking it's optional. Why is it so critical for us?
- 3:28Speaker 2: Because it unlocks a key piece of functionality, direct USB access.
- 3:33Speaker 2: Without the extension pack, your virtual machines can't see or
- 3:36Speaker 2: control physical USB devices that you plug into your computer.
- 3:40Speaker 1: And why does our calling machine need direct hardware access?
- 3:44Speaker 1: Can't I just use my laptops built in Wi Fi?
- 3:46Speaker 2: It can't. Not for what we need. For a lot
- 3:49Speaker 2: of wireless attacks like packet injection, Collie needs very low
- 3:53Speaker 2: level control of the Wi Fi adapter. Your computer's built
- 3:56Speaker 2: in card is just too tied into the host operating system,
- 4:00Speaker 2: so you have to use an external USB wireless adapter,
- 4:04Speaker 2: and the extension pack is what creates that bridge, letting
- 4:07Speaker 2: Collie control it directly.
- 4:09Speaker 1: So the extension pack is absolutely not optional. Got it?
- 4:13Speaker 1: And a quick technical note here you have to make
- 4:15Speaker 1: sure the extension pack version is the exact same as
- 4:18Speaker 1: your virtual box version.
- 4:19Speaker 2: Yes, always match the versions. If you don't, it just
- 4:22Speaker 2: won't work. Once you have that foundation, it's time for
- 4:25Speaker 2: the brains of our lab Collie Linux Collie.
- 4:28Speaker 1: It's the standard for pen testing, but when you first
- 4:30Speaker 1: open it up. The number of tools can be a
- 4:32Speaker 1: little intimidating.
- 4:33Speaker 2: It can, but that's actually its biggest strength. See Collie
- 4:37Speaker 2: is built on Debian and it's designed to be a
- 4:39Speaker 2: complete out of the box toolkit. It saves you hundreds
- 4:41Speaker 2: of hours. All the tools you need are already there,
- 4:44Speaker 2: pre installed and pre configured to work together.
- 4:46Speaker 1: And we don't even have to do a manual insaul anymore. Right,
- 4:49Speaker 1: we could just use a pre built image at.
- 4:51Speaker 2: Ova file exactly, and I highly recommend it. You just
- 4:54Speaker 2: download that single file, you double click it, and virtual
- 4:56Speaker 2: box does all the heavy lifting. It imports, it sets
- 4:59Speaker 2: it up. It's the fastest way to get up and running.
- 5:01Speaker 2: Once it's running, the log in is U root roo
- 5:06Speaker 2: and the password is the reverse tour tooer And just.
- 5:10Speaker 1: Like that, you're in, which brings us to configuration. We
- 5:14Speaker 1: need to talk about resources, and probably the most important networking.
- 5:19Speaker 2: Let's talk resources first. VirtualBox will give it some default
- 5:22Speaker 2: RAM and CPU cores, maybe two gigs of RAM and
- 5:25Speaker 2: two CPUs. But you have to remember the trade off.
- 5:28Speaker 2: You can't give so much to the VM that you
- 5:30Speaker 2: starve your actual computer.
- 5:31Speaker 1: So what's a good rule of thumb?
- 5:32Speaker 2: If your computer only has say eight gigs of RAM
- 5:35Speaker 2: in total, don't give four of them to Collie. Your
- 5:37Speaker 2: host machine will slow to a crawl. It's often better
- 5:40Speaker 2: to give Colli just one gig of RAM and one CPU.
- 5:43Speaker 2: It's enough for most things, and it keeps your whole
- 5:45Speaker 2: system responsive.
- 5:46Speaker 1: All right. Now for the really critical part networking. This
- 5:49Speaker 1: is where the isolation really happens. The setting we want
- 5:52Speaker 1: ISNAT network.
- 5:54Speaker 2: Yes, this is a deliberate choice. When you set it
- 5:57Speaker 2: to NAT network, your host comput basically becomes a virtual router.
- 6:02Speaker 2: It creates its own little private network, and all your vms, Collie,
- 6:06Speaker 2: your Windows Target metasploitable, they all get connected to that
- 6:10Speaker 2: little network.
- 6:11Speaker 1: I know a lot of people like to use bridge
- 6:12Speaker 1: mode because it puts the VM on your actual home network.
- 6:16Speaker 1: Why are we avoiding that for safety?
- 6:17Speaker 2: It's all about control. If you bridge your Callie machine,
- 6:21Speaker 2: it's sitting on your home Wi Fi, right next to
- 6:23Speaker 2: your smart TV and your phone. If you run a
- 6:26Speaker 2: network scan from Collie, you're scanning your own house.
- 6:29Speaker 1: And that completely breaks the whole isolated lab idea completely.
- 6:33Speaker 2: With NAT network, all the attack traffic stays inside that
- 6:36Speaker 2: virtual bubble. The vms can see each other, which is
- 6:38Speaker 2: what we want for practice. They can also get out
- 6:40Speaker 2: to the internet through your host, but critically, no attack
- 6:44Speaker 2: traffic ever touches your real network hardware.
- 6:47Speaker 1: So inside the VM, it'll look like it's connected with
- 6:50Speaker 1: a wire, even if my laptop's on.
- 6:52Speaker 2: Wi Fi exactly, you'll see wired connected and that's how
- 6:54Speaker 2: you know the NEAT network is working and your lab
- 6:57Speaker 2: is properly sandboxed.
- 6:58Speaker 1: Quick tip for some users, by the way, if you're
- 7:00Speaker 1: on a slightly older version of Virtual Box, maybe version six,
- 7:04Speaker 1: and you have a high res screen, Collie might look tiny.
- 7:07Speaker 2: Ah. Yes, The fix for that is usually just going
- 7:11Speaker 2: into the display settings and bumping the scale factor up
- 7:14Speaker 2: to two hundred percent.
- 7:15Speaker 1: Perfect. Yeah, so we're configured, we're networked. Let's do a
- 7:19Speaker 1: quick tour of the Collie desktop so people aren't intimidated
- 7:21Speaker 1: when they first boot it up.
- 7:22Speaker 2: The main thing to know is the organization. If you
- 7:24Speaker 2: click the application menu, all the tools are grouped by function.
- 7:28Speaker 2: It follows the actual stages of a penetration test. You've
- 7:31Speaker 2: got information gathering, vulnerability analysis, exploitation. You just go to
- 7:35Speaker 2: the category that matches what you're trying to do.
- 7:37Speaker 1: It's a workflow, not just a list of programs. And
- 7:40Speaker 1: another great feature, especially if you're new to Linux, is workspaces.
- 7:44Speaker 2: Workspaces are so efficient. They're like having multiple clean desktops.
- 7:48Speaker 2: You can have a network scanner running on one, then
- 7:50Speaker 2: flip over to a clean workspace to open a web
- 7:53Speaker 2: browser for research, then flip to another one with your
- 7:55Speaker 2: terminal open. It keeps everything so organized.
- 7:58Speaker 1: And the shortcut is control plus alt plus the upper
- 8:02Speaker 1: down arrow keys to just jump between them instantly.
- 8:05Speaker 2: Yep, super fast. And one last thing, just to circle back.
- 8:08Speaker 2: If you look at your status bar, you'll see that
- 8:10Speaker 2: wired connection we talked about. That's your NAT network. Just remember,
- 8:13Speaker 2: if you want to do any real Wi Fi hacking,
- 8:16Speaker 2: you need that external USB adapter we mentioned earlier. The
- 8:19Speaker 2: built in one is off limits to the VM.
- 8:22Speaker 1: And there we have it. The foundation is built a
- 8:25Speaker 1: fully isolated, professional grade testing lab. Collie is ready to go,
- 8:29Speaker 1: Our network is contained. We're ready to get our hands dirty.
- 8:33Speaker 2: This setup is really the cornerstone for any cybersecurity student
- 8:36Speaker 2: or professional. You have the safety of isolation and the
- 8:39Speaker 2: speed of recovery. It lets you learn so much faster
- 8:41Speaker 2: because you're not afraid to break things Just.
- 8:43Speaker 1: A final practical tip is Collie feels a bit laggy
- 8:46Speaker 1: when you first started up, just give it a minute
- 8:47Speaker 1: or two. It's often running updates in the background right
- 8:50Speaker 1: after boot, which can eat up some resources, and of
- 8:53Speaker 1: course close anything you don't need on your main computer
- 8:56Speaker 1: to free UPRAM.
- 8:57Speaker 2: So what does this all mean. It means you now
- 9:00Speaker 2: have a sandbox, a place where you can practice professional
- 9:03Speaker 2: penetration testing techniques safely and effectively without ever putting your
- 9:08Speaker 2: own data or your own machine at risk. That is
- 9:11Speaker 2: incredibly empowering.
- 9:12Speaker 1: Okay, so let's put it all together. Given how important
- 9:15Speaker 1: it is to keep both the hardware and the network
- 9:17Speaker 1: traffic separate from your host machine, if you were setting
- 9:20Speaker 1: this up for the very first time, what's the single
- 9:22Speaker 1: most important thing you would double check to make sure
- 9:25Speaker 1: your isolation is complete.
- 9:27Speaker 2: You'd need to check two things, really, One that the
- 9:29Speaker 2: Virtual Box Extension Pack is installed and working so your
- 9:32Speaker 2: USB hardware is handled correctly, and two that your VM's
- 9:36Speaker 2: network is set to NAT network. The extension pack isolates
- 9:39Speaker 2: the hardware and the GNAT network isolates the traffic. You
- 9:42Speaker 2: need both for a truly safe and functional lab