Latest / CyberCode Academy / Course 14 - Wi-Fi Pentesting | Episode 10: WPA Enterprise: Authentication, Evil Twins, and Credential Cracking
Transcript
- 0:00Speaker 1: If you've ever connected to Wi Fi at a big
- 0:02Speaker 1: company or a university, you've probably noticed it feels different
- 0:07Speaker 1: than at home. You're not looking for a password on
- 0:10Speaker 1: the back of a router right.
- 0:12Speaker 2: At home, you're using what we call a pre shared
- 0:14Speaker 2: key or PSK. It's simple, it's one password for everyone
- 0:18Speaker 2: in every device, your router checks it, and you're on
- 0:21Speaker 2: the network.
- 0:22Speaker 1: But that model just completely breaks down when you try
- 0:25Speaker 1: to apply it to say, a campus with thousands of students.
- 0:28Speaker 2: Oh absolutely, it's a management nightmare. Imagine one student's laptop
- 0:32Speaker 2: gets stolen. Now you have to change the password for
- 0:35Speaker 2: the entire university until every single person it's chaos.
- 0:38Speaker 1: So that's what we're here to unpack. This is a
- 0:41Speaker 1: deep dive into the solution for that problem, WPA Enterprise.
- 0:45Speaker 1: We're going to look at how it works, why it's
- 0:46Speaker 1: so much more secure, and maybe most interestingly, how determined
- 0:50Speaker 1: attackers still try to break it in.
- 0:52Speaker 2: And that gets to the heart of why it's so different.
- 0:54Speaker 2: The entire philosophy changes how so well WPA Enterprise just
- 0:58Speaker 2: gets rid of that single shared password entire it's gone.
- 1:01Speaker 1: So there's no master key exactly.
- 1:03Speaker 2: Instead, every single user has their own unique username and password.
- 1:08Speaker 2: And this is the critical part. That means each user's
- 1:11Speaker 2: traffic is encrypted with its own unique key.
- 1:14Speaker 1: Okay, that's a huge leap in security right there. If
- 1:17Speaker 1: my credentials get compromised, it doesn't affect you at all.
- 1:20Speaker 2: Precisely, and from a management perspective, it's a lifesaver. Someone
- 1:24Speaker 2: leaves the company, the admin just disables their one account
- 1:27Speaker 2: on a server done. The other ten thousand employees don't
- 1:30Speaker 2: even notice.
- 1:31Speaker 1: That centralized control is really the key innovation here.
- 1:34Speaker 2: It is it contains breaches immediately, which is just impossible
- 1:37Speaker 2: with that old PSK model where everyone shares the same secret.
- 1:40Speaker 1: So in my house, the router is the gatekeeper, it
- 1:44Speaker 1: checks the password. In this bigger enterprise world, who's the
- 1:46Speaker 1: bouncer who's actually checking all these unique credentials.
- 1:50Speaker 2: That's another big shift. The access point or the AP
- 1:52Speaker 2: or the box on the ceiling, it takes a step back.
- 1:55Speaker 2: It stops being the security guard, so.
- 1:57Speaker 1: It doesn't verify anything.
- 1:58Speaker 2: Nope, it basically becomes proxy. The middleman when you try
- 2:02Speaker 2: to connect, the AP just forwards your requests to the
- 2:05Speaker 2: real brain of the operation essential server.
- 2:08Speaker 1: And that server is usually what we.
- 2:10Speaker 2: Call a radius server. That's the entity that holds the
- 2:12Speaker 2: database of all users and passwords and makes the final call.
- 2:16Speaker 1: So if I can trace the flow, my laptop talks
- 2:19Speaker 1: to the access point, right. The access point doesn't decide anything,
- 2:22Speaker 1: It just passes my username and password up to the
- 2:24Speaker 1: radio server.
- 2:25Speaker 2: Exactly and importantly, this usually happens through a native log
- 2:29Speaker 2: inbox in your operating system, Windows, macOS, whatever, not some
- 2:34Speaker 2: clunky web page.
- 2:35Speaker 1: And this whole conversation is happening over a specific protocol.
- 2:39Speaker 2: Yes, it's all built on EAP, the Extensible Authentication protocol.
- 2:43Speaker 2: The radio server checks your credentials and if they're good,
- 2:46Speaker 2: it sends a message back to the access point saying okay,
- 2:48Speaker 2: let this person on. Only then do you get an
- 2:51Speaker 2: IP address and access to the network.
- 2:53Speaker 1: Understanding that architecture is it's vital because it immediately explains
- 2:58Speaker 1: why all the simple hacking tricks you hear about just
- 3:01Speaker 1: completely fail against these networks.
- 3:03Speaker 2: They really do. Let's take the first one, data sniffing.
- 3:06Speaker 2: On an open network, an attacker can just listen to
- 3:09Speaker 2: the airwaves and sometimes grab passwords sent in plain.
- 3:11Speaker 1: Text, but that won't work here because everything's encrypted from
- 3:14Speaker 1: the get go. Right.
- 3:15Speaker 2: Absolutely. Even if you capture the data, it's just encrypted gibberish.
- 3:19Speaker 2: It's useless without that user's unique temporary key for that
- 3:24Speaker 2: specific session.
- 3:25Speaker 1: Okay, so passive listening is out. What about a more
- 3:27Speaker 1: active attack like ARP spoofing, where an attacker tries to
- 3:30Speaker 1: get in the middle of the traffic.
- 3:32Speaker 2: That fails for a different reason. To launch that kind
- 3:35Speaker 2: of attack, the attacker has to already be on the network.
- 3:38Speaker 2: They need an IP address.
- 3:40Speaker 1: Ah, and they can't get on the network without a
- 3:43Speaker 1: valid username and password in the first place.
- 3:45Speaker 2: It's a classic chicken and egg problem for the attacker.
- 3:48Speaker 2: So passive sniffing fails because of encryption, and active network
- 3:52Speaker 2: attacks fail because of authentication, which means.
- 3:55Speaker 1: The attacker has to shift their focus. They can't break
- 3:58Speaker 1: the network's logic, so they have to go after the
- 4:00Speaker 1: human element exactly.
- 4:02Speaker 2: And that is where the evil twin attack comes in.
- 4:04Speaker 1: But not the basic one, right, Not the one where
- 4:07Speaker 1: someone just creates an open network with the same name
- 4:09Speaker 1: and throws up a fake login page.
- 4:11Speaker 2: No, that's too easy to spot for anyone who's used
- 4:13Speaker 2: to a corporate network. The login page looks wrong. There's
- 4:16Speaker 2: no little lock icon next to the Wi Fi signal,
- 4:19Speaker 2: it just feels suspicious.
- 4:21Speaker 1: So the sophisticated attack has to be much more convincing.
- 4:24Speaker 2: It has to be technically perfect. The attacker creates a
- 4:27Speaker 2: fake access point that is itself configured as a proper
- 4:32Speaker 2: WPA enterprise network. They even run a fake radio server
- 4:35Speaker 2: on their own attack machine.
- 4:36Speaker 1: That's brilliant. So they're not just copying the network's name
- 4:40Speaker 1: the SSID, they're copying its entire security behavior.
- 4:43Speaker 2: Yes, the goal is that when your device connects, it
- 4:46Speaker 2: thinks it's talking to a legitimate enterprise network and gives
- 4:49Speaker 2: you the prompts you expect to see.
- 4:51Speaker 1: So how do they pull that off?
- 4:52Speaker 2: First they usually force clients off the real network with
- 4:55Speaker 2: a deauthentication attack. Your device gets kicked off, it immediately
- 4:59Speaker 2: scans for a network to rejoin, and it sees one
- 5:01Speaker 2: with the exact same name, the evil twin. The evil
- 5:04Speaker 2: twin you can act and because the attacker has configured
- 5:07Speaker 2: it correctly, your computer doesn't see a weird web page.
- 5:11Speaker 2: It sees the normal native system log inbox asking for
- 5:14Speaker 2: your username and password.
- 5:16Speaker 1: So when you see every single day, so you just
- 5:18Speaker 1: type it in thinking the network just had a little hiccup.
- 5:20Speaker 2: And that's the whole game. This requires some specialized software,
- 5:24Speaker 2: of course, modified tools that can bundle an access point
- 5:27Speaker 2: and Radius server into one package.
- 5:29Speaker 1: But here's the catch, and I think this is the
- 5:31Speaker 1: crucial part. Because the attacker went to all the trouble
- 5:35Speaker 1: of making it look like a real WPA enterprise network.
- 5:39Speaker 1: The password is not sent in plaintext, correct.
- 5:43Speaker 2: They sacrifice the easy wind of a plain text password
- 5:46Speaker 2: for the believability of the attack by mimicking the real system.
- 5:51Speaker 2: They forced the connection into something called challenge response authentication.
- 5:55Speaker 1: Okay, let's break that down. Challenge response. What's happening under
- 5:59Speaker 1: the hood? When I type my password into that box?
- 6:01Speaker 2: Speak of it like this, Your machine says, he I'd
- 6:04Speaker 2: like to log in. The attacker's fake Radius server replies, okay,
- 6:07Speaker 2: prove it, and it sends your machine a random piece
- 6:10Speaker 2: of data called the challenge.
- 6:12Speaker 1: It's like a one time use puzzle.
- 6:14Speaker 2: A perfect analogy. Your computer then takes the password you
- 6:17Speaker 2: just typed in and uses it as a secret key
- 6:20Speaker 2: to solve that puzzle. It encrypts the challenge, creating a
- 6:24Speaker 2: unique response, and.
- 6:26Speaker 1: It sends that response back to the server. The password
- 6:28Speaker 1: itself never travels over the air.
- 6:30Speaker 2: Never but the attacker, who is a fake server, captures
- 6:34Speaker 2: three things, your username, the random challenge they sent you,
- 6:38Speaker 2: and the encrypted response you sent back.
- 6:40Speaker 1: And here's the deep dive moment, isn't it. The vulnerability
- 6:43Speaker 1: isn't in WPA enterprise itself, but in the specific type
- 6:46Speaker 1: of encryption used for that handshake.
- 6:48Speaker 2: That's the weak link in the chain. Very often, the
- 6:51Speaker 2: encryption used is an older protocol called net NLM version.
- 6:54Speaker 1: One wait NETMNLM. That sounds really old, like something from
- 6:57Speaker 1: old Windows networks. Why on earth is that still being
- 7:00Speaker 1: used in a modern corporate security system.
- 7:02Speaker 2: That's a fantastic question. It's a legacy component. Nlmv one
- 7:06Speaker 2: is an older hashing mechanism that got baked into some
- 7:08Speaker 2: of these EAP protocols because well, it was fast and simple.
- 7:12Speaker 2: It makes the login process very quick, but.
- 7:14Speaker 1: That speed comes at a cost.
- 7:16Speaker 2: A huge cost compared to modern hashing algorithms that are
- 7:20Speaker 2: deliberately slow and complex. Nlmv one is computationally brittle. It's
- 7:26Speaker 2: very very.
- 7:27Speaker 1: Fast to calculate, and if it's fast to calculate, it's
- 7:29Speaker 1: fast to crack.
- 7:30Speaker 2: Now you see the opening. The attacker has the user name,
- 7:32Speaker 2: the challenge, and the nlmv one responds hash. They have
- 7:36Speaker 2: everything they need to try and find the password offline
- 7:39Speaker 2: long after the attack is over.
- 7:41Speaker 1: So the final step is just a brute force calculation,
- 7:44Speaker 1: a dictionary attack exactly.
- 7:46Speaker 2: The attacker takes a massive word list millions of potential
- 7:49Speaker 2: passwords and feeds it into a cracking tool.
- 7:52Speaker 1: Let's walk through that logic. The tool takes the first
- 7:54Speaker 1: word from the dictionary, let's say password one two three.
- 7:57Speaker 2: Right, and it performs the exact same mathematic co operation
- 8:00Speaker 2: the real user's computer did. It uses password one two
- 8:03Speaker 2: three to encrypt the captured challenge string using that net
- 8:06Speaker 2: nlmv one formula, and.
- 8:08Speaker 1: That generates a hypothetical response hash.
- 8:10Speaker 2: Which it then compared to the actor response hash that
- 8:12Speaker 2: was captured from the user.
- 8:13Speaker 1: If they don't match, it moves to the next word
- 8:16Speaker 1: in the dictionary. But if they do.
- 8:17Speaker 2: Match, if they match, you found it. That's the user's password.
- 8:21Speaker 2: The tool just confirmed it, and tools like HASHCAD can
- 8:24Speaker 2: perform billions of these guesses per second.
- 8:26Speaker 1: It's such a multi layered attack. It goes from realizing
- 8:29Speaker 1: passive attacks don't work, to exploiting user trust to mimicking
- 8:35Speaker 1: a complex architecture all to capture one tiny crackable piece
- 8:39Speaker 1: of data.
- 8:40Speaker 2: It really connects all the pieces. WPA enterprise itself is strong,
- 8:44Speaker 2: but it can be tricked into using a weaker legacy
- 8:47Speaker 2: handshake protocol, and that's the foothold the attacker needs.
- 8:49Speaker 1: So for you listening, understanding this entire chain radius EAP
- 8:54Speaker 1: and especially that challenge respons vulnerability with NLMB one is
- 8:57Speaker 1: just critical. If you're managing or securing a network, you
- 8:59Speaker 1: have to understand how the most secure front door can
- 9:02Speaker 1: be bypassed if the lock is old.
- 9:04Speaker 2: It really demonstrates that a security system is only as
- 9:06Speaker 2: strong as its weakest link. In this case, it's that
- 9:09Speaker 2: initial handshake protocol.
- 9:10Speaker 1: Which brings us to our final thought. A question for
- 9:13Speaker 1: you to consider. Since this whole sophisticated attack ultimately relies
- 9:18Speaker 1: on a dictionary attack to crack the captured hash, what
- 9:22Speaker 1: is the single most effective defense a person or an
- 9:25Speaker 1: organization can use against it.
- 9:27Speaker 2: Think about what could make that final offline cracking step
- 9:30Speaker 2: fail even if the attacker successfully captures the hash.
- 9:35Speaker 1: Something to think about the next time you're connecting to
- 9:37Speaker 1: a corporate network. That's all the time we have for
- 9:39Speaker 1: this deep dive. We hope you feel a little more informed.
- 9:42Speaker 1: See you next time.