Latest / CyberCode Academy / Course 46 - CompTIA Cybersecurity Analyst | Episode 31: Detecting Attacks and Managing Federated Systems
Transcript
- 0:00Speaker 1: Have you ever been checking out on a new website
- 0:02Speaker 1: or maybe trying to access a new application and you're
- 0:05Speaker 1: faced with that dreaded multi-page signup form?
- 0:08Speaker 2: Oh, the absolute worst.
- 0:10Speaker 1: Right. But then right above it, you see that incredibly convenient,
- 0:14Speaker 1: beautiful little button that just says, log in with Facebook or,
- 0:17Speaker 1: you know, continue with Google.
- 0:19Speaker 2: It's so tempting.
- 0:20Speaker 1: It is. You click it, the screen flashes for a
- 0:22Speaker 1: microsecond and boom, you are in. It feels like magic.
- 0:26Speaker 1: But there is a massive, invisible architectural dance happening behind
- 0:30Speaker 1: the scenes.
- 0:31Speaker 2: Absolutely.
- 0:31Speaker 1: And when that dance misses a step, well, our entire
- 0:34Speaker 1: digital lives are left wide open. So today we are
- 0:37Speaker 1: doing a deep dive to explore the hidden mechanics of
- 0:40Speaker 1: digital identity.
- 0:41Speaker 2: It's a fascinating topic.
- 0:43Speaker 1: It really is. We are going to unpack how these
- 0:45Speaker 1: federated identity systems actually work step by step and how
- 0:49Speaker 1: cybersecurity analysts act as detectives to protect your identity from attackers.
- 0:53Speaker 2: Because, you know, it's an incredibly complex choreography of cryptography
- 0:57Speaker 2: and trust. Most of us, especially if you're building or
- 1:00Speaker 2: using these applications every day, we never give it a
- 1:02Speaker 2: second thought until the architecture breaks.
- 1:04Speaker 1: Exactly.
- 1:05Speaker 2: But understanding those mechanics, it really changes everything. Knowledge is
- 1:10Speaker 2: most valuable when it's actually understood.
- 1:12Speaker 1: Right. Right.
- 1:13Speaker 2: So by the end of this deep dive, I promise
- 1:15Speaker 2: you'll look at every single login screen in a completely
- 1:19Speaker 2: new way.
- 1:19Speaker 1: So here's our stack of notes for today. We'll start
- 1:22Speaker 1: with how organizations actually detect identity attacks using central monitoring.
- 1:27Speaker 1: Then we'll shift to the core concepts of federated identity,
- 1:31Speaker 1: break down the alphabet soup of technologies powering it, and
- 1:34Speaker 1: finally look at the nightmare scenario of what happens when
- 1:38Speaker 1: these systems get breached.
- 1:39Speaker 2: Sounds like a solid plan.
- 1:41Speaker 1: Okay, let's unpack this. Let's start by looking at how
- 1:43Speaker 1: organizations are detecting attacks against these systems in the first
- 1:46Speaker 1: place before we even get to the open web.
- 1:48Speaker 2: Right, the internal network.
- 1:49Speaker 1: Yeah. If you're billing out a security operations center, you
- 1:52Speaker 1: are relying on identity and access management systems, your IAMs,
- 1:57Speaker 1: but they don't just sit there in a vacuum. I'd
- 1:59Speaker 1: imagine that to actually detect a threat, you have to
- 2:01Speaker 1: ingest all those logs into a central brain.
- 2:04Speaker 2: That's the foundational step, yeah. All that identity data feeds
- 2:07Speaker 2: into a massive central hub called a SIEM.
- 2:10Speaker 1: A security information and event management system.
- 2:13Speaker 2: You got it. The SIEM is doing the heavy lifting
- 2:16Speaker 2: of log ingestion, normalization, and... parsing. It takes millions of
- 2:22Speaker 2: disparate authentication logs and translates them into a standardized format.
- 2:26Speaker 2: We can establish a behavioral baseline for your entire network.
- 2:29Speaker 1: So if the SIEM is constantly running correlation rules against
- 2:32Speaker 1: that baseline, I assume it's hunting for very specific behavioral
- 2:36Speaker 1: red flags, things like a user suddenly trying to escalate
- 2:40Speaker 1: their privileges or maybe a login attempt originating from an
- 2:44Speaker 1: employee who was terminated two weeks ago.
- 2:46Speaker 2: You're hitting on the exact right metrics. It's looking for
- 2:49Speaker 2: privileged account usage anomalies. So is a database administrator suddenly
- 2:54Speaker 2: pulling massive tables at 2 a.m. on a Sunday?
- 2:57Speaker 1: Which would be highly suspicious.
- 2:59Speaker 2: Exactly. The SIEM also monitors for separation of duty violations,
- 3:02Speaker 2: like if the same user account attempts to both submit
- 3:06Speaker 2: a vendor invoice and then cryptographically approve that same invoice
- 3:10Speaker 2: for payment.
- 3:10Speaker 1: Oh, wow. Yeah.
- 3:11Speaker 2: It's looking for the mathematical deviation from the established norm.
- 3:14Speaker 1: Okay. Let's unpack this reliance on mathematical deviation, though, because
- 3:18Speaker 1: it reminds me of a hypersensitive smart home alarm system. Okay.
- 3:22Speaker 2: I like that.
- 3:23Speaker 1: Yeah. So if I program my house to know that
- 3:25Speaker 1: my front door usually opens at 8 a.m. and 5 p.m.,
- 3:28Speaker 1: that becomes the baseline. Right. If the computer alerts me
- 3:31Speaker 1: that a door opened at 3 a.m., that's abnormal. The
- 3:34Speaker 1: computer flags that as a critical anomaly and sounds the alarm.
- 3:38Speaker 1: But what if it's just my teenager sneaking in? Does
- 3:40Speaker 1: the computer know the context?
- 3:42Speaker 2: I love that analogy. And no, it doesn't. That lack
- 3:45Speaker 2: of context is the absolute Achilles heel of purely automated defense.
- 3:50Speaker 1: Really? Yeah.
- 3:51Speaker 2: The SEAM can flag the anomaly, but it takes a
- 3:54Speaker 2: human analyst to apply what we call the rational sense test.
- 3:58Speaker 2: Active monitoring by human technicians is mandatory.
- 4:00Speaker 1: The rational sense test. I like that phrase.
- 4:02Speaker 2: It's crucial. Let's take your IT admin example. The SEAM
- 4:05Speaker 2: triggers a high severity alert because an admin account has
- 4:09Speaker 2: been executing root level commands for seven consecutive hours. To
- 4:13Speaker 2: the algorithm, that is a wildly dangerous deviation.
- 4:16Speaker 1: But the human analyst looks at the change management schedule
- 4:19Speaker 1: and realizes, oh, we scheduled a massive enterprise-wide server migration
- 4:24Speaker 1: for this weekend. Of course they're logged in executing root
- 4:27Speaker 1: commands all day.
- 4:28Speaker 2: Precisely the distinction. The computer just sees the math, but
- 4:32Speaker 2: the human understands the why. You need the human eye
- 4:36Speaker 2: analyzing the parsed logs to differentiate between a scheduled operational
- 4:41Speaker 2: marathon and and a compromised account laterally moving through your network.
- 4:45Speaker 1: Okay, so that handles the internal isolated fortress. We have
- 4:49Speaker 1: the SIM correlating the logs and the analysts applying the
- 4:52Speaker 1: rational sense test. Right. But the modern internet doesn't work
- 4:55Speaker 1: in isolated fortresses anymore. If you're developing a web app today,
- 4:59Speaker 1: you aren't building a proprietary login system from scratch.
- 5:02Speaker 2: Definitely not.
- 5:02Speaker 1: You're integrating third-party logins. Which brings us to the core mechanism,
- 5:06Speaker 1: federated identity systems. We are essentially moving the trust boundary
- 5:11Speaker 1: completely outside of our own organization.
- 5:13Speaker 2: It is a massive paradigm shift in network architecture. With
- 5:16Speaker 2: a federated system, you are entirely outsourcing the verification of
- 5:20Speaker 2: who a person is to a third party.
- 5:22Speaker 1: It makes me think of hiring an external, highly certified
- 5:27Speaker 1: background check company.
- 5:28Speaker 2: Okay, yeah.
- 5:29Speaker 1: If you're running a secure facility, you don't have the
- 5:32Speaker 1: time or resources to independently verify the birth certificate and
- 5:36Speaker 1: credentials outside of every single contractor who walks up to
- 5:39Speaker 1: the gate. Right.
- 5:40Speaker 2: That would take forever.
- 5:41Speaker 1: So you trust a recognized authority to thoroughly vet them
- 5:45Speaker 1: and issue a secure badge. When they show up at
- 5:48Speaker 1: your door, you aren't verifying them. You're just verifying the
- 5:51Speaker 1: authenticity of the badge.
- 5:52Speaker 2: That's a great way to visualize the mechanism of federated trust.
- 5:56Speaker 2: And to understand how that badge is checked in milliseconds,
- 6:00Speaker 2: let's step through the logic of the three distinct entities
- 6:03Speaker 2: interacting during that transaction.
- 6:05Speaker 1: Okay, I'd love to walk through the invisible flowchart happening
- 6:08Speaker 1: when you try to log in.
- 6:09Speaker 2: Let's do it. First, you have the identity provider, the IDP.
- 6:13Speaker 1: The giant holding the keys.
- 6:14Speaker 2: Exactly. This is your trusted background check company. The Google,
- 6:18Speaker 2: the Facebook, the LinkedIn, they hold the actual directory of
- 6:21Speaker 2: verified identities.
- 6:22Speaker 1: And the second entity would be the application or website
- 6:25Speaker 1: I'm actually trying to log into. Right.
- 6:28Speaker 2: Known as the reeling provider or the service provider, the RP.
- 6:31Speaker 2: They want to grant you access to their service, but
- 6:33Speaker 2: only after the IDP cryptographically vouches for you.
- 6:36Speaker 1: Got it.
- 6:37Speaker 2: And the third entity is you, the consumer, or the user,
- 6:40Speaker 2: operating through your web browser.
- 6:42Speaker 1: So let's trace the actual flow. I'm a user. I
- 6:45Speaker 1: navigate to a website, the Relaying Provider, and I ask
- 6:49Speaker 1: to log in with Facebook. What happens next?
- 6:52Speaker 2: The moment you click that button, the Relaying Provider runs
- 6:55Speaker 2: what's called a discovery phase over to the Identity Provider Facebook,
- 6:59Speaker 2: in this case. The RP is essentially asking, can you
- 7:02Speaker 2: authenticate this user and send me a trusted token?
- 7:05Speaker 1: So Facebook's servers take over.
- 7:07Speaker 2: Exactly. The IDP validates the request and asks you, the user,
- 7:11Speaker 2: to consent. Once you say yes, Facebook generates a secure
- 7:15Speaker 2: package of data containing authorized attributes like your name, your email,
- 7:19Speaker 2: your phone number.
- 7:19Speaker 1: And then it fires that package back to the Relink provider. Yes.
- 7:22Speaker 2: And the RP then immediately provisions a new account using
- 7:25Speaker 2: those authorized attributes.
- 7:27Speaker 1: It's just so seamless. I mean, no typing out long forms,
- 7:30Speaker 1: no creating new passwords to forget.
- 7:32Speaker 2: It's incredibly efficient. But if you're the architect building that
- 7:36Speaker 2: relaying provider application, you face a serious business decision. How
- 7:42Speaker 2: do you choose your identity provider?
- 7:43Speaker 1: I'd assume you just pick the biggest ones, right? Slap
- 7:47Speaker 1: a Google or Facebook button on there and call it
- 7:49Speaker 1: a day.
- 7:49Speaker 2: Well, that works if your business only cares about getting
- 7:52Speaker 2: a valid email address.
- 7:53Speaker 1: Yeah.
- 7:54Speaker 2: If you're running a simple forum or a newsletter... Google
- 7:56Speaker 2: or Facebook works perfectly fine to prevent spam.
- 7:59Speaker 1: Right.
- 7:59Speaker 2: But if the business needs to know you are exactly
- 8:01Speaker 2: who you say you are, say for a banking app
- 8:04Speaker 2: or a health care portal, they must use a heavily
- 8:08Speaker 2: vetted IDP, one that might require you to upload a
- 8:11Speaker 2: driver's license or a biometric scan.
- 8:14Speaker 1: That makes sense.
- 8:15Speaker 2: The convenience drops, but the cryptographic trust boundary is much stronger.
- 8:18Speaker 1: Here's where it gets really interesting, though, because these servers
- 8:22Speaker 1: aren't just magically trusting each other. They are communicating using
- 8:26Speaker 1: very specific protocols.
- 8:28Speaker 2: Yes, they are.
- 8:28Speaker 1: So we are going to decode the complex acronyms that
- 8:31Speaker 1: run the Internet without getting overwhelmed. The alphabet soup, as
- 8:35Speaker 1: it were.
- 8:35Speaker 2: Let's do it.
- 8:36Speaker 1: If I'm building an enterprise application, I'm likely going to
- 8:39Speaker 1: be utilizing SAML.
- 8:41Speaker 2: S-A-M-L.
- 8:41Speaker 1: SAML is the absolute standard in the enterprise space. It
- 8:44Speaker 1: stands for Security Assertion Markup Language.
- 8:47Speaker 2: Okay, so it's an XML-based language.
- 8:49Speaker 1: Exactly. It's the standard for single sign-on or SSO for
- 8:52Speaker 1: web apps. And it works completely invisibly. It relies on
- 8:57Speaker 1: passing authentication data between the identity provider, the service provider,
- 9:01Speaker 1: and the web browser, which acts as the user agent.
- 9:04Speaker 2: So it's essentially sending cryptographically signed XML envelopes between the servers.
- 9:09Speaker 1: That is the beauty of the protocol. It handles the
- 9:11Speaker 1: secure exchange seamlessly.
- 9:12Speaker 2: Okay, so SAMLL is our robust XML envelope for enterprise.
- 9:16Speaker 1: Mm-hmm.
- 9:17Speaker 2: But what about the modern API-driven web? This is where
- 9:20Speaker 2: we run into OAuth, specifically OAuth 2.0.
- 9:24Speaker 1: Right. OAuth was developed as an open source framework for
- 9:27Speaker 1: access delegation.
- 9:28Speaker 2: Access delegation, not authentication.
- 9:30Speaker 1: That is a critical distinction. SAML proves who you are.
- 9:34Speaker 1: OAuth proves what you are allowed to do.
- 9:35Speaker 2: Okay. Can you give me a practical example of how
- 9:37Speaker 2: that works?
- 9:38Speaker 1: Sure.
- 9:39Speaker 2: Let's say you're using a Yahoo login to access Flickr,
- 9:41Speaker 2: the photo sharing site. There are four distinct parties involved here.
- 9:46Speaker 2: The client. the resource owner, the authorization server, and the
- 9:49Speaker 2: resource server.
- 9:50Speaker 1: Wait, hold on. The website I'm visiting is called the client,
- 9:54Speaker 1: and I am the resource owner. That feels totally backwards.
- 9:57Speaker 1: Shouldn't I be the client?
- 9:58Speaker 2: What's fascinating here is how... the protocol defines value. In
- 10:02Speaker 2: the OAuth framework, your identity, your data, your photos is
- 10:07Speaker 2: the precious resource. Therefore, you are the resource owner.
- 10:12Speaker 1: Oh, wow. Okay.
- 10:13Speaker 2: You are the one who makes the ultimate decision on
- 10:14Speaker 2: whether the auth server, Yahoo, in this case, can grant
- 10:18Speaker 2: the client the which is the website, Flickr access to
- 10:21Speaker 2: the resource server.
- 10:22Speaker 1: That actually makes perfect sense when you frame it around
- 10:24Speaker 1: the data being the resource. I'm the owner of my data.
- 10:27Speaker 2: Exactly. It's a brilliant modular approach.
- 10:29Speaker 1: Okay, so we've got SAML and OAuth, but if we
- 10:31Speaker 1: shift our focus to corporate Windows-heavy environments, we run into
- 10:35Speaker 1: one more major acronym, ADFS.
- 10:38Speaker 2: Active Directory Federation Services. This is Microsoft's proprietary entry into
- 10:42Speaker 2: the game.
- 10:42Speaker 1: And how does that fit in?
- 10:44Speaker 2: It works very similarly to OAuth. but it operates as
- 10:47Speaker 2: the bridge between your internal corporate network and external cloud services.
- 10:52Speaker 2: It utilizes what we call claims.
- 10:54Speaker 1: Claims?
- 10:54Speaker 2: Yeah, claims that are matched to trust policies to make
- 10:57Speaker 2: authorization decisions. This is what allows your Microsoft account to
- 11:01Speaker 2: securely log in to multiple different services.
- 11:04Speaker 1: So what does this all mean? We've mapped out this
- 11:07Speaker 1: incredibly efficient interconnected web of trust. But if federated systems
- 11:12Speaker 1: are so great, What happens during a massive cyber breach?
- 11:15Speaker 2: This is the nightmare scenario.
- 11:17Speaker 1: Centralizing trust means creating a centralized target. What happens when
- 11:21Speaker 1: the underlying system breaks?
- 11:22Speaker 2: Well, the first step is checking the contract, if you
- 11:25Speaker 2: even have one.
- 11:26Speaker 1: What do you mean?
- 11:26Speaker 2: Well, open source tools like Google and Facebook don't offer
- 11:29Speaker 2: commercial contracts for this kind of federation. You're using it
- 11:32Speaker 2: at your own risk. Whereas an enterprise solution like ADFS
- 11:36Speaker 2: might have strict service level agreements.
- 11:38Speaker 1: Right. So if an IDP, like Facebook, gets hacked... What's
- 11:42Speaker 1: the chain reaction?
- 11:43Speaker 2: If their core directory gets compromised, they have two immediate jobs. First,
- 11:48Speaker 2: notify the account owners, the users. Second, notify the reeling providers,
- 11:53Speaker 2: the website owners, and dictate the required response, like forcing
- 11:57Speaker 2: password resets across the board.
- 11:59Speaker 1: This brings up a really tough real-world dilemma. Let's say
- 12:03Speaker 1: I run a popular online training platform. And I rely
- 12:06Speaker 1: entirely on Facebook logins to reduce friction for my users.
- 12:10Speaker 1: I wake up, I read the news, and Facebook is hacked.
- 12:13Speaker 1: As the relaying provider, what do I do? If I
- 12:15Speaker 1: disable Facebook logins to protect my site, I've just locked
- 12:19Speaker 1: out every single one of my students.
- 12:20Speaker 2: You have. It is the ultimate risk analysis dilemma. The
- 12:23Speaker 2: convenience of a single login across the internet creates incredible vulnerability.
- 12:28Speaker 1: It's terrifying when you put it like that.
- 12:29Speaker 2: As the relaying provider, you have to weigh the immediate
- 12:32Speaker 2: security risk of a compromised identity provider. against the operational
- 12:35Speaker 2: disaster of cutting off user access entirely.
- 12:38Speaker 1: So how do you survive that?
- 12:39Speaker 2: You have to engineer resilience. You might enforce very short-lived
- 12:43Speaker 2: access tokens, or, crucially, you implement a fallback local authentication method.
- 12:49Speaker 1: Oh, right, like forcing users to set up a backup
- 12:51Speaker 1: recovery email when they first join. Exactly.
- 12:53Speaker 2: If the IDP goes down, you route users to the
- 12:56Speaker 2: local recovery flow.
- 12:57Speaker 1: That makes total sense. Well, to recap our journey today.
- 13:01Speaker 1: We started with Symes looking for abnormal behavior and human
- 13:05Speaker 1: analysts applying that rational sense test. Right. Then we explored
- 13:09Speaker 1: the federated architecture of IDPs and RPs wading through the
- 13:12Speaker 1: alphabet soup of SAML, OO, and ADFS. And we ended
- 13:17Speaker 1: right down in the intense risk analysis of a massive breach.
- 13:21Speaker 2: It's a lot to take in, but to reinforce the knowledge,
- 13:23Speaker 2: I actually have a short mental exercise for you listening.
- 13:26Speaker 1: No, perfect. Lay it on us.
- 13:28Speaker 2: Next time you browse the web... And click a login
- 13:30Speaker 2: with button, pause for two seconds. Identify who is acting
- 13:33Speaker 2: as the identity provider, who is the relaying provider, and
- 13:37Speaker 2: ask yourself what happens to your access on this site
- 13:40Speaker 2: if that identity provider goes down tomorrow.
- 13:42Speaker 1: That is a great exercise, and it leaves me with
- 13:45Speaker 1: one final lingering question to build on that. We are
- 13:50Speaker 1: slowly centralizing our digital identities into the hands of just
- 13:53Speaker 1: two or three massive tech giants through these federated systems.
- 13:57Speaker 1: Are we creating the ultimate single point of failure for
- 14:01Speaker 1: our entire digital lives?
- 14:02Speaker 2: A chilling thought.
- 14:03Speaker 1: Something to mull over the next time you click that
- 14:05Speaker 1: magic little button. Thanks for joining us on this deep dive.