Latest / CyberCode Academy / Course 23 - WiFi Hacking with Raspberry Pi | Episode 3: Build a Portable Raspberry Pi Cyberdeck
Transcript
- 0:00Speaker 1: I want you to picture something. You're in a coffee shop,
- 0:02Speaker 1: maybe an airport, and you see someone pull out this
- 0:06Speaker 1: little gadget. It's not a phone, not really a tablet.
- 0:09Speaker 1: It's kind of rough looking.
- 0:11Speaker 2: Yeah, like something with exposed.
- 0:12Speaker 1: Circuits, exactly a ClearCase. You can see the boards inside,
- 0:16Speaker 1: maybe a little antenna sticking out. They tap on a
- 0:18Speaker 1: tiny screen and you see like green text scrolling.
- 0:22Speaker 2: By a classic movie hacker device. Yeah, the cyber deck.
- 0:26Speaker 2: That's it.
- 0:27Speaker 1: But here's the thing. It's not a movie prop. It's
- 0:30Speaker 1: a real, fully functional, portable network analysis tool. And what
- 0:35Speaker 1: we're going to talk about today is how you can
- 0:36Speaker 1: actually build one for yourself, and.
- 0:38Speaker 2: It's surprisingly accessible. We're taking components you can order online
- 0:42Speaker 2: and turning them into a very powerful piece of kit
- 0:45Speaker 2: that fits in your pocket.
- 0:46Speaker 1: So the mission for this deep dive is to go
- 0:47Speaker 1: from a stack of parts to a battery powered pen
- 0:50Speaker 1: testing machine. It sounds like the ultimate weekend project.
- 0:53Speaker 2: It is, and it's not just for looks. This device
- 0:56Speaker 2: is designed for one thing, to expose the visa world
- 1:00Speaker 2: of wireless networks all around us.
- 1:03Speaker 1: Okay, but let's be real. Is this just a cool
- 1:06Speaker 1: looking toy or is it actually useful. I mean, it
- 1:08Speaker 1: seems like a lot of effort. If I can just
- 1:10Speaker 1: use my laptop.
- 1:12Speaker 2: That's a great question. And you're right. If you just
- 1:14Speaker 2: want to check your email, a phone is better. But
- 1:17Speaker 2: your phone and your laptop are designed to hide complexity
- 1:20Speaker 2: from you. They just want to connect.
- 1:22Speaker 1: Ah.
- 1:22Speaker 2: This machine we're building is designed to do the opposite.
- 1:25Speaker 2: It's designed to reveal that complexity, to show you how
- 1:28Speaker 2: the data is actually moving through the air.
- 1:30Speaker 1: I like that distinction. Okay, I'm in. Let's start with
- 1:33Speaker 1: the heart of the project, the Raspberry Pie. There are
- 1:36Speaker 1: so many versions. Now do I just get the newest,
- 1:38Speaker 1: most powerful one, the Pie five?
- 1:40Speaker 2: You'd think so, but not necessarily, and this is a
- 1:43Speaker 2: common trip up. Everyone defaults to the latest model because
- 1:46Speaker 2: you know, bigger numbers are better, right, more power, more power,
- 1:49Speaker 2: but also more problems for a build like this. More
- 1:52Speaker 2: power means more heat, and it means it just chews
- 1:54Speaker 2: through your battery.
- 1:55Speaker 1: Oh right, So you need a fan and a bigger
- 1:57Speaker 1: battery and the whole thing gets bulky.
- 1:59Speaker 2: Exactly for a portable handheld device. The Raspberry Pie three
- 2:05Speaker 2: model B plus is kind of the sweet spot, the
- 2:08Speaker 2: goldilocks zone.
- 2:09Speaker 1: The old workhorse.
- 2:10Speaker 2: It's powerful enough for all the tools we need, but
- 2:13Speaker 2: it SIPs power compared to the newer ones. You can
- 2:16Speaker 2: run it without a fan and it just works. It's
- 2:19Speaker 2: about efficiency.
- 2:20Speaker 1: Okay, so PI three B plus it is. Now for
- 2:22Speaker 1: the case. I've seen some really creative builds. Does it
- 2:25Speaker 1: actually matter what we put it in?
- 2:27Speaker 2: Esthetically go wild? Yeah? But functionally I really recommend one
- 2:32Speaker 2: of those transparent acrylic cases.
- 2:34Speaker 1: Just because it looks cool, that's part.
- 2:36Speaker 2: Of it, for sure, But it's also practical when you're
- 2:38Speaker 2: trying to figure out why something isn't working, being able
- 2:41Speaker 2: to see the board, to see the little LED's blinking
- 2:43Speaker 2: is a huge help.
- 2:44Speaker 1: That's a good point. Instant feedback. Okay, let's talk storage.
- 2:47Speaker 1: The pie runs on a micro SD card.
- 2:49Speaker 2: I've got a bunch of old ones. Can I just
- 2:51Speaker 2: use one of those?
- 2:51Speaker 1: Please? Don't? That is probably the fastest way to have
- 2:54Speaker 1: a bad time with this project.
- 2:55Speaker 2: Why it's just for the operating system, isn't it? It is?
- 2:58Speaker 2: But you have to remember that little card is the
- 3:01Speaker 2: hard drive. Every single thing the computer does involves reading
- 3:05Speaker 2: or writing to that card.
- 3:07Speaker 1: So a slow card makes the whole system feel sluggish, like.
- 3:10Speaker 2: You're walking through molasses. You click an icon. Wait three seconds,
- 3:13Speaker 2: it's frustrating. You need a card that's rated for running applications.
- 3:17Speaker 1: Okay, so what am I looking for?
- 3:18Speaker 2: Look for an A one or A two rating on
- 3:20Speaker 2: the card that stands for application performance Class. It means
- 3:24Speaker 2: it's designed for this kind of work and for size.
- 3:27Speaker 2: Don't go small.
- 3:28Speaker 1: So my old sixteen gig card is out.
- 3:30Speaker 2: Yeah, I mean the OS might fit. But we're loading
- 3:32Speaker 2: this with tools, with word lists, with network logs, you'll
- 3:35Speaker 2: run out of space fast. Sixty four kigabytes is a
- 3:38Speaker 2: good safe minimum.
- 3:39Speaker 1: Got it? Sixty four gigs A one or A two.
- 3:42Speaker 1: No camera cards from twenty twelve. Now power to make
- 3:45Speaker 1: this portable, we need a battery. What's the best way
- 3:48Speaker 1: to do that?
- 3:49Speaker 2: Well, the simple way is to just tape a USB
- 3:51Speaker 2: power bank to it. It works, but it's not very.
- 3:55Speaker 1: Clean and the wires are just hanging out right.
- 3:57Speaker 2: The more elegant solution is something called a hat. Yeah,
- 4:00Speaker 2: it's a piece of hardware that attaches directly on top
- 4:02Speaker 2: of the pie's main pins.
- 4:04Speaker 1: A daughterboard hardware attached on top. I get it exactly.
- 4:07Speaker 2: You can get a power management hat that comes with
- 4:10Speaker 2: a flat battery. The whole thing stacks together into one
- 4:13Speaker 2: solid block pie battery hat super.
- 4:17Speaker 1: Clean, and that's better than a USB bank, much.
- 4:20Speaker 2: Better, because a good hat can actually talk to the pie.
- 4:23Speaker 2: It can say, hey, the battery is low, shut down safely.
- 4:26Speaker 2: A normal power bank just dies and that can corrupt
- 4:29Speaker 2: your SD card.
- 4:29Speaker 1: Wooh, that's a huge deal. You don't want to have
- 4:31Speaker 1: to reinstall everything from scratch.
- 4:33Speaker 2: Nobody wants that. So the hat is like a tiny
- 4:36Speaker 2: smart power supply.
- 4:37Speaker 1: Okay, so we have the pie, then the hat on top.
- 4:39Speaker 1: But wait, we need a screen to see what we're doing.
- 4:41Speaker 1: Where does that go?
- 4:42Speaker 2: Good question. The hat usually has pins that let you
- 4:45Speaker 2: stack another thing on top of it, like legos. So
- 4:47Speaker 2: you put a three point five inch touch screen display
- 4:50Speaker 2: right on top of the power hat.
- 4:52Speaker 1: Hold on three and a half inches. That is tiny.
- 4:54Speaker 1: That's smaller than my old phone screen. Can you actually
- 4:57Speaker 1: get any real work done on that?
- 4:58Speaker 2: It's tight? I'm not going to to pretend it isn't.
- 5:01Speaker 2: You are not writing code on this thing. The touch
- 5:03Speaker 2: input can be a little clunky.
- 5:05Speaker 1: So what's the point of it?
- 5:06Speaker 2: Then? The point is to have a dashboard you set
- 5:09Speaker 2: up your scripts and tools on a proper computer. You
- 5:12Speaker 2: load them onto the Pie and then you use the
- 5:15Speaker 2: tiny screen to launch them and check the status.
- 5:17Speaker 1: Ah, so it's a control panel, not a workstation exactly.
- 5:20Speaker 2: You press the go button on the little screen for
- 5:23Speaker 2: the initial setup, though you definitely want to plug in
- 5:25Speaker 2: a real USB keyboard.
- 5:27Speaker 1: Trust me, I can imagine trying to type a long
- 5:30Speaker 1: password on a tiny touch screen would be awful.
- 5:32Speaker 2: It is a special kind of torture.
- 5:33Speaker 1: Yeah, okay, so we have a full stack a computer,
- 5:36Speaker 1: but it's not a hacking machine yet. It needs its
- 5:38Speaker 1: special sensor. Right.
- 5:39Speaker 2: This is the absolute most critical part. If you get
- 5:42Speaker 2: this wrong, none of it matters. Yeah, we need the
- 5:45Speaker 2: Wi Fi adapter.
- 5:46Speaker 1: But the Pie three has Wi Fi built in. Why
- 5:48Speaker 1: can't we just use that? It would be so much neater.
- 5:50Speaker 2: It would. But the Wi Fi chip on the Pie
- 5:53Speaker 2: and on your laptop for that matter, is designed to be,
- 5:57Speaker 2: for lack of a better word, polite. It follows the rules.
- 6:01Speaker 2: It only listens to traffic that's specifically meant for it.
- 6:05Speaker 2: It filters out all the other conversations happening in the air.
- 6:08Speaker 1: And for what we're doing, we want all that other noise.
- 6:11Speaker 2: We want everything We need an external USB Wi Fi
- 6:14Speaker 2: adapter that supports two very specific modes. The first one
- 6:18Speaker 2: is called monitor mode.
- 6:19Speaker 1: Okay, break that down from him.
- 6:21Speaker 2: Monitor mode turns the Wi Fi card into a passive listener.
- 6:25Speaker 2: It grabs every single packet of data flying through the
- 6:28Speaker 2: air on a certain channel, no matter who it's for.
- 6:31Speaker 1: So it's basically eavesdropping on every Wi Fi conversation around it.
- 6:35Speaker 2: Precisely, the internal chip on the pie physically cannot do that,
- 6:40Speaker 2: so that's listening. The second mode is for talking or
- 6:43Speaker 2: shouting shouting. It's called packet injection. This lets our device
- 6:47Speaker 2: craft its own special packets and inject them into the
- 6:49Speaker 2: air to interfere with other conversations.
- 6:51Speaker 1: And why would you do that?
- 6:52Speaker 2: A classic security test is to send a deauthentication packet.
- 6:56Speaker 2: You pretend to be the WiFi router and you tell
- 6:58Speaker 2: someone's laptop, hey, disconnect.
- 7:00Speaker 1: My laptop just drops its connection.
- 7:01Speaker 2: It does, and then when it tries to reconnect, you're
- 7:05Speaker 2: sitting there in monitor mode listening, ready to capture that connection. Handshake.
- 7:09Speaker 1: Well, okay, that is a powerful combination. So I can't
- 7:12Speaker 1: just buy any USB Wi Fi adapter or off the shelf.
- 7:15Speaker 2: Absolutely not. This is the biggest mistake. Most cheap adapters
- 7:19Speaker 2: don't support these modes. You have to specifically look for
- 7:23Speaker 2: ones with compatible chipsets.
- 7:25Speaker 1: So do your homework before you buy.
- 7:27Speaker 2: You have to check the chipset, make sure it supports
- 7:29Speaker 2: monitor mode and packet injection.
- 7:31Speaker 1: Okay, we have our stack of parts, pie hat screen,
- 7:35Speaker 1: We've plugged on our special Wi Fi adapter. The physical
- 7:38Speaker 1: build is done. Now we need to give it a.
- 7:40Speaker 2: Brain right the operating system. And thankfully this part is
- 7:43Speaker 2: way easier than it used to be. We don't have
- 7:45Speaker 2: to build it from scratch.
- 7:46Speaker 1: We're not using the standard Raspberry pios.
- 7:49Speaker 2: You could, but then you'd spend days installing all the
- 7:52Speaker 2: security tools. Instead, we use a custom image like Hollilenox
- 7:56Speaker 2: or Parados.
- 7:56Speaker 1: And those come with all the hacking tools, pre install.
- 7:59Speaker 2: Everything you need. Network scanners, password crackers, wireless tools. It's
- 8:03Speaker 2: all ready to go right out of the box.
- 8:05Speaker 1: That's a huge timesaver. So how do we get that
- 8:08Speaker 1: onto our SD card.
- 8:09Speaker 2: There's a great little program called the Raspberry Pie Imager.
- 8:11Speaker 2: You download it to your main computer, plug in your
- 8:14Speaker 2: fancy new SD card with a reader.
- 8:15Speaker 1: And just point it at the Cali Linux file.
- 8:17Speaker 2: We download it pretty much. You select use custom, choose
- 8:20Speaker 2: the image file, and then you choose your SD card
- 8:23Speaker 2: as the storage destination. But and this is a big
- 8:27Speaker 2: butt uh oh, be very very careful which drive you select.
- 8:32Speaker 1: What happens if you pick the wrong one.
- 8:34Speaker 2: If you accidentally select the external hard drive with all
- 8:37Speaker 2: your photos on it, the imager will happily wipe it
- 8:40Speaker 2: completely and replace it with Linux ouch.
- 8:43Speaker 1: Okay, so public service announcement, Double check your drive letter,
- 8:48Speaker 1: maybe unblug everything else, just to be safe.
- 8:50Speaker 2: Please do. Once you hit right, it does its thing.
- 8:53Speaker 2: Takes a few minutes. Then you pop the card out,
- 8:55Speaker 2: slide it into your pie, and.
- 8:56Speaker 1: We power it on the moment of truth.
- 8:59Speaker 2: Yep, flip the switch, i'll the battery and you should
- 9:01Speaker 2: see a wall of text scroll by on that little
- 9:03Speaker 2: three point five inch screen, and then a full desktop
- 9:06Speaker 2: environment should appear.
- 9:07Speaker 1: Amazing. Yeah, and just like that, you have a real, working,
- 9:11Speaker 1: portable hacking machine.
- 9:13Speaker 2: You do, and the first thing you'll probably want to
- 9:15Speaker 2: do is get it connected to your Wi Fi and
- 9:18Speaker 2: enable ssh ssh secure shell. It lets you control the
- 9:22Speaker 2: pile remotely from your laptop, so you can leave the
- 9:24Speaker 2: little device sitting somewhere doing its job. While you type
- 9:28Speaker 2: comfortably on a big screen and keyboard.
- 9:30Speaker 1: Oh that's the way to do it. The best of
- 9:32Speaker 1: both worlds, for sure. So now that it's built, let's
- 9:35Speaker 1: circle back to what you can do with it on
- 9:36Speaker 1: your own network, of course.
- 9:38Speaker 2: Right ethically, Well, you can see things you've never seen before.
- 9:42Speaker 2: You can run a tool like wireshark and literally watch
- 9:45Speaker 2: the data leaving your phone, see what servers your apps
- 9:48Speaker 2: are talking to.
- 9:49Speaker 1: Making the invisible visible.
- 9:51Speaker 2: It really is. You start to understand that the Internet
- 9:53Speaker 2: isn't some magic cloud, it's just a bunch of computers
- 9:57Speaker 2: having very specific conversations. Yeah, and a lot of those
- 9:59Speaker 2: conversations they're happening in the open.
- 10:01Speaker 1: And seeing that deauthentication attack we mentioned, seeing your own
- 10:04Speaker 1: device get knocked offlines so easily must be an eye opener.
- 10:08Speaker 2: It is. When you see a device that costs less
- 10:10Speaker 2: than one hundred dollars to build, thiss erupt a smart device,
- 10:13Speaker 2: you suddenly start taking network security a lot more seriously.
- 10:16Speaker 1: It's empowering, but yeah, also a little bit.
- 10:18Speaker 2: Scary, and that cybersecurity in a nutshell, you have to
- 10:22Speaker 2: understand the attack to build a good defense. This project
- 10:27Speaker 2: is like your first day of class.
- 10:28Speaker 1: I love that. Okay, before we wrap, a quick review
- 10:31Speaker 1: question for everyone listening. We talked about a lot of hardware,
- 10:34Speaker 1: but one part was absolutely essential to make sure your
- 10:37Speaker 1: portable machine can actually perform network security tests. What are
- 10:41Speaker 1: the two specific features your USB Wi Fi adapter must support.
- 10:46Speaker 2: Think about the difference between just being a polite participant
- 10:49Speaker 2: and being able to hear everything and also interrupt and.
- 10:51Speaker 1: The answer is monitor mode and packet injection. If the
- 10:55Speaker 1: adapter you're looking at doesn't have those, it's not the
- 10:58Speaker 1: right tool for the job.
- 10:59Speaker 2: That's right. Without them, you've just built a very small,
- 11:02Speaker 2: very slow computer.
- 11:03Speaker 1: This has been awesome. I'm ready to go build one
- 11:05Speaker 1: right now.
- 11:05Speaker 2: It's a fantastic project. Just remember the Golden rule, learn
- 11:10Speaker 2: with it on your own networks. Be curious, but be ethical.
- 11:14Speaker 1: Great advice. Thanks for walking us through the build, and
- 11:17Speaker 1: to everyone out there, good luck with your projects. We'll
- 11:20Speaker 1: catch you on the next deep dive.