Latest / CyberCode Academy / Course 14 - Wi-Fi Pentesting | Episode 2: Network Fundamentals, Wireless Adapter Setup, and Packet Sniffing Basics
Transcript
- 0:00Speaker 1: Okay, let's unpack this. Just stop for a second and
- 0:03Speaker 1: think about all the data that's flowing around you right now.
- 0:06Speaker 1: You're probably streaming this right maybe a device in another
- 0:09Speaker 1: room is checking for updates, or you just unlocked your phone.
- 0:12Speaker 1: Every single one of those digital activities, I mean, no
- 0:14Speaker 1: matter how big or small, gets broken down instantly into
- 0:18Speaker 1: these tiny, little envelopes of data. We call them packets.
- 0:21Speaker 2: And here's the part that's well, it's just physics. When
- 0:23Speaker 2: you're on Wi Fi. Those packets aren't inside a cable.
- 0:28Speaker 2: They are literally being broadcast. They're flying through the air
- 0:30Speaker 2: around you as radio waves. It's like this invisible, constant conversation.
- 0:34Speaker 2: And if you have the right tools, you can actually
- 0:36Speaker 2: listen in on every single whisper.
- 0:38Speaker 1: And that's our mission for this deep dive. We want
- 0:41Speaker 1: to cut through the magic of it all and get
- 0:44Speaker 1: to the cold hard mechanics of how professionals intercept this
- 0:47Speaker 1: wireless data. We're going to move past just connecting to
- 0:52Speaker 1: a network. We're going to zero in on the three
- 0:54Speaker 1: things you absolutely need. First understanding device identity, then getting
- 0:59Speaker 1: the right hardware, and finally mastering the one operational mode
- 1:03Speaker 1: that turns your computer into well, an auditor of the airwaves.
- 1:07Speaker 2: Yeah, and we're starting right at the heart of your
- 1:09Speaker 2: setup with the architecture of the network itself, specifically the
- 1:13Speaker 2: device that acts as the single point of control and capture,
- 1:16Speaker 2: the network gatekeeper.
- 1:18Speaker 1: Okay, so when you look at any network right a
- 1:20Speaker 1: coffee shop, your office, it doesn't matter, the structure is
- 1:23Speaker 1: always the same. You have clients, your phone, your laptop,
- 1:26Speaker 1: and they all talk to one central hub.
- 1:28Speaker 2: That hub is what we call the access point or
- 1:30Speaker 2: AP for most people at home, that's just your router,
- 1:33Speaker 2: and its job is absolutely critical because it is the
- 1:36Speaker 2: network server. It's the only thing with an exclusive connection
- 1:39Speaker 2: to the outside world.
- 1:40Speaker 1: Right usually through an Ethernet cable plugged into the wall.
- 1:43Speaker 1: This is the part I think people kind of gloss over.
- 1:46Speaker 1: Your phone connects wirelessly to the router, but the router
- 1:49Speaker 1: itself is physically plugged into the Internet. So your phone,
- 1:53Speaker 1: your laptop, they have zero direct access to the global network.
- 1:58Speaker 1: They have to and I mean this is not negotiable.
- 2:00Speaker 1: They have to wrote every single packet through that access point.
- 2:04Speaker 2: It creates this centralized transit system. It's like a train station.
- 2:07Speaker 2: If you want to go to a website, your request
- 2:09Speaker 2: packet travels wirelessly to the AP if he sends it out,
- 2:13Speaker 2: gets the response, and then broadcasts that response back to
- 2:16Speaker 2: your device. Since everything, and I mean everything, URL's passwords,
- 2:20Speaker 2: messages flows through that one point, all the traffic is
- 2:23Speaker 2: centralized right there.
- 2:24Speaker 1: And that is exactly why the wireless part is such
- 2:26Speaker 1: a security issue, because if that traffic is just flying
- 2:30Speaker 1: through the air as radio waves, anyone sitting nearby with
- 2:33Speaker 1: the right gear can potentially capture every single one of
- 2:36Speaker 1: those packets.
- 2:38Speaker 2: The data is fundamentally visible when it's in transit.
- 2:41Speaker 1: It's just out there, that's right.
- 2:43Speaker 2: And look, understanding that communication is a constant public broadcast
- 2:47Speaker 2: is the first step to understanding wireless security. Encryption can
- 2:51Speaker 2: make the content unreadable, sure, but the fact that the
- 2:54Speaker 2: communication even happened and between who that's still being announced
- 2:59Speaker 2: to the world.
- 3:00Speaker 1: So if the error is just flooded with packets, how
- 3:03Speaker 1: does my laptop know which ones are for me? How
- 3:06Speaker 1: does it not get the packets meant for my neighbor's
- 3:08Speaker 1: smart fridge.
- 3:09Speaker 2: Ah, that brings us to identification, specifically the physical, permanent
- 3:13Speaker 2: identity of your hardware. Okay, so for local communication we
- 3:16Speaker 2: use something called the media Access control address the MC address.
- 3:20Speaker 2: Think of it like a permanent, burned in serial number
- 3:23Speaker 2: for your Wi Fi card or your Ethernet port. The
- 3:26Speaker 2: manufacturer assigns it, and globally, no two devices have the
- 3:30Speaker 2: same one. It's totally unique, so.
- 3:32Speaker 1: It's like a passport for the hardware itself. What's its
- 3:34Speaker 1: actual role in the network.
- 3:36Speaker 2: It's the local delivery system. The AMKY address is only
- 3:39Speaker 2: used within your local network, what we call Layer two,
- 3:42Speaker 2: to get data to the exact right device. Every single
- 3:45Speaker 2: packet that travels between say your laptop and the router
- 3:49Speaker 2: has to have a source AMP address and a destination
- 3:52Speaker 2: a MAM address. That's how the router knows which specific
- 3:55Speaker 2: door to deliver the mail to.
- 3:57Speaker 1: And how is that different from an IP address. Most
- 3:59Speaker 1: people have heard of that, right.
- 4:00Speaker 2: So the IP address is your global identifier. It's used
- 4:02Speaker 2: across the entire Internet. Layer three. Think of your IP
- 4:06Speaker 2: address like your home's postal address, which is used worldwide.
- 4:10Speaker 2: The MM address is like the name on the mailbox
- 4:13Speaker 2: at that address. When a packet leaves your router to
- 4:16Speaker 2: go onto the Internet, the router strips off the local
- 4:18Speaker 2: am ANI address info and puts on the global IP address.
- 4:22Speaker 1: And when it comes back.
- 4:23Speaker 2: When a packet comes back, the router looks at the
- 4:25Speaker 2: destination IP, figures out which local device it's for, and
- 4:28Speaker 2: then puts the correct MAF address back on to steer
- 4:30Speaker 2: it to your specific laptop. The AM matthew just never
- 4:34Speaker 2: ever leaves your local network.
- 4:36Speaker 1: Okay, now here's where it gets really interesting, especially if
- 4:38Speaker 1: you're thinking about anonymity or you know, getting around network rules.
- 4:42Speaker 1: If that AMAC address is the key identifier for getting access,
- 4:47Speaker 1: being able to change it to spoof it, that sounds
- 4:51Speaker 1: like a very powerful tool. Oh.
- 4:53Speaker 2: Absolutely. The permanence of the am acdress is ironically a
- 4:57Speaker 2: huge risk to your anonymity. You use the same laptop
- 5:01Speaker 2: at five different cafes, an observer could theoretically link your
- 5:04Speaker 2: activity across all those locations just by logging your AMAC address.
- 5:08Speaker 1: But you can change it.
- 5:09Speaker 2: You can using command line tools. It's possible to temporarily
- 5:13Speaker 2: change or spoof that address, and doing that gives you
- 5:16Speaker 2: instant temporary anonymity on a network.
- 5:19Speaker 1: But the more strategic use is for bypassing security filters.
- 5:22Speaker 2: Right.
- 5:22Speaker 1: Let's say a company only allows certain proved devices to connect,
- 5:25Speaker 1: and it checks that by their AM address.
- 5:27Speaker 2: Exactly or maybe they slowed on the internet. For guests,
- 5:30Speaker 2: if you can find out the AMAC address of a
- 5:32Speaker 2: device that does have permission, like a manager's computer or
- 5:35Speaker 2: a trusted server.
- 5:36Speaker 1: You could just become that device.
- 5:37Speaker 2: You can change your own physical identifier to match THEIRS.
- 5:42Speaker 2: You've essentially just impersonated a trusted device and walked right
- 5:45Speaker 2: through a restricted digital door. That's why manipulating this fundamental
- 5:50Speaker 2: identity layer is so critical in network security.
- 5:54Speaker 1: But to do any of this to capture MAC addresses
- 5:57Speaker 1: to analyze traffic, your standard off the show shelf laptop
- 6:00Speaker 1: is pretty much useless, which brings us to the hardware
- 6:04Speaker 1: you actually need. Why isn't the Wi Fi card that
- 6:07Speaker 1: came with my computer good enough for this kind of
- 6:10Speaker 1: deep dive.
- 6:11Speaker 2: There are two big reasons, and they're kind of tangled together.
- 6:14Speaker 2: The first is just about operations. If you're running a
- 6:17Speaker 2: let's say a special operating system for testing inside a virtual.
- 6:20Speaker 1: Machine, a Cully Linux or something similar.
- 6:22Speaker 2: Right, that virtual environment often can't directly access the physical
- 6:26Speaker 2: hardware of your built in Wi Fi card. It's sandboxed,
- 6:29Speaker 2: so you need an external device you can just plug
- 6:31Speaker 2: in via USB and give the virtual OS full control.
- 6:33Speaker 1: Over Okay, that makes sense for the setup, but what
- 6:35Speaker 1: about the card itself? What's wrong with it?
- 6:37Speaker 2: The core issue is its function. Built in consumer grade
- 6:41Speaker 2: cards are designed to be, for lack of a better word,
- 6:45Speaker 2: polite clients. They just don't support the two advanced features
- 6:49Speaker 2: you have to have for any real analysis, monitor mode
- 6:53Speaker 2: and packet injection.
- 6:54Speaker 1: Hold on, we've mentioned monitor mode, but packet injection is new.
- 6:57Speaker 1: What is that Why is it so essential?
- 7:00Speaker 2: Makeet injection is the ability for your wireless card to
- 7:02Speaker 2: not just listen, but to talk to craft and send
- 7:06Speaker 2: its own custom made packets onto the network. This is
- 7:09Speaker 2: absolutely essential for serious security testing. You might use it to, say,
- 7:14Speaker 2: kick a device off the network so you can capture
- 7:16Speaker 2: the information it sends when it reconnects.
- 7:18Speaker 1: So you're not as a passive listener.
- 7:20Speaker 2: Exactly, you can't just listen. You have to be able
- 7:21Speaker 2: to interact. Without packet injection, you're a spy who can't speak.
- 7:25Speaker 1: So the solution is a powerful external USB wireless adapter.
- 7:30Speaker 1: But not just anyone you find online, No.
- 7:32Speaker 2: Not at all. It has to have a specific chipset,
- 7:35Speaker 2: the little brain inside it that's known to work with
- 7:37Speaker 2: the special drivers needed for these advanced modes. The security
- 7:41Speaker 2: community has a few.
- 7:42Speaker 1: Favorites, right ones with open source drivers that can be
- 7:44Speaker 1: tweaked precisely.
- 7:46Speaker 2: Without that compatible hardware, you simply cannot make the operational
- 7:51Speaker 2: shift we need to make, which is moving from being
- 7:53Speaker 2: a polite client to a full network auditor.
- 7:56Speaker 1: Let's define the default sitting first. Then every single wire
- 8:00Speaker 1: wireless device you own, your phone, your laptop, everything operates
- 8:03Speaker 1: in what's called managed mode.
- 8:05Speaker 2: By default, managed mode is all about politeness and efficiency.
- 8:09Speaker 2: In this mode, your device is a selective filter. It
- 8:13Speaker 2: only listens for and processes packets where the destination m
- 8:17Speaker 2: ASSI dress is its own. If a packet is addressed
- 8:20Speaker 2: to another device, it just ignores it throws it away.
- 8:23Speaker 2: It's only interested in its own business.
- 8:25Speaker 1: But we want to see the entire conversation, all the
- 8:27Speaker 1: packets flying between the router and every other device. For that,
- 8:30Speaker 1: we need to completely change the rules of engagement. We
- 8:33Speaker 1: need monitor mode.
- 8:34Speaker 2: And monitor mode does exactly what it sounds like. It
- 8:37Speaker 2: turns your wireless card into a wide open, non selective microphone.
- 8:40Speaker 2: When you're in this mode, the device captures every single
- 8:44Speaker 2: packet that's transmitted within its physical range, no matter who
- 8:46Speaker 2: it's for. It completely bypasses that polite filtering system from
- 8:50Speaker 2: managed mode.
- 8:51Speaker 1: And this isn't just flipping a switch, right, there's a
- 8:53Speaker 1: whole process to it.
- 8:55Speaker 2: It's a structured process. Yeah. The first thing you have
- 8:57Speaker 2: to do is take the network interface offline. Praarily, you
- 9:00Speaker 2: can't change how it works while it's actively.
- 9:03Speaker 1: Working, Okay, so you disable it.
- 9:05Speaker 2: Then what then? The really critical step is to stop
- 9:08Speaker 2: any other processes on your computer that might interfere.
- 9:12Speaker 1: What kind of processes would interfere with this?
- 9:15Speaker 2: Primarily your operating systems standard Network manager, that little icon
- 9:19Speaker 2: that shows you Wi Fi networks. Yeah, that program's whole
- 9:23Speaker 2: job is to keep you connected, so it's constantly trying
- 9:26Speaker 2: to force your adapter back into that polite default managed mode.
- 9:30Speaker 2: If you don't kill that process, it'll just fight you
- 9:33Speaker 2: the whole time, and your capture will fail. This is
- 9:35Speaker 2: why you temporarily lose your Internet connection when you do this,
- 9:38Speaker 2: which is fine. You don't need it to listen to
- 9:40Speaker 2: the radio waves around you.
- 9:42Speaker 1: So interface down interfering service is killed. Then you use
- 9:45Speaker 1: a specific command I'm guessing something in the.
- 9:47Speaker 2: Terminal YEP, a command line tool. You use it to
- 9:50Speaker 2: tell the hardware driver directly change your operation from managed
- 9:54Speaker 2: to monitor. Forget the polite rules, just listen to everything.
- 9:57Speaker 2: Once you issue that command, you bring the face back
- 10:00Speaker 2: up and now it's ready. But again, this whole sequence
- 10:03Speaker 2: only works if you have that powerful compatible hardware that
- 10:06Speaker 2: actually understands the command of the first place.
- 10:09Speaker 1: Once monitor mode is on your device is officially a sniffer.
- 10:13Speaker 1: It can capture raw packets without even being connected to
- 10:15Speaker 1: the target network. You don't need the password, but raw
- 10:18Speaker 1: data is just a jumble of ones and zeros. You
- 10:21Speaker 1: need a tool to make sense of it all.
- 10:23Speaker 2: And that's where a packet sniffer program comes in. A
- 10:26Speaker 2: common tool in the testing world is called aero dumping.
- 10:30Speaker 2: A program like that takes the enormous flood of raw
- 10:33Speaker 2: data that monitor Mode is capturing and organizes it. It
- 10:37Speaker 2: displays it in a structured, readable way. It basically maps
- 10:40Speaker 2: out the entire wireless landscape around you in real time.
- 10:44Speaker 1: So when you run a tool like that, it's just
- 10:45Speaker 1: constantly discovering and listing every nearby network. Let's break down
- 10:49Speaker 1: what you actually see. What are the key pieces of
- 10:51Speaker 1: intelligence you get from those data columns.
- 10:53Speaker 2: The first thing you'll see is the E set that's
- 10:56Speaker 2: the familiar network name you'd see on your phone, like
- 10:58Speaker 2: my home WiFi. But right next to it is something
- 11:01Speaker 2: far more important, the BSSID, and that is the unique
- 11:06Speaker 2: MSc address of the access point itself. Remember that's the
- 11:09Speaker 2: permanent physical ID of the gatekeeper you're analyzing.
- 11:12Speaker 1: So es D is the public name, BSSID is the
- 11:15Speaker 1: real physical address. You also see a PWR column. That's
- 11:19Speaker 1: for positioning, isn't it exactly?
- 11:20Speaker 2: PWR is power or signal strength. It tells you how
- 11:23Speaker 2: strong the signal is between you and that AP. A
- 11:27Speaker 2: higher number, well technically a number closer to zero means
- 11:30Speaker 2: a stronger signal. It lets you physically locate where the
- 11:32Speaker 2: target is relative to you.
- 11:34Speaker 1: Then there are beacons. You see these numbers just taking
- 11:36Speaker 1: up constantly, even if nobody is using the network. What
- 11:39Speaker 1: are those beacons?
- 11:41Speaker 2: Are just management frames that the AP constantly broadcasts. It's
- 11:44Speaker 2: essentially the network shouting I'm here, I exist, And it's
- 11:48Speaker 2: not just saying it exists. It's also announcing its operational details,
- 11:52Speaker 2: the channel it's on, its speed, and critically what kind
- 11:55Speaker 2: of encryption it uses. This is why hiding your network
- 11:58Speaker 2: is mostly pointless. The beacon frames are still broadcasting all
- 12:01Speaker 2: that essential data into the air.
- 12:03Speaker 1: And finally, the two columns that really tell you what
- 12:05Speaker 1: to do next, encryption and data packets.
- 12:08Speaker 2: The encryption column is your roadmap. It tells you the
- 12:11Speaker 2: security standard WEPWPAWPA two. That one piece of info dictates
- 12:16Speaker 2: the entire complexity of what comes next. WEP is trivial.
- 12:19Speaker 2: To break WPA two is a serious challenge.
- 12:22Speaker 1: And the data packet count, why is that so important?
- 12:24Speaker 2: That's tracking the number of useful data frames you've collected.
- 12:28Speaker 2: This is vital because for modern WPA two networks, you
- 12:31Speaker 2: need to capture a very specific exchange of packets that
- 12:33Speaker 2: happens when a device connects. It's called the four way handshake.
- 12:37Speaker 2: Those handshakes are inside these data packets. Capturing one is
- 12:41Speaker 2: the absolute prerequisite for any offline password cracking attempt. The
- 12:45Speaker 2: more data packets you see, the better your chance of
- 12:47Speaker 2: grabbing one of those handshakes.
- 12:49Speaker 1: So let's bring this all together. What does this actually
- 12:51Speaker 1: mean for you for the security landscape you're operating in.
- 12:55Speaker 1: We've gone from just connecting to Wi Fi to understanding
- 12:58Speaker 1: this very specific combination of things. You need a permanent
- 13:01Speaker 1: physical address, specialized hardware, and a fundamental operational shift to
- 13:06Speaker 1: monitor mode, all just to see the conversation happening around us.
- 13:09Speaker 2: What's really fascinating here is how the security of a
- 13:12Speaker 2: wireless network is built on layers. The physical reality, the
- 13:17Speaker 2: fact that data is flying through the air means the
- 13:19Speaker 2: conversation itself is never truly private. Our default settings that
- 13:23Speaker 2: managed mode, it's just a polite filter. Monitor mode pulls
- 13:27Speaker 2: the curtain back and shows you that data privacy on
- 13:29Speaker 2: Wi Fi is one hundred percent dependent on strong encryption,
- 13:33Speaker 2: not on hoping nobody is listening.
- 13:35Speaker 1: The packets are always flowing. The only question is are
- 13:37Speaker 1: they readable?
- 13:38Speaker 2: That's the whole game.
- 13:39Speaker 1: That's a really powerful takeaway. We've established that every device
- 13:42Speaker 1: in your house, your laptop, your smart TV, your thermostat
- 13:46Speaker 1: is constantly broadcasting its permanent, unique m mass C address
- 13:49Speaker 1: into the air every time it talks to the router.
- 13:52Speaker 2: So consider this as a final thought. If your MXI
- 13:55Speaker 2: address is globally unique and permanent, and networks can log
- 13:59Speaker 2: every time they see that address connect, what new insights
- 14:02Speaker 2: could you gain about the traffic patterns in your own home,
- 14:05Speaker 2: And maybe more importantly, what long term anonymity risk does
- 14:09Speaker 2: that permanent physical idea which you can only ever temporarily
- 14:12Speaker 2: hide post to your activity as you move between different
- 14:14Speaker 2: networks over time. That is the foundational identity layer that
- 14:18Speaker 2: dictates your presence in the wireless world.