Latest / CyberCode Academy / Course 23 - WiFi Hacking with Raspberry Pi | Episode 7: Building a Digital Ghost on Raspberry Pi
Transcript
- 0:00Speaker 1: You know, there's this concept in physical surveillance called a
- 0:02Speaker 1: burn notice. Oh yeah, it's that awful moment when a
- 0:06Speaker 1: spy realizes their cover is just completely blown, right.
- 0:11Speaker 2: Their identity is compromised and they have to ditch everything
- 0:14Speaker 2: and just vanish instantly.
- 0:16Speaker 1: And in the physical world, that's messy, it's incredibly.
- 0:19Speaker 2: Dangerous, it's the worst case scenario.
- 0:21Speaker 1: But in the digital world, we're sort of obsessed with
- 0:23Speaker 1: this idea of operating without ever risking that burn.
- 0:26Speaker 2: Notice, of being in the system but not really being.
- 0:29Speaker 1: There exactly, of becoming a digital ghost. Welcome back to
- 0:33Speaker 1: the deep dive.
- 0:34Speaker 2: That's really the perfect term for it.
- 0:36Speaker 1: Today, we're looking at a stack of documentation that describes
- 0:39Speaker 1: how to build well the ultimate anonymity device.
- 0:42Speaker 2: And we're not just talking about using a VPN to
- 0:44Speaker 2: stream movies from another country. This is different.
- 0:47Speaker 1: No, this is a toolkit for penetration testers and let's
- 0:50Speaker 1: be honest, for hackers to scout a network without leaving
- 0:54Speaker 1: a single forensic footprint.
- 0:56Speaker 2: Because if you're a cybersecurity pro test, a bank, or
- 1:01Speaker 2: a journalist in a restrictive country, anonymity isn't just a feature,
- 1:05Speaker 2: it's life support.
- 1:06Speaker 1: It is if a defender can trace a packet back
- 1:10Speaker 1: to your home IP address or identify your hardware from
- 1:15Speaker 1: its m maky address.
- 1:17Speaker 2: The game is over, completely over.
- 1:19Speaker 1: You've basically left your return address at the scene of
- 1:22Speaker 1: the crime.
- 1:22Speaker 2: So the mission for this deep dive is to strip
- 1:25Speaker 2: away those return addresses. We've got a very specific set
- 1:28Speaker 2: of tools from the source material.
- 1:30Speaker 1: Or Raspberry Pie is the weapon of choice.
- 1:33Speaker 2: Right, So why the pie? Why not just a high
- 1:36Speaker 2: end laptop.
- 1:37Speaker 1: Because it's the perfect drop box. It's tiny, it's cheap,
- 1:40Speaker 1: it's totally inconspicuous.
- 1:42Speaker 2: You can just hide it somewhere.
- 1:43Speaker 1: Exactly, plug it into a network, tape it into a desk,
- 1:46Speaker 1: and walk away. If it gets found, you're out maybe
- 1:49Speaker 1: forty bucks, not two thousand for a laptop.
- 1:51Speaker 2: It's disposable tech.
- 1:52Speaker 1: Okay.
- 1:52Speaker 2: But the hardware is just the shell. We need the
- 1:54Speaker 2: software that makes it invisible.
- 1:56Speaker 1: And that's a triad of tools, the tour network, a
- 1:59Speaker 1: utility called proxy chains, and another one called the changer.
- 2:02Speaker 2: So it's like two layers of identity.
- 2:04Speaker 1: We have to hide, that's right. First you hide where
- 2:06Speaker 1: you are, that's your IP address. Tour in proxy chains
- 2:09Speaker 1: handle that.
- 2:09Speaker 2: And second, second you hide what you are. That's your
- 2:13Speaker 2: hardware's unique id mchanger handles that I.
- 2:17Speaker 1: Want everyone listening to. Just visualize this. Picture yourself at
- 2:21Speaker 1: a terminal, black screen, blinking cursor. Maybe you're connected to
- 2:27Speaker 1: that little pie hidden under a desk.
- 2:29Speaker 2: We're going to walk through this command by command.
- 2:31Speaker 1: But before we even think about anonymity, there's a golden
- 2:35Speaker 1: rule for any Linux system.
- 2:37Speaker 2: Right always, you have to update first. I know it
- 2:39Speaker 2: sounds boring and people want to jump to the cool
- 2:41Speaker 2: spy stuff.
- 2:42Speaker 1: But it's essential.
- 2:43Speaker 2: It is. If you build a security tool on outdated libraries,
- 2:46Speaker 2: you're building a fortress on a swamp. So the very
- 2:48Speaker 2: first thing you type is pseudo appt update.
- 2:51Speaker 1: Okay, let's pause on pseudo. We see it all the time.
- 2:53Speaker 1: It's basically running the command as an administrator right.
- 2:56Speaker 2: Pretty much it stands for super user do O. It
- 2:58Speaker 2: lets you override the system safety.
- 3:00Speaker 1: Rails and apped update. You said, that's not actually installing anything,
- 3:03Speaker 1: ye I get.
- 3:04Speaker 2: All you're doing is telling the package manager think of
- 3:07Speaker 2: it like the app store, for the command line to
- 3:09Speaker 2: go refresh its maps.
- 3:11Speaker 1: To make sure it knows where the latest software lives exactly.
- 3:14Speaker 2: So your map is now up to date.
- 3:16Speaker 1: Okay, map is updated. Now we need the cloak. We're
- 3:19Speaker 1: installing tour right.
- 3:20Speaker 2: With pseudo app to installed Tour.
- 3:22Speaker 1: But this is a really important distinction the documentation makes.
- 3:26Speaker 1: We're installing the Tour service, not the tor browser.
- 3:31Speaker 2: It's a huge distinction. Most people hear toll and they
- 3:33Speaker 2: picture the Onion browser for the dark web. Sure, but
- 3:36Speaker 2: Tour itself is a background service, a protocol. When you
- 3:40Speaker 2: run that command, you're not getting a browser window. You're
- 3:43Speaker 2: getting a background process that just opens a door to
- 3:46Speaker 2: the Tour network.
- 3:47Speaker 1: But just because the door is open, that doesn't mean
- 3:49Speaker 1: your traffic automatically goes through it precisely.
- 3:52Speaker 2: And that's the trap so many people fall into.
- 3:54Speaker 1: So I could have Tour running, but if I just
- 3:56Speaker 1: open a normal program, it'll bypass it completely.
- 3:59Speaker 2: Yep, it'll connect directly to the Internet. You're totally exposed,
- 4:02Speaker 2: and Tour is just sitting there doing nothing.
- 4:04Speaker 1: Which brings us to the glue that holds this altogether.
- 4:07Speaker 1: Proxy chains.
- 4:09Speaker 2: Pseudo appt install proxy chains. This is the enforcer.
- 4:12Speaker 1: The enforcer. I like that.
- 4:14Speaker 2: It's a tool that hooks into any program you tell
- 4:16Speaker 2: it to, and it forces that program's traffic through a
- 4:19Speaker 2: proxy in our case through our Tour proxy.
- 4:23Speaker 1: So it's like a wrapper. You wrap your command in
- 4:24Speaker 1: proxy chains and it hands the traffic off to Tour.
- 4:27Speaker 2: That's exactly what it does.
- 4:28Speaker 1: Okay, so we've installed the tools, but configuring them that's
- 4:32Speaker 1: where the real skill comes in.
- 4:34Speaker 2: This is where you separate the pros from the amateurs.
- 4:36Speaker 1: Yeah, we need edit the configuration file. That's pseudo nano.
- 4:40Speaker 1: It sets e proxychains dot com right.
- 4:43Speaker 2: And when you open that file, you're looking at the
- 4:45Speaker 2: rules of engagement for your traffic. It can look like
- 4:48Speaker 2: a wall of text if you're not used to it.
- 4:50Speaker 1: So let's walk through the key edits. The documentation highlights
- 4:54Speaker 1: a choice between dynamic chain and strict chain. Now, strict
- 4:57Speaker 1: sounds more secure, but we're told to turn it off.
- 5:00Speaker 2: That's a common misconception. Stric chain means your traffic has
- 5:03Speaker 2: to go through proxy A, then B, then C in
- 5:06Speaker 2: that exact order. Okay, but what happens if PROXYB goes offline,
- 5:11Speaker 2: which happens all the time on a volunteer network like.
- 5:13Speaker 1: Tour, your whole connection just dies.
- 5:15Speaker 2: Exactly, it's too brittle. So you comment out stric chain,
- 5:18Speaker 2: put a hash sign in front of it, and you
- 5:20Speaker 2: find the line for dynamic chain and uncomment that one instead.
- 5:24Speaker 1: So dynamic chain is the smarter option.
- 5:26Speaker 2: It's the resilient one. If a proxy in the chain
- 5:29Speaker 2: is dead, it just skips it and moves to the
- 5:31Speaker 2: next one. It keeps your connection alive.
- 5:33Speaker 1: That makes perfect sense, okay. Next up in the file
- 5:36Speaker 1: is a setting called random proxy. The advice is to
- 5:40Speaker 1: disable that too. Why wouldn't we want more randomness.
- 5:44Speaker 2: We do want randomness, but we want Tour to handle it,
- 5:47Speaker 2: not proxy chains. Enabling it here can sometimes create weird
- 5:51Speaker 2: loops or use proxies that aren't set up right.
- 5:54Speaker 1: So let Tour do its job right.
- 5:56Speaker 2: We want the chain to be managed dynamically, but in
- 5:59Speaker 2: a logical order, so hash out random proxy as well.
- 6:02Speaker 1: All right, So dynamic chain is on, strict chain and
- 6:04Speaker 1: random proxy are off. Now it's a school all the
- 6:07Speaker 1: way to the bottom the proxy list.
- 6:09Speaker 2: This is the bridge. This is probably the most critical
- 6:11Speaker 2: line in the whole file.
- 6:12Speaker 1: This is where we tell proxy chains where to send.
- 6:13Speaker 2: The data yep, and since we installed the Tour service
- 6:17Speaker 2: on our own machine, our local host, we need to
- 6:20Speaker 2: point it there. The IP for local host is always
- 6:22Speaker 2: one twenty seven point zero point zero.
- 6:25Speaker 1: Point one, and it needs a port number.
- 6:27Speaker 2: It does. The standard port for the tour service is
- 6:29Speaker 2: ninety fifty. So you add this exact line at the
- 6:32Speaker 2: very bottom socks five one twenty seven point zero point
- 6:36Speaker 2: one nine zero fifty.
- 6:37Speaker 1: Oh, hold on socks five, Why that specifically? Why not
- 6:41Speaker 1: soocks four or something else?
- 6:42Speaker 2: Oh, it matters immensely. SCKS four is older, and it
- 6:46Speaker 2: has a huge problem. It doesn't handle DNS requests very well.
- 6:50Speaker 1: And DNS request are the phone book look up? Right? Yeah,
- 6:53Speaker 1: my computer asking where's Google dot com?
- 6:55Speaker 2: Exactly? If you use an older protocol, you can get
- 6:58Speaker 2: what's called a DNS leak, a leak. Your web traffic
- 7:00Speaker 2: might be going through tour all encrypted, but your computer
- 7:03Speaker 2: could still be shouting out to your normal internet provider, Hey,
- 7:06Speaker 2: where can I find the shady website?
- 7:08Speaker 1: Oh? So your ISP know is exactly where you're going,
- 7:10Speaker 1: even if they can't see what you're doing.
- 7:11Speaker 2: It defeats the whole purpose. SOCKS five helps plug that
- 7:14Speaker 2: leak and make sure that even the phone book look
- 7:16Speaker 2: up happens inside the tunnel, so that SOCKS five part
- 7:18Speaker 2: is non negotiable.
- 7:20Speaker 1: That is a fantastic pro tip Okay, we save the file,
- 7:23Speaker 1: we exit nano, but we're not done.
- 7:25Speaker 2: We change the config, but the tour service is still
- 7:28Speaker 2: running on the old settings. We have to restart the
- 7:30Speaker 2: engine and the command for that pseudo service or restart.
- 7:34Speaker 1: Okay, the engine is humming. Can figure is locked in?
- 7:37Speaker 1: How do we drive this thing?
- 7:39Speaker 2: Well? Remember proxy chains is a rapper. You have to
- 7:42Speaker 2: put proxy chains before any command you want to anonymize.
- 7:46Speaker 1: So proxy chains Firefox or proxy chains end map followed
- 7:49Speaker 1: by a target. Exactly what does that actually feel like
- 7:52Speaker 1: when you're using it? Is it? Is it slow?
- 7:55Speaker 2: Oh? There is a tax for anonymity and that tax
- 7:58Speaker 2: is speed, So it's slow. It can be agonizingly slow.
- 8:02Speaker 2: I mean, think about it. Your request isn't going from
- 8:04Speaker 2: you to the target. It's going from you to a
- 8:07Speaker 2: server in Germany, to another in Singapore, to one in Kansas,
- 8:11Speaker 2: and then to the target.
- 8:11Speaker 1: So trying to run a huge noisy network scan through
- 8:14Speaker 1: this would be a bad idea.
- 8:15Speaker 2: You'd be there for a week, the connection would probably
- 8:18Speaker 2: time out. You have to be surgical, but the trade
- 8:21Speaker 2: off is worth it. To the target server, that traffic
- 8:24Speaker 2: is coming from a university in Kansas, not your pie
- 8:27Speaker 2: under the desk.
- 8:28Speaker 1: Okay, so our location is hidden. We are a ghost
- 8:30Speaker 1: in the wires. The software layer is solid, but we
- 8:34Speaker 1: still have a hardware problem.
- 8:36Speaker 2: We do.
- 8:36Speaker 1: Indeed, we've masked the IP, which is like the return
- 8:39Speaker 1: address on an envelope, but every single network card has
- 8:43Speaker 1: a serial number burned into it at the factory, the MSS.
- 8:46Speaker 2: Address, the Media Access control address. It's the literal fingerprint
- 8:49Speaker 2: of the hardware.
- 8:50Speaker 1: And it's not just a random number, is it. The
- 8:52Speaker 1: first half actually tells a story, it does.
- 8:54Speaker 2: It's the OUI, the organizationally unique identifier. The first few
- 8:58Speaker 2: characters of any ms address identify the manufacturer.
- 9:02Speaker 1: So if a sharp network admin sees a MSc address
- 9:04Speaker 1: that starts with B eight point twenty seven dot EB.
- 9:07Speaker 2: They don't just see some device. They say, hey, that's
- 9:10Speaker 2: a raspberry Pie foundation device.
- 9:12Speaker 1: And if you're trying to blend it on a corporate network,
- 9:14Speaker 1: a Raspberry Pie is a giant red flag.
- 9:16Speaker 2: It sticks out like a sore thumb. So we need
- 9:18Speaker 2: to change that fingerprint, and we use the tool a
- 9:21Speaker 2: changer for that.
- 9:21Speaker 1: The sources are really clear on a safety procedure here.
- 9:25Speaker 1: You can't change the tires while the car is moving correct.
- 9:28Speaker 2: You have to bring the network interface down first. If
- 9:31Speaker 2: you try to change the MAC while it's active, the
- 9:33Speaker 2: whole thing will just crash.
- 9:35Speaker 1: The command for that is pseudo if can fig willn down.
- 9:38Speaker 2: Yep, will in one is just the name of our
- 9:40Speaker 2: wireless card in this example. It might be different on
- 9:42Speaker 2: your system, so we shut it down.
- 9:44Speaker 1: Okay, the interface is down. Now we do the swap.
- 9:47Speaker 2: Now we run the magic command pseudom a changer at
- 9:51Speaker 2: tcr won one. That sr flag just means random, so.
- 9:55Speaker 1: It just generates a brand new, completely random MSc address.
- 9:59Speaker 2: A completely random string. It even uses a random manufacturer code.
- 10:02Speaker 2: So instead of a Raspberry Pie, the network now sees
- 10:06Speaker 2: who knows.
- 10:06Speaker 1: A device from a vendor that doesn't exist.
- 10:08Speaker 2: Or a toaster. The point is it breaks that identification link.
- 10:12Speaker 2: It removes the Raspberry Pie.
- 10:14Speaker 1: Signature, and then we just have to turn the card
- 10:15Speaker 1: back on.
- 10:16Speaker 2: Pseudo if can fig one one up, you bring it
- 10:19Speaker 2: back up and the local network a completely new, unknown
- 10:23Speaker 2: device just connected.
- 10:25Speaker 1: So when we put this all together, it's a very
- 10:29Speaker 1: complete disguise.
- 10:30Speaker 2: It's an entire identity swap from the network level to
- 10:33Speaker 2: the hardware level.
- 10:34Speaker 1: Let's zoom out why go to all this trouble with
- 10:36Speaker 1: text files and.
- 10:37Speaker 2: Commands because for a cybersecurity pro leaving a trace as
- 10:40Speaker 2: a failure, you're there to test if the system can
- 10:44Speaker 2: detect an unknown intruder.
- 10:46Speaker 1: If you show up wearing your own name tag, you're
- 10:48Speaker 1: not really testing anything.
- 10:49Speaker 2: You're just asking for permission. And it makes you realize
- 10:52Speaker 2: something pretty fundamental about the Internet. Identity is just it's
- 10:56Speaker 2: just a string of data. It's fragile. You are only
- 10:59Speaker 2: who your packets that you are.
- 11:00Speaker 1: That's a really provocative thought. With just a few commands,
- 11:03Speaker 1: you can choose to be anyone, or maybe more accurately,
- 11:07Speaker 1: you can choose to be no one at all.
- 11:09Speaker 2: That's the nature of the digital world.
- 11:11Speaker 1: Before we sign UF, I want to leave our listeners
- 11:12Speaker 1: with a little mental challenge, a review question.
- 11:14Speaker 2: Let's hear it.
- 11:15Speaker 1: I want you to visualize your terminal one last time.
- 11:18Speaker 1: You need to launch a Firefox browser session that is
- 11:21Speaker 1: completely anonymous, location and hardware. What are the three key
- 11:26Speaker 1: commands you'd type.
- 11:27Speaker 2: And think about the order physical hardware first, then the tunnel,
- 11:30Speaker 2: then the application.
- 11:32Speaker 1: We'll give you a second, no pressure, Okay, here's the answer.
- 11:34Speaker 1: Peek command one scramble a hardware, pseudom changer, reel on.
- 11:39Speaker 2: One ye new fingerprint.
- 11:41Speaker 1: Command two make sure the tunnel is fresh, Peuto service
- 11:44Speaker 1: to roll tour, restart.
- 11:46Speaker 2: Get it running on the latest config and.
- 11:48Speaker 1: Command three launch the app through the wrapper proxy chains Firefox.
- 11:53Speaker 2: And if you visualize that sequence, especially putting proxy chains
- 11:57Speaker 2: before Firefox, you are absolutely ready to disappear.
- 12:00Speaker 1: Thank you for diving deep with us into the mechanics
- 12:02Speaker 1: of digital anonymity. It's amazing how much power is hiding
- 12:06Speaker 1: in these simple text files.
- 12:07Speaker 2: It really is. Stay curious, keep learning and remember knowing
- 12:11Speaker 2: how to hide is also knowing how to find.
- 12:13Speaker 1: Absolutely Until next time, stay safe out there,