Latest / Blue Security / Lockdown Mode Success, Howler Cell, and Entra Conditional Access
Transcript
- 0:06Welcome to the Blue Security Podcast, a weekly podcast for
- 0:10information security defenders where we bring you discussions
- 0:13on best practices, tools, and implementation for enterprise
- 0:16security. Now here are your hosts for
- 0:19today's show, Andy JA and Adam Brewer.
- 0:22Welcome to this week's episode of the Luke's Security Podcast.
- 0:25I'm Andy, your host. I'm.
- 0:27Adam, your Co host. Today we're going to be talking
- 0:30about two things. The first topic is going to be
- 0:34Apple lockdown mode and how Apple released some statistics
- 0:39and stuff about how lockdown mode has actually never had a
- 0:42successful attack against it. And so we'll we'll get into
- 0:46that. And then the second one is about
- 0:49this whole phantom device attack where Entra ID or Azure AD,
- 0:54whatever, you know, that's a lot of the articles actually say
- 0:57Azure AD, which I thought was kind of funny.
- 0:59Yeah, I saw that too. But it's intra ID and and how
- 1:03there was a PRT token that was minted and bypass conditional
- 1:08access. And so that was all the rage.
- 1:10I saw that some chatter on Twitter and and certainly
- 1:13internally there are some folks asking about it as well as
- 1:15customers. So wanted to go through that
- 1:17attack and how it happened and how you can mitigate it.
- 1:21Before we get started, since we're going to be talking about
- 1:25Microsoft and you want to kick it off with a quick disclaimer.
- 1:29Yeah. And Andy and I both work for
- 1:32Microsoft and Field Security sales.
- 1:34We do this show outside of work. We're recording this Sunday
- 1:37night about 7:30 PM local time and we self fund the show.
- 1:41We do not accept accept sponsorships or any other
- 1:45income. This is purely a labor of love
- 1:47and we put our wallets behind it.
- 1:50So that said, the opinions you're about to hear expressed
- 1:53are those of Adam Brewer and Andy Jaw and do not necessarily
- 1:57reflect those of Microsoft Corporation.
- 1:59And with that, on with the show. OK, so let's talk about Apple
- 2:03Lockdown mode. I know that we have mentioned
- 2:07this before on the show, but let's just highlight it real
- 2:10quick in case you are unfamiliar with it.
- 2:12Lockdown mode is something that is built into the iOS operating
- 2:16system. It is opt in, so it's not
- 2:18enabled by default, but it is a system hardening feature that
- 2:24was introduced by Apple in 2022 specifically for high risk
- 2:29individuals. So think like if you're pressed
- 2:33in like or like ACEO or maybe, you know, C-Suite of a major
- 2:40company, probably like anyone in high level government, those are
- 2:44the people who probably would look at this.
- 2:47If you're working in a sensitive area or have some sort of
- 2:51secrets that you need to guard, these are the folks that are
- 2:53more susceptible and probably should look at it.
- 2:56It's really not for the average user, although it is available
- 3:00for anyone to use. And certainly like at
- 3:04organizations where you might think about this, this is
- 3:07something that you can enable for your users.
- 3:11So what it does is it dramatically shrinks the
- 3:15iphone's attack surface and the number of entry points that
- 3:19cyber criminal can exploit. It will disable and restrict
- 3:23features that are commonly abused in like spyware attacks,
- 3:27and also force attackers to develop far more complex and
- 3:31expensive techniques to even attempt a compromise on the
- 3:35phone. Apple designed it in direct
- 3:38response to commercial spyware vendors like the NSO Group,
- 3:42which they make the software Pegasus, if you've heard of
- 3:46that, into Lexa, which makers of the Predator and Paragon
- 3:50solutions who sell government grade hacking tools capable of
- 3:53silently compromising iPhones. O, why are we talking about
- 3:56this? Well, ALE has confirmed that
- 3:59after four years of this feature being around that no one using
- 4:04lockdown mode has been successfully hacked by spyware,
- 4:08or at least that they know of, I should say.
- 4:12And, and of course, like they're monitoring this pretty closely.
- 4:14So I, I would take Apple at its word for this one.
- 4:17Apple spokesperson Sarah O'Rourke stated that they were
- 4:20not aware of any successful mercenary spyware attacks
- 4:23against a lockdown mode enabled device.
- 4:26And that's really a meaningful milestone here.
- 4:29Apple has sent spyware compromised notifications to
- 4:32users in over 150 countries, so they really do have visibility
- 4:37into this threat. And independent researchers at
- 4:40Citizen Lab have documented at least 2 cases where lockdown
- 4:43mode actively blocked spyware attacks, once against NS OS
- 4:47Pegasus and once against Predator.
- 4:50And then in one more other document case, security
- 4:53researchers at Google found that spyware simply bailed out of its
- 4:56attack attempt when it detected lockdown mode, so attackers
- 5:00basically gave up rather than risk exposure.
- 5:04Apple's a cybersecurity expert, Patrick Wardell, call it one of
- 5:08the most aggressive consumer facing hardening features ever
- 5:12shipped. So if you're thinking about
- 5:15using this, and again, we've, we've talked about this before,
- 5:18but just kind of highlighting the trade-offs if you were to
- 5:21enable it. And This is why it's really not
- 5:24for everyone, but most message attachment types are blocked.
- 5:28So iMessage becomes a lot more limited.
- 5:31Any attachments beyond images are stripped.
- 5:33Link previews in messages are also disabled.
- 5:36So you'll need to copy and paste links manually into your
- 5:39browser. Webkit, which is Safari's
- 5:42rendering engine, features are restricted.
- 5:44Some websites might not even load correctly at all.
- 5:47Wired connections to computers or accessories are blocked.
- 5:50When the iPhone is locked, configuration profiles cannot be
- 5:54installed, which prevents certain MDM management Mobile
- 5:58Device management enrollment. Now we've mentioned this before,
- 6:02but it is worth noting that if the device is enrolled in MDM
- 6:08and then you enable lockdown mode, it will keep the MDM
- 6:13profile. However, when you enable
- 6:17lockdown mode, no additional MDM profiles can be added to the
- 6:23phone. So it's preventing any other,
- 6:25which is a common, you know, easy attack vector is just, you
- 6:29know, send someone a link and roll the phone and then you
- 6:32know, then you have it under management can do what you want.
- 6:34And then a couple of things like incoming FaceTime calls from
- 6:37unknown contacts are blocked and shared albums are removed from
- 6:40photos and new shared album invite invitations are blocked.
- 6:43So there is some trade off and and that is definitely felt if
- 6:48you're just a normal user, but for example, like if you're a
- 6:52journalist covering a war zone Aceover defense contractor or
- 6:56like a dissident activist, that friction might be worth it.
- 7:01So if you're in a high risk role, this is something that you
- 7:05would definitely want to look at.
- 7:06You just go to the settings under privacy and security and
- 7:09enable lockdown mode. It'll have some, you know, text,
- 7:12give you the the highlights of exactly what we told you, the
- 7:15trade-offs. And then you'll you'll make
- 7:18yourself much less inviting target for cyber attackers,
- 7:23Patrick. Wardle is that dude.
- 7:26He is the guru of Apple cybersecurity hosts the
- 7:31objective by the sea conference cybersecurity conference
- 7:35targeted at just Apple operating systems.
- 7:37Former champ employee friend of friend of the show Matthew Ward
- 7:41is is friends with Patrick and can speak to his chops.
- 7:45So when he says, quote, it's one of the most aggressive consumer
- 7:48facing hardening features ever shipped, he's not kidding, but a
- 7:52very effective, right. So there are significant
- 7:56trade-offs from a lot of these quality of life improvements
- 7:59we're comfortable with. But you can really limit a tax
- 8:03surface by giving those up and it makes really intelligent
- 8:06trade-offs as to what those are. It's amazing how much
- 8:10cybersecurity attack surface we just naturally accept for these
- 8:14quality of life improvements as opposed to have any more
- 8:17hardened operating system. But Apple gives you that choice.
- 8:20And Andy, I think you mentioned a lot of the personas where this
- 8:22makes sense. I'd extend it.
- 8:24If you're in the C-Suite and you're a Fortune 100 company,
- 8:27you should have this turned on. I am sure.
- 8:30I have no doubt Satya Nadella, our CEO at Microsoft has this
- 8:33turned on his iPhone as an example as well.
- 8:35He should, Sam Altman should have this turned on on his
- 8:38iPhone, even though he's not maybe Fortune 100 yet.
- 8:41I mean, being open AI, it's, it's important gig.
- 8:44There's lots of people this targets.
- 8:46If you're also a tinfoil hat aficionado, this is available to
- 8:49you as well. But you know, a great feature
- 8:52love it when that choice is put in the hands of users and great
- 8:56cybersecurity posture is available with literally a flip
- 8:59of the switch. So well done to Apple.
- 9:01We compliment them on their cybersecurity chops all of the
- 9:04time. There was a stupid and
- 9:07inaccurate meme for a very long time that Apple was only secure
- 9:10because it wasn't popular. Obviously today, with the very
- 9:13large popular popularity of iOS and its derivative operating
- 9:17systems, that's no longer a valid criticism.
- 9:20It turns out Apple's just good at cybersecurity.
- 9:22So, you know, credit where credit's due.
- 9:25And then, you know, going back to the quote from Apple
- 9:28spokesperson Sarah O'Rourke, Apple doesn't lie when they
- 9:33speak publicly and they tend to do less of what I call corporate
- 9:37weasel language than a lot of other orgs where they will say
- 9:40something that is, if you parse it like an attorney, factual but
- 9:44not really honest. Apple doesn't do that.
- 9:47They kind of say what they mean. And so when Apple just comes out
- 9:50and says they're not aware of any successful mercenary spyware
- 9:53attacks against a lockdown mode enabled Apple device, that's
- 9:56what they mean. Now, again, there are qualifiers
- 9:59in that statement. They're specifically saying
- 10:01mercenary spyware. What's not mercenary spyware?
- 10:05I mean, you can make that distinction.
- 10:06You can also say they're not aware.
- 10:08Well, they can't talk about it if they're not aware of it.
- 10:11So of course there could be a text they're not aware of.
- 10:13Fine, sure, you could poke holes in that statement, but if you
- 10:16just take it at face value, it's still impressive.
- 10:18So hey, well done, Apple. You know, we talked about kind
- 10:20of doom and gloom sometimes in cybersecurity a lot.
- 10:24It's great to acknowledge where we're getting things right and
- 10:27where things are going well. So well done to them.
- 10:29OK, so on to our second topic or second and final topic here.
- 10:34There was a lot of talk about this whole phantom device
- 10:38attack, so let's kind of dive into it before we get started.
- 10:42This deals with something called the PRT, which is the primary
- 10:45refresh token. So I want to take a few moments
- 10:48to just talk about what the PRT is.
- 10:51Essentially, it's an extremely powerful authentication artefact
- 10:55that is in Windows or Azure. It's like a master key to your
- 11:00identity and so when Windows, when a Windows device is joined
- 11:05to Azure AD or Intra ID today, it gets issued APRT.
- 11:11That token is then. Hold on, before you go further,
- 11:14I want to clarify because the way you worded it is open to
- 11:18interpretation so I'll just be crystal clear.
- 11:20PR TS apply both to hybrid join as well as intra join devices.
- 11:27Both scenarios you get PR TS issued to the device.
- 11:30So if you are hybrid joined, which if you're not familiar
- 11:33with means you're still on premises domain join to Active
- 11:36Directory domain services and then you also have kind of a
- 11:40registration, not a full join to enter ID as well.
- 11:44That's hybrid join. And then there's also just enter
- 11:47join, which means your primary and only device identity is tied
- 11:53to enter ID. There is no relationship with
- 11:56Active Directory domain services on premises, it's a cloud joined
- 11:59device. Effectively both scenarios get
- 12:01PR TS. Just wanted to clarify that
- 12:04continue. Correct.
- 12:05So what I should should have said it's, it's also if an Entra
- 12:10registered device happens because ENTRA registered devices
- 12:14also get PRTS. So it's an artefact that lives
- 12:18anytime you've authenticated successfully on a device to
- 12:22ENTRA, whether it's joined or or registered, the device will get
- 12:27APRT. And so that that's issued, it
- 12:30sits on the device is then used to obtain access tokens for your
- 12:36cloud resources like Office 365, SharePoint, Azure, so on and so
- 12:41forth without you having to re authenticate each time.
- 12:45Very different than like a browser 'cause it's, it's
- 12:50similar to like a token that gets issued in the browser, like
- 12:53a session token, which then you would exchange for access
- 12:56tokens. But this one sits at the device
- 12:59level, so specific to Windows. And it's the mechanism that's
- 13:04that really is responsible for single sign on across any
- 13:08Microsoft service on a Windows device.
- 13:11The PRT does carry a cryptographic device claim.
- 13:15So it says like this, is this access coming from a trusted
- 13:19compliant device? Conditional access policies can
- 13:23use those claims to decide whether or not to allow access
- 13:26or deny access. And in a normal, healthy
- 13:29environment, the PRT is hardware bound, which means that it's
- 13:33stored on the TPM chip, which makes it extremely difficult to
- 13:37steal or fake. So the problem here is what
- 13:42happens if you can generate a PRT for a fake device.
- 13:47Andy, I'm going to nitpick one thing.
- 13:48APRT does not say a device is compliant.
- 13:52OK, that's fair. This is where like being precise
- 13:57with the language matters and we'll get into this more a
- 13:59little bit as we go through it. Sometimes there's misconceptions
- 14:03around a registered device, a recognized device that's part of
- 14:08our organization is not equivalent to is compliant and
- 14:13we'll we'll unpack that later. But I just want to put him pin
- 14:16in that one point. APRT could say this device is
- 14:20from your organization and you can trust it, but it doesn't say
- 14:25this is past point in time at a station right now.
- 14:28All of these variables that you're looking for are set to
- 14:31this way. The PRT itself doesn't do that.
- 14:34So we'll, we'll unpack that more in a moment, but I just want to
- 14:37put a pin in that point. And it's, it's easy to slip on
- 14:40the language there and, and we'll figure out, you'll
- 14:42understand why in a little bit. So it's a little teaser for us.
- 14:46We go through the rest of this. Yeah.
- 14:48Thank you for that call. That is absolutely correct
- 14:50there. OK.
- 14:51And then the other thing I wanted to touch on is device
- 14:54code flow because that was also abused in this attack.
- 14:58So if you haven't heard about device code flow, just a real
- 15:01quick explanation of what that is.
- 15:03It's O auth 2 point O authentication that originally
- 15:07was designed for devices that can't easily display a browser
- 15:11or accept keyboard input. So a really good way to just
- 15:15understand this is like when you authenticate to Netflix for like
- 15:20your Apple TV and that has like AQR code.
- 15:23Disney Plus, Paramount Plus, Hulu, you name it.
- 15:26HBO Max, all of them authenticate with that.
- 15:30Device code flow, Yep. And so that also works for
- 15:34Microsoft because like, you know, there used to be like
- 15:37Surface devices or really any device, there's like a, there's
- 15:41AO auth standard that allows you to authenticate to Microsoft
- 15:46services on a device that you can't type or you can't, you
- 15:51know, have a browser display so that you can go login.
- 15:54So for example, then you can like generate a short code and
- 15:57say go to microsoft.com/devicelogin.
- 16:00Then they go to their phone, you know, go to that and bring up
- 16:03the browser and then it flows that authentication over to the
- 16:07device, like ATV or signage or something that then will log
- 16:11them in. There's a security risk to this
- 16:14because this flows target from the device registration service
- 16:18endpoint rather than the standard token endpoint, meaning
- 16:21conditional access policies that normally guard the logins on the
- 16:25device don't automatically intercept it on the new device,
- 16:29that is. And then secondly, it's heavily
- 16:31abused in phishing. So an attacker can generate the
- 16:33device code themselves, then send a convincing e-mail to a
- 16:37victim, and then the e-mail will then the victim will then enter
- 16:40the code thinking that they're verifying the account and the
- 16:43attacker's machine then receives the access token.
- 16:47So in in this attack that we're going to be talking about,
- 16:51device code flow was the pivot where the authentication path,
- 16:54the conditional access wasn't blocking, which then opened the
- 16:57door to everything else. So let's talk about the attack
- 17:02chain and why, you know, everyone was like, well,
- 17:05conditional access was bypassed and you know, it's there's a bug
- 17:09or whatever it is, right? And so there were some
- 17:12researchers from Holler sell Sideris that conducted an
- 17:16authorized red team operation against a production tenant with
- 17:20over 16,000 users and 78 conditional access policies.
- 17:25They did start with a single set of valid credentials.
- 17:28So that's kind of important, which is usually the kind that
- 17:32is available on a criminal market or something like that
- 17:36for a few $100. But with that they were able to
- 17:40achieve full global administrator access.
- 17:43And how did they do that? Well, first they they tried the
- 17:47direct authentication, they tried the stolen credentials,
- 17:49which was blocked via conditional access.
- 17:51So that did its job. But then they pivoted using
- 17:56Oauth flow. So the the standard resource
- 17:59owner password credentials ROPC grant was also blocked.
- 18:04But the device code flow which targets the device registration
- 18:08and service endpoint rather than the normal token endpoint was
- 18:12not intercepted. So the tenant that they attacked
- 18:15actually did have a policy specifically designed to block
- 18:19device code flow. This is part of Enter a
- 18:22conditional access. There's a check box for device
- 18:26code flow and you can just check that as a condition and then the
- 18:29access you can block. But in this case it was sitting
- 18:33in report only mode, so it logged the attempt, but it
- 18:37didn't do anything else, so the token was actually obtained.
- 18:41Coincidentally, this is also kind of the same entry vector
- 18:44that Storm 2372, which is a suspected Russian state aligned
- 18:49threat actor has been exploiting at scale since August 2024.
- 18:54And they target governments, defense contractors, healthcare
- 18:58and critical infrastructure in Europe and North America.
- 19:02So once they had the valid token.
- 19:05Let's just pause there 'cause I, I'm going to every time you go
- 19:09through these, I'm going to pipe in and say, OK, device code flow
- 19:12should be blocked. If you are not blocking it for
- 19:15every possible scenario except carve outs for only the
- 19:18scenarios where you must leave it enabled, go and do turn off
- 19:21this podcast. Go and block it right now.
- 19:24Like listeners like I'm going to keep jumping and I'm like, this
- 19:26is bad. Go fix this.
- 19:28Here's your first one, device code flow locked unless you must
- 19:32have it and only allowed for scenarios you had it, had the
- 19:36organization done that. And this is in Microsoft
- 19:39documentation. This is documented as Microsoft
- 19:42recommends you disable this. The attack does not continue, so
- 19:45there's your first chance to prevent this attack.
- 19:47Continue, Andy. OK.
- 19:49Yeah. Thanks.
- 19:49Thanks for jumping in there. Yeah, well, I just want to hit
- 19:52him as we go instead of after in this case.
- 19:55Great, I love it. So once they had that valid
- 19:58token because, you know, device code flow wasn't blocked, they
- 20:02were able to hit the Device Registration Service API and
- 20:06that's called the DRS. The DRS validates the token, but
- 20:09it does not verify that the caller is a real Windows
- 20:13machine. So it's just the token itself.
- 20:16And so using a single command on a Linux laptop with no physical
- 20:20hardware, no TPM chip, no admin approval, they were able to
- 20:24register a completely fake phantom device.
- 20:27So entry ID issued a fully signed certificate and private
- 20:31key indistinguishable from legitimate corporate endpoint.
- 20:36So what should have happened is, you know, in general you can
- 20:41enable MFA for device registration.
- 20:45So if I try to register a new device under a user, it will
- 20:50prompt me for MFA and the users. This organization again had a
- 20:56policy requiring MFA for device registration, but again it was
- 21:01in report mode, report only mode.
- 21:04So it logged the registration but it blocked nothing.
- 21:08OK, here I'm jumping in again. You just hit it, but I want to
- 21:12clarify this point a little more.
- 21:13There is a setting, an enter ID where you can say require MFA
- 21:18for device registrations to do an enter ID registration or an
- 21:21enter ID join. That is the second layer of
- 21:25protection. The first layer should just be.
- 21:27You don't allow anyone to authenticate ever without multi
- 21:31factor authentication. So to be clear, Microsoft's
- 21:34guidance is absolutely you should do MFA 100% of the time
- 21:38no matter what. And if you're going to ignore
- 21:40that, then at least let me implore you require MFA for all
- 21:44device registration. Somebody should not be able to
- 21:46enroll a device with just a username and password.
- 21:49That should never ever be allowed.
- 21:51So there is your second opportunity to block this
- 21:54required MFA org wide or at a bare minimum if nothing else, if
- 21:59you can't go get MFA deployed tomorrow, turn on MFA for device
- 22:02registration tomorrow. And I don't care if you break
- 22:04stuff at that point like it should absolutely positively be
- 22:07on. There is your second chance now
- 22:09to block this attack. And while this doesn't
- 22:12necessarily block the attack, it does give some warning, which I
- 22:17would say just as a like a sub bullet here, you should have
- 22:21some sort of notification when a new device is registered under a
- 22:26user. So at Microsoft, whenever I
- 22:31register a new device, I get an e-mail and my manager gets an
- 22:35e-mail. And it's standard security
- 22:37practice now to, for the manager to verify, obviously, like I'm
- 22:42a, I'm a, you know, security technical guy.
- 22:45So I'm tinkering with devices and joining them all the time
- 22:48and re wiping. And so my managers getting these
- 22:50emails, I just normally preemptively like send them the
- 22:53e-mail and say, Hey, this was me on a Saturday, just, you know,
- 22:58re wiping my device or whatever, right?
- 23:00I explain what it is till I give a little context.
- 23:03Yeah. And so, but if if I don't say
- 23:06anything that the standard SOP is for the manager to e-mail the
- 23:12employee and say, hey, what happened here?
- 23:14Is this you? So that's just kind of another
- 23:16checks and balance type of deal. And in fact, I think it was
- 23:19what's the security company that Google acquired that does all
- 23:24the Mandiant, Mandiant. Yeah.
- 23:26So Mandiant I think was hacked a few years ago or something like
- 23:30that. And the reason why they even
- 23:32went into the investigation was the attackers registered a
- 23:35device and they had an e-mail sent to that employee and the
- 23:39employee was like, I didn't register a device and they
- 23:42kicked off the investigation and that's how they found out that
- 23:45they were hacked. And so this is this is important
- 23:48here. So obviously require MFA and
- 23:50then a sub bullet. Even if you do that, you should
- 23:53have some sort of notification which would might trick up
- 23:56tripsome flags that you would know.
- 23:59So now that they had the phantom device certificate that was
- 24:03issued, the researchers were able to request a primary
- 24:07refresh token, the PRT, which emulates what Windows does
- 24:10during a normal user sign up. And that PRT was then they saved
- 24:16it in a plain text file on the Linux desktop.
- 24:18So when they exchanged for an access token, the token carried
- 24:24the the user, the password and the device ID claim, which was
- 24:29the cryptographic proof that the conditional access uses to
- 24:31evaluate device trust. Those same credentials were then
- 24:34triggered on a direct login, then sailed through every policy
- 24:38requiring A compliant or enter a join device.
- 24:41So I I want to pause there, yeah.
- 24:43Andy, I knew you wanted to. Because and, and I read the
- 24:47Sedaris report and by the way, this has been reposted and
- 24:50paraphrased by all these junkie cybersecurity blogs with a
- 24:53billion ads on them. I went and read the actual Howl
- 24:57or cell report. And this part is a little
- 24:59unclear, but this is where I want to add a little more
- 25:02commentary as well because I think I know what happened here
- 25:05and they're playing a little bit with the language, I think, and
- 25:07being a little imprecise. So I'm going to be very precise.
- 25:12There are two options when you configure a conditional access
- 25:15policy that are relevant in this case.
- 25:18There's more options but I'm focusing on 2/1 of them says
- 25:21Require hybrid join device. One of them says require
- 25:26compliant device and those seem very similar and they're even
- 25:31right next to each other in the list.
- 25:33They could not be more different and this is what I was earlier
- 25:37in the conversation. Require hybrid join device is
- 25:41just looking for that primary refresh token with that
- 25:45cryptographic proof of device trust that the device is hybrid
- 25:50joined. So all it's checking is are you
- 25:53and does the device respond and say yes I am joined to your
- 25:57domain and I've received a primary refresh token I am a
- 26:00trusted device. It is explicitly not checking
- 26:05the device compliance that is a different thing It is point in
- 26:10time attestation. It is substantially weaker from
- 26:15a trust perspective then require compliant device.
- 26:20So just want to put that out there.
- 26:22I believe this tenant was configured for that based on my
- 26:26read through of the Howler cell report.
- 26:28It's a little unclear but I think the tenant was configured
- 26:31for require hybrid join device. I don't believe it was set to
- 26:35require compliant device because require compliant device.
- 26:40What that is looking for is, is this device enrolled in Intune?
- 26:45Is there a compliance policy assigned to the device?
- 26:48Has it successfully completed the compliance policy?
- 26:52Does it show all green check marks effectively?
- 26:55Often times you can configure there to be some sort of grace
- 26:59period where the device won't get kicked off if it's not
- 27:02compliant until a certain number of hours have passed.
- 27:05You allow some time for evaluation of that compliance
- 27:08policy to complete when a device is initially enrolled.
- 27:11They don't talk about that at all in this reporting, but that
- 27:15certainly could be a risk as well where a device gets
- 27:17enrolled and is able to do something before it's
- 27:20determined. Hey, this isn't even a Windows
- 27:22device, this is Linux like what's going on here, but
- 27:26compliant device is the one that will look for like what is the
- 27:28current risk profile of Defender for endpoint?
- 27:31Is BitLocker enabled? Is the password a certain
- 27:34length? Is the version number this or
- 27:36greater? Is this feature turned on?
- 27:39Is that feature enabled? So on and so forth.
- 27:41That's what a compliance policy is.
- 27:43So I believe what they're saying here, and again, this is
- 27:46unclear. This tenant was not configured
- 27:49for compliance evaluation being required to authenticate.
- 27:53It was configured for hybrid join.
- 27:55And a lot of people in their minds see those as these are the
- 27:57same thing. They're not.
- 27:59The other thing I want to point out, and this also trips people
- 28:02up all the time, There is no conditional access policy for
- 28:08require enter join. There's no way to check for that
- 28:12at all. Maybe there is a way to check
- 28:14for, I shouldn't say in speaking such absolutes, but from a
- 28:17conditional access perspective, that's not what you look for you
- 28:21at that point. If it's enter join, you're
- 28:23checking the Intune compliance and enter join.
- 28:25Remember that's the fully cloud joined model, not that hybrid
- 28:29model where you have the on premises join and the cloud
- 28:32registration component. So that's what I think happened.
- 28:36Little unclear. Andy, you can go through the
- 28:38rest of the story, but I think also potentially now this is
- 28:42where there's little shade of grey.
- 28:44I think an opportunity to harden your posture cause most
- 28:47organizations today, I think are still configured for require
- 28:51hybrid join device, whereas I would much rather see you
- 28:55require compliant device. Compliant device is ongoing
- 28:59point in time attestation. That device could be healthy and
- 29:03then it could become unhealthy. And when it becomes unhealthy,
- 29:06it gets evicted from the tenant, you know, temporarily, like you
- 29:09lose your access until you remediate the thing that's not
- 29:12compliant. So it's much more powerful
- 29:15versus point in time out of station.
- 29:18At one point, we trusted this device.
- 29:20And by the way, a lot of competitive ID.
- 29:22PS I'm looking at an Octus direction.
- 29:24They're all point in time at a station.
- 29:26Their device trust model is I have dropped a cert on this
- 29:28device. I now trust it forever.
- 29:30As long as that cert is there, I don't really care about the
- 29:32health of the device. And that's where Entra and
- 29:35Intune are differentiated. Is that ongoing at a station?
- 29:38But a lot of orgs even to this day still are not availing
- 29:42themselves to it. So even if you're still like
- 29:45we're still a configuration manager shop SECM till it the
- 29:48heat death of the universe. Fine.
- 29:51You can still enable Co management with Intune and you
- 29:54can still delegate some compliance checking to Intune,
- 29:58or you can still keep compliance checks in configuration manager
- 30:02and just make Intune aware of them with Co management as well.
- 30:05There's different options for configuring that, but either way
- 30:08you should move to this model of looking for compliant device as
- 30:12opposed to just point in time at a station.
- 30:14At this point, there's really kind of you're running out of
- 30:16reasons not to, but it's it's unclear, but I'd be willing to
- 30:20bet if this tenant were configured with require
- 30:22compliant device, this also potentially stops this attack
- 30:25here. That's my opinion.
- 30:27That part's a little unclear and it's because most people are
- 30:31just not super fluent in the minutia and differences here.
- 30:36But you, dear listener, now are because you listen to the Blue
- 30:38Security Podcast. Yeah, I I looked at multiple
- 30:43reports on this and what you're saying is correct.
- 30:46And I think the reason why it's confusing is because a lot of
- 30:50the reporting uses the word compliant and how I minced it in
- 30:54the beginning just like like you were.
- 30:56When you use the word compliance it means there's a compliance
- 30:58policy. But if you are just checking for
- 31:01a hybrid joined, that doesn't actually trick trigger a
- 31:05compliance check. It just checks the conditional
- 31:08access policy and it says, Hey, you're good here and you're good
- 31:12to go. I, I like to equate that to, I
- 31:14use like an analogy of like a, like a concert, right?
- 31:18Like I'm checking my credentials, I have a ticket, I
- 31:21go into the concert and that's, that's it.
- 31:23Like that's the, that's the hybrid join.
- 31:26I, I check to see if I have a ticket, I'm in.
- 31:28That's it. The compliance check is like,
- 31:30OK, well, now I'm inside the concert and I try to do some bad
- 31:33things, right? Like maybe I get too drunk.
- 31:35Well, then the security guard comes and, and says, hey,
- 31:38you're, you're doing some bad stuff.
- 31:39I'm going to toss you out. And so that's that continuous
- 31:42attestation, which is a compliant device where we're
- 31:46continually checking like, hey, OK, you're, you're a little bit
- 31:49drunk. OK, that's fine.
- 31:51You're low risk right now. But all of a sudden you, you
- 31:53start to get really, really drunk.
- 31:55Now you're high risk. OK, now we're going to kick you
- 31:57out. Right.
- 31:58I like the analogy. Absolutely perfect.
- 32:00Yeah. You scan the ticket, you're in
- 32:01like we let you in. And and if you're at, you know,
- 32:05some festival where they're not really enforcing much of
- 32:07anything, that's basically what require hybrid join is doing.
- 32:12Yeah, exactly. You're good.
- 32:13And I have no doubt, based on everything these folks have
- 32:16reported at Sedaris and Hallersall, I have no doubt they
- 32:19were able to mint a PRT that said, yeah, I'm hybrid join.
- 32:22Let me in OK, you know, that's that's why that's a weaker
- 32:27control and it shouldn't be your only control.
- 32:30You should be full fully aware it's a weak control and and this
- 32:35is where you know, bigger picture just thinking about
- 32:39where do you invest your effort from a cybersecurity perspective
- 32:43and you know, we we need to finish walking through the
- 32:45attaching. So I'm sorry for jumping in here
- 32:47and going on a tangent, but if my guidance to you is require
- 32:53MFA for device registration, disable device code flows that
- 32:58you should really move away from hyper join and move to cloud
- 33:00join. You should really move to Intune
- 33:03compliance check as your entry ID conditional access policy.
- 33:07How much effort do you go spend engineering like ways to ensure
- 33:12that it's a Windows device that is stating that it's doing these
- 33:15things? How much engineering effort do
- 33:17you go pour into that? Because it's all opportunity
- 33:20cost. If you're doing that in
- 33:22hardening a scenario that I have advised you is not a high
- 33:26confidence, high security scenario.
- 33:29That is opportunity cost away from investing in modern attacks
- 33:32that can hit even well configured, well managed tenants
- 33:37where they're doing everything right.
- 33:39And I think I'd rather have it over there where you're, you're
- 33:41defending against state-of-the-art attacks, not a
- 33:44tax where you've left, you left the back door open, you left the
- 33:47key under the mat, you did all these things you shouldn't do.
- 33:49And then I'm trying to like build additional barriers there.
- 33:52I don't know if that makes sense.
- 33:54So you know, I get you can nitpick some of this and be
- 33:57like, well, the device registration service shouldn't
- 33:59do this. No, probably shouldn't, you're
- 34:00right. But how much engineering effort
- 34:03do you put into that when really we shouldn't have anyone
- 34:06enrolling devices that we have not done 2 factor authentication
- 34:09on kind of thing. So and Cal, let's continue with
- 34:13the the attack chain here. Yeah.
- 34:15So one thing that they did after they had the the PRT token
- 34:19claim, the device claim, they ran a tool, a road Recon which
- 34:23was able to enumerate the entire tenant.
- 34:26So they were able to enumerate all the users, the groups, the
- 34:28devices and also all the full conditional access policies
- 34:32which they were able to see that there were 57 policies enabled,
- 34:3514 in report only mode and seven disabled.
- 34:38And two of those report only policies which we talked about
- 34:41would have stopped this attack in its tracks.
- 34:46And possibly might, maybe my 3rd 2.
- 34:48Right. And so they did, you know, this
- 34:51is where the, the reporting and kind of the nuance kind of meet
- 34:54where they talked about defeating into an MDM
- 34:58compliance. But we, we kind of went through
- 35:00that where if it was requiring compliant device, that's
- 35:02actually a little bit different because if you're just requiring
- 35:06hybrid join, which they did here, you basically bypass the
- 35:11any type of compliance policy check on the Intune side.
- 35:16That's different if you were using like Mecham or something
- 35:19like that and you had a compliance check there and it's
- 35:21being managed there. But this is again, where there's
- 35:23a nuance of hybrid join is essentially an on premise join
- 35:28device. It is a domain join device.
- 35:30It is not a cloud device. And so that gets into also some
- 35:33of the, the, the later attack here, but you can't require an
- 35:38into. I mean, technically you can, but
- 35:40if your CA policy, your conditional access policy is
- 35:42just requiring hybrid join, then it doesn't actually check a
- 35:47compliance policy. So you know, there, some of the
- 35:49reporting says they ran a compliance check and it does all
- 35:52this querying and making sure the stuff is enabled.
- 35:54But if it's just hybrid join and that's all you're requiring, it
- 35:57doesn't look at a compliance policy or.
- 36:01So maybe they have it configured where it was in conditional
- 36:05access policies. Who can do and or logic?
- 36:07You can pick do I want and logic?
- 36:09Do I want or logic? Possibly they had it configured
- 36:13for or logic where it is either hybrid joined or compliant with
- 36:18Intune. And they're like, well, we're
- 36:20solving both bases. You know, if someone is is
- 36:22hybrid joined and on premises, you know, then they get in and
- 36:25if they're cloudy, then they get in this way again.
- 36:28That's why I articulate that's not good design and you don't
- 36:33want to do and if you're starting to move to some enter
- 36:36join devices because they're not hybrid join.
- 36:38So then they would fail that policy.
- 36:39And I get that. But that's where the, or is the
- 36:42risk of, well, I can just say I'm hybrid join and I can opt
- 36:44out of it. And, and I bet that's how it was
- 36:47configured because they do talk about how in Intune, when it ran
- 36:52its compliance check, the device just said, well, that doesn't
- 36:55apply to me. And then it was able to instead
- 36:58of being labeled non compliant, it was just not applicable.
- 37:02And if that is true, if there's a way to get to this point and
- 37:05trick in TuneIn that way, maybe that should, should have some
- 37:09potential redesign down the road.
- 37:11Again, it get you get down the path of maybe it's more
- 37:15important to put the security earlier in the chain, right.
- 37:18If you're already this far down, you're better off hardening
- 37:21earlier in the attack that often times Microsoft will take that
- 37:26stance. There's been some other examples
- 37:28recently where there have been reported disagreements on
- 37:33software development. I'll just say, and the Microsoft
- 37:36response has been, yeah, by that point, it doesn't matter.
- 37:40Like it if it's that compromise, yeah, we're not really worried
- 37:43about that scenario because it is so far down the compromise
- 37:47chain. The solution is prevent the
- 37:49compromise here, here or here before you get to that point, at
- 37:52that point. Now what?
- 37:53What's what's the point here? So there could be some of that
- 37:56going on too. So, you know, I think you'll
- 37:57hear more reporting. As of Friday afternoon, there
- 38:01were not any talking points posted on this.
- 38:03I'm on our internal forum. The final thing that was kind of
- 38:06the the killing blow was as part of the enumeration, it exposed A
- 38:10structural misconfiguration, which is very common in a lot of
- 38:14hybrid environments. There were 255 on premise Active
- 38:18Directory accounts that help privileged directory roles in
- 38:22the cloud, including two global admins and a privileged role
- 38:25administrator. This is something that Alex
- 38:27Weinhardt put out a blog back in 2020, so this has been standing
- 38:31guidance for almost 6 years now. Do not sync any on premise
- 38:37accounts in privileged roles to the cloud.
- 38:41So your cloud accounts should. Admins should be separate Cloud
- 38:44admins. Your on premise privileged roles
- 38:47like global domain admin and you know whatever should also be
- 38:51just on premised accounts. And so one of those
- 38:54misconfigurations could also include because it's hybrid
- 38:57joined and it is a domain, you know joined device you're
- 39:03authenticating using domain accounts and so and those
- 39:08accounts get cashed whenever you login.
- 39:10They might be sitting as cashed credentials on the device
- 39:15itself, but either way this has been standing guidance.
- 39:19Don't sync privileged roles from on Prem to the cloud.
- 39:22And so they did that. And so really they were able to
- 39:26compromise 1 synced on premise privileged account, then assign
- 39:29the privileged authentication admin role to the attacker
- 39:33controlled account. Use that role to reset a synced
- 39:36global admin password, then sign in as the global admin and down
- 39:40they have complete tenant takeover.
- 39:43So, you know, a lot of different things went wrong here, but I
- 39:48think this is a pretty common scenario for a lot of
- 39:53organizations out there. So made me think of when you
- 39:56were just talking about that and absolutely.
- 39:58So again, actionable guidance, we're all about it on this show.
- 40:01What is your actionable guidance?
- 40:02No privileged synced accounts. All of your privileged accounts
- 40:07should be mastered and enter ID in our cloud only.
- 40:10But while you were talking about that, you made me think of
- 40:13something else. 2 Something else is actually, I kept mentioning
- 40:16there are multiple ways to stop this.
- 40:18The one like assumption that all of this conversation had that we
- 40:22didn't even touch on Andy was that the user's password was
- 40:25compromised. We just assumed that it's a
- 40:28stipulated fact of this whole attack chain.
- 40:31Well, let's talk about that for a second.
- 40:33Couple of things. Number one, you can enable
- 40:35password hash synchronization and with enter ID protection, we
- 40:39will notify you if we find those credentials leaked on the dark
- 40:42web, send you a high, you know, high confidence alert.
- 40:46And you can configure so that the next time the user signs in,
- 40:49they're automatically forced to self remediate by doing a
- 40:52self-service password reset and providing 2 factors that are not
- 40:55their password to reset that password and eliminate the
- 40:58compromise. OK, it's not clear if that was
- 41:02done or not, but just so you're aware, there are ways to
- 41:05remediate and prevent that. Cause a lot of this conversation
- 41:07is, ah, you know, passwords are a dime a dozen on the dark web.
- 41:10You can buy one for 50 bucks, maybe not even that much.
- 41:14Sure, there are ways to help mitigate that.
- 41:17The other thing is, you know, if your users just don't use their
- 41:21passwords very often, they're really hard to get fished.
- 41:25I, I know you're sick of hearing this, dear listeners on this
- 41:28show, but literally, if you try to fish Andy and I on our
- 41:31Microsoft corporate credentials, you can't because I don't know
- 41:34what it is. I haven't used my password in
- 41:36years. And now we've completed the
- 41:38migration to fish fish resistant MFA to where I never, I mean,
- 41:43I'm done putting my password because you cannot sign into
- 41:45stuff without fish resistant MFA.
- 41:48It's a requirement. So there's your other
- 41:51preventative stuff. If your users don't know what
- 41:53your password is, it can't get fished.
- 41:55And none of this attack happens because that was like the whole
- 41:58assumed first step. And I forgot about that part.
- 42:02Like if you are password less, also all of this risk goes away.
- 42:06Like there's your like third or fourth possibility to block this
- 42:10as well. And I forgot about that.
- 42:12And you brought it up at the very end.
- 42:13So I'm sorry I'm hitting that late, but it's also an important
- 42:16point. This whole attack chain just
- 42:18starts off with, well, we have the user's password.
- 42:20Yeah, you know, it's even, we've taken it even a step further in
- 42:26the fact that like I used to have my Microsoft password
- 42:29stored in a password vault, my corporate password, right.
- 42:32Like I, I said it day one and I haven't looked at it since they
- 42:36released something to us that said, hey, we're taking a step
- 42:40further. We're just going to change your
- 42:42password to some random, you know, 9000 character password in
- 42:47AD now and and you won't even know it.
- 42:49But they did that. I never saw that.
- 42:51Yeah, yeah, that that was a message that came out and they
- 42:53just said, hey, oh, and by the way, like you don't need this
- 42:57anymore. We're just going to change it to
- 42:58something crazy that you don't even know.
- 43:00So I won't ever know my on premise password ever again at
- 43:05Microsoft. OK, well, there you go.
- 43:07I mean, but it's just funny that that was so assumed of like,
- 43:10well, of course we have their password.
- 43:12Like, you know, Oh well, what can we do about that?
- 43:15Boy, I don't know, what can we do about that?
- 43:19All of this stops if you don't have a password to get fished
- 43:22too, by the way. So again, Speaking of like,
- 43:25where are we investing our engineering resources?
- 43:28Well, where are you investing your engineering resources,
- 43:31listeners, you know, and, and IT shops around the world because
- 43:35I've kind of taken this attitude of and, and I, I'm not saying
- 43:40this to be snarky, but when customers knock on my door,
- 43:42like, Hey, what should I do about this thing?
- 43:44Like, have you rolled out fish resistant MFA?
- 43:47No, OK, why don't you put your effort there?
- 43:49Like it's, it's my like almost knee jerk answer to everything.
- 43:52Roll out fish resistant MFA. That's the answer.
- 43:54Like it solves so many things. Just I, I know it's hard, but
- 44:00it's worth doing. There's no bigger bang for your
- 44:02buck anyhow. I get on that soapbox all the
- 44:04time. I'll stop, I swear.
- 44:05Yeah. So just to wrap things up, we we
- 44:08kind of went through this as we talked about the attack chain,
- 44:11but some actionable insights #1 enforce conditional access
- 44:14policy to block device code flow #2 require MFA for intra device
- 44:20registration. Number three, don't sync your on
- 44:24premise users into privileged cloud roles #4 obviously do an
- 44:29audit of all of your conditional access policies.
- 44:32Anything that's in report only mode.
- 44:34That's all it is. It's just going to log the
- 44:36attempt. So make sure that if it's
- 44:37something that you want to enforce, start enforcing it.
- 44:41Do a test group, roll it out, and then turn it on for all of
- 44:45your users. If that's something that's in a
- 44:46critical category, like one of these two things that should
- 44:50have been done here and then #5 start requiring compliant
- 44:55devices. So use instead of the hybrid
- 44:59joined in conditional access policy, force device compliance.
- 45:04Now that will, if you're kind of still in the hybrid join phase,
- 45:08that may take some time, but that's something worth what like
- 45:12I'm saying, it's worth your engineering effort.
- 45:15It's worth your time to move to that because it is continuous
- 45:19device attestation rather than hey, you have a hybrid joined
- 45:24device and that's it. It's reusable.
- 45:27It's reusable when you move to requiring device compliance as a
- 45:31hybrid join device. Guess what, that's your only
- 45:34option when you move to cloud join anyway.
- 45:36So you would have had to do the engineering effort then.
- 45:39So it's not like it's dead end engineering effort.
- 45:41It is future state engineering effort that you get to do early
- 45:45and then you pull that effort out of the project to move to
- 45:48cloud join, which if you're, you know, you need to be doing this
- 45:51well, but that way a lot of orgs get really wound up.
- 45:55And it's, it's one of the first shows we ever did and we did
- 45:57several on it. Andy early in our, you know, our
- 46:002020 years on the show, we talked about enter join devices
- 46:05and people get wound up and make it more complicated than it is
- 46:08pulling that effort forward on getting to device compliance
- 46:13checking as part of your CA policies.
- 46:15Doing that early is a great move because that is not complexity
- 46:19with the cloud. Join, move to enter, join then,
- 46:22and then when you do that, it's an easier lift.
- 46:24So I actually recommend doing that.
- 46:26It's the right order of operations.
- 46:29All right, a lot of information here today.
- 46:33Hopefully you stuck around cuz man, this was a great show
- 46:37overall. So thanks for listening and
- 46:40watching. As always, our contact
- 46:42information along with the links that we used for our notes and
- 46:47our show will be in the show notes.
- 46:48If you have any questions or topics you want us to talk about
- 46:51in the future, just e-mail us. Thanks.
- 46:54We'll talk to you guys next week.
- 46:56Thank you for listening to the Blue Security Podcast.
- 46:58Please check out the show notes, catch up on episodes you may
- 47:01have missed, and subscribe so you don't miss any future
- 47:04episodes. Find Andy on Twitter at a Jaw
- 47:07Zero and Adam at AJ Brewer. See you at our next episode.