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