Skip to content
PodSubs
ShowsPeopleGuestsJobsNewsEvents
More
BlogPodCred
Menu
ShowsPeopleGuestsJobsNewsEventsBlogPodCredNetworksSign in
Join nowSign in
  • Shows
  • People
  • Jobs
  • News
  • More
    • Guests
    • Events
    • Blog
    • PodCred
    • Networks
    Join nowSign in

Entra.Chat

Entra.Chat artwork

Conditional Access Gaps and the App Back Door, with Brandon Colley

Oct 24, 202639 minAudioEpisode 79
ShareXLinkedInFacebookWhatsAppEmail

Most Conditional Access gaps aren’t exotic. They come from reading policies the wrong way: as firewall rules with an “allow”, as a list of platforms that seems complete, as an MFA exception for the office that made sense years ago. Brandon Colley has reviewed well over a thousand Conditional Access policies in customer assessments, and the same handful of mistakes come up in tenant after tenant. Once those are fixed, the risk moves. Passkeys, privileged access and Conditional Access put more locks on the front door, the user sign-in. An app that was consented to years ago, holds a client secret and still has a stale redirect URI is a back door that none of those locks cover. Brandon is a Senior Security Consultant at TrustedSec and a Microsoft Security MVP. He came from systems administration, learned Active Directory security at Trimarc, and now spends his days on cloud and on-premises assessments and the remediation that follows. These are the gaps he checks first, and the app and consent settings he has moved on to. Security defaults can cover more admins than your policies The free tier can be stricter than the paid one. Security defaults require MFA for 16 administrator roles. The Microsoft-managed policy “Multifactor authentication for admins accessing Microsoft Admin Portals”, and the “Require MFA for admins” template it mirrors, cover 14. The two extra roles in security defaults are Authentication Policy Administrator and Identity Governance Administrator. If a small tenant is on security defaults, think hard before switching it off: the moment you do, you lose protections that you then have to rebuild in Conditional Access yourself. Sponsored by: ENow Software Introduces New Entra ID App Onboarding Experience As user requests for SaaS and AI applications increase, Entra ID and M365 teams face a growing volume of security reviews, added hours of manual research, and bottlenecks. New! ENow App Governance Accelerator 4.0 introduces App Onboarding, helping teams: * Accelerate app approvals with configurable, multistage workflows. * Evaluate security risks more efficiently with integrated Microsoft Defender for Cloud Apps risk scores. * Reduce manual work with centralized requests, reviews, and approvals. * Improve transparency with a self-service portal for requesters to track status and decisions. * Control app sprawl with an Internal App Catalog of approved applications. Go beyond Microsoft’s consent and approval capabilities with customizable, structured application governance, from the initial request through ongoing oversight. Faster Approvals. Less Admin Work. Better Security Posture. Learn More About ENow App Governance Accelerator 4.0 See It In Action: Request a Demo Decide which roles are privileged yourself “We require MFA on privileged roles” is easy to say in an audit. An assessment asks a harder question: privileged by whose definition? Brandon’s own list is about 36 roles, grouped into tier 0 and tier 1, the same tiering model Active Directory admins used 20 years ago. Don’t lean on Microsoft’s mandatory MFA either. It covers the Azure portal, the Microsoft Entra admin center, the Intune admin center and the Microsoft 365 admin center, plus create, update and delete operations from Azure CLI, Azure PowerShell, the Azure mobile app and IaC tools. Microsoft Graph APIs are generally not in scope, so in some cases a single-factor sign-in can still reach Graph. Your Conditional Access still has to cover every app and every role you consider privileged. Every platform is not all platforms Conditions inside one policy combine with AND. A policy that requires MFA when the user is risky, the sign-in is risky and the location is outside the United States only fires when all three are true at once, so it almost never fires. Put conditions that should act on their own into separate policies. The device platforms condition has the same trap. Ticking Android, iOS, Windows, macOS and Linux is not the same as “any device”. The platform comes from the user agent string, which isn’t verified and is easy to change, so a sign-in that claims an unknown platform matches none of your platform policies and walks past all of them. Microsoft’s recommended fix is a separate block policy: include Any device, exclude the platforms you support, and set the grant to Block access. Brandon covers how the spoofing works in his Petri article (linked below). Watch this episode… Conditional Access has no allow rule Customers often ask for a policy that will “allow finance access to the finance app”. Conditional Access has no allow rule. A policy is an if-then statement: if the users, target resources and conditions match, then require MFA, a compliant device or another control, or block. Anything the policy doesn’t match passes through untouched. So every time you narrow the users, the apps or the conditions to describe who should get in, you also shrink what the policy protects. Scope policies broadly and carve out exclusions on purpose. Testing: ask what a policy doesn’t do Testing usually covers the happy path: the right user opens the right app and gets an MFA prompt. The gaps are in the paths nobody tried: the user who isn’t in the group, the unmanaged device, the other network. Two locations, managed and unmanaged devices, a few apps and a few user types already make dozens of test cases, and every new condition (insider risk from Microsoft Purview, for example) multiplies them again. The useful question isn’t “what does this policy do?” but “what doesn’t it do, and does something else cover that?” When you add a role or group to one policy, check whether it should come out of another. Tools help: * What If tool: simulate a sign-in for a user, app, device platform and location, and see which policies apply. * Conditional Access Optimization Agent: Microsoft Security Copilot reviews your policies and suggests new policies (created in report-only mode) and changes for you to approve. It needs Microsoft Entra ID P1 and security compute units. * AI with sanitized data: as a consultant, Brandon often can’t run tools inside a customer’s tenant. He exports the policies as JSON, removes tenant names, group names and IDs, and asks an AI model to explain a specific coverage question. Challenge the answers and verify them; don’t take them on trust. User actions and device code flow Two gaps Brandon still finds often: * User actions. Conditional Access can target Register security information and Register or join devices. Without a policy on these, registering an MFA method or a device is protected only by whatever the sign-in itself required. * Device code flow. Microsoft deploys a managed policy that blocks it in some tenants, but Brandon has seen it deployed only about three times. Check whether you need it: filter the sign-in logs by authentication protocol for device code and see who uses it. Legitimate users are usually input-constrained devices such as Teams phones and Teams Rooms. At one customer, the single device code sign-in turned out to be their own penetration test. Then block it with an authentication flows policy and exclude only what genuinely needs it. Trusted locations: the exception that switches MFA off A common policy reads: require strong authentication for all users, all apps, everywhere, except trusted locations. It was best practice once. In effect it means single-factor sign-in at the office, and it often survives after the rest of the policy has been modernized. On Microsoft Entra joined and hybrid joined Windows devices you don’t need the exception for single sign-on. The primary refresh token (PRT) provides SSO to apps and carries the MFA claim. The exception only lets users skip strong authentication. Flip how you use locations. Instead of using them to relax MFA, use them to lock down the accounts that can’t do MFA, such as service accounts, shared accounts and kiosk accounts, so they only work from specific IP ranges and devices. While you’re there: * MFA trusted IPs in the legacy MFA service settings ar… Get full access to Entra. News - Your weekly dose of Microsoft Entra at entra.news/subscribe

Audio and video play straight from the show's own hosting. PodSubs stores and serves no media.

Transcript

From the show. Tap a time to play from there.

SPEAKER_02Brandon Colley's job is finding the gaps in Microsoft Entra tenants.

SPEAKER_03I don't think I can actually figure out how many conditional access policies I've seen in my career. It's probably well over a thousand.

SPEAKER_02Same gaps, tenant after tenant.

SPEAKER_03Security defaults actually protects more And I always say conditional access doesn't have an allow policy, right? Like there's no allow rule inside of this. So they're basically saying, We're putting multiple locks on the front door, but we're leaving the back door completely wide open where a single leaked client secret could be the only thing that's necessary.

SPEAKER_03When an administrator is prompted to accept the permissions, they can click the accept for everyone in my organization. And a lot of times that looks like a desirable checkbox to fill.

SPEAKER_02So what does that checkbox actually do? A new Entra episode every week.

SPEAKER_00Intro chat [music]

SPEAKER_01Hey folks, welcome to another episode of Entra Chat. And I have someone who's here to talk about some really interesting topics. Brandon Colley is joining us. He's a Microsoft MVP. He's a senior security consultant at TrustedSec. One of those folks who has like real world experience going and helping companies, protect them, seeing all the bad side of, you know, when things go wrong and helping folks out. So some really unique insights. And I want to learn from Brandon because I'm sure there's a lot more he's seen

SPEAKER_01than I have in the real world. So Brandon, welcome to EntraChat.

SPEAKER_03Thank you. Thanks Merill. Yeah. Happy to be here. Yeah. That's, that's really been my My bread and butter over my career has been, I always joke that says that I know how to fix stuff because I broke it first. So back as like a sysadmin, I misconfigured stuff like crazy. And not until recently did I actually understand how badly I probably left some of my past coworkers. So I'm attempting to, you know, amend for those sins that I previously

SPEAKER_01So Daniel, like tell us about your career, like because in Entra identity, people end up in different ways, their paths, and it's always very unique. No one, you know, starts their career thinking, oh, I'm going to be an admin for F365 or an admin for Entra, or I'm going to be, you know, breaking in or being a pen tester. Maybe pen testing people do, like it's sort of, you know, The hacker side of things. But yeah, tell us about your journey, how you came to be.

SPEAKER_03Yeah, yeah, you're right. Like, I feel like pen testers are one of the only careers that set out to be a pen tester, right? Like, I did not, like, I feel like I aspire to be, or like, maybe I play one on TV or something like that, but no, I came I came from the sysadmin world and actually I probably supported Google more than I did Entra or at the time Azure AD. I was a big active directory administrator. That's really kind of where I pivoted into the security realm when I joined Trimark Security.

SPEAKER_03Which was probably between three and four years ago now. And really shifted into the security side of things. And I always liked to say that I used to do security as a sysadmin and I didn't know that I was doing security. Like I was in charge of group policies. I was in charge of some of the identities and protections and password policies and stuff like that. But I never saw it as security. Not until I kind of shifted into more of that security consultant role. And so while I was at Trimark Security is where I ended up really kind of,

SPEAKER_03you know, cutting my chops on all things Active Directory security, got to learn from Sean Metcalfe, who's been on your show before. And then I had an opportunity I had an opportunity to shift more toward the Entra side and I had a little bit more experience in that than I thought I did and then I had to learn and really spin myself up pretty darn fast as far the fast moving Azure AD Entra. So I ran our security assessment for our Microsoft Cloud assessment at Trimark.

SPEAKER_03And then a little over a year ago, about a year and a half now, I joined TrustedSec and I'm still doing a lot of the same stuff. So that's where I live and breathe these days. I try to sneak in research and blogs wherever I can. I love to speak at speaking engagements kind of, you know, all over the country. And that's where I've met you a couple of times, been graced with your presence. And yeah, just that's basically me within the three minute window.

SPEAKER_01Nice, nice. I do have this interesting thing you mentioned, right? That you did Google, Google Suite or Google Workspace or whatever it's called. And that's a unique perspective. I don't know how much you did security on the Google side of things and like it could have been many years before, but I always want to compare, like how do you compare some of the security things that you have like MFA and other things in the Google Suite stack? Google Workspace versus what we have in the Entra side of the world.

SPEAKER_03Yeah. You're going to make me draw from like five years ago, technology, right? So, but, but really, I guess when I think of that now, it's almost independent of the tech itself and a lot of it, and I've said this for a long time, whenever I talk to people who are trying to get into security or even just IT in general is If you can understand the bigger picture, then you can have a very unique view of what it is that you're doing, right?

SPEAKER_03So you're focusing a little bit less on following the step-by-step instructions on how to configure your Google administrators to have strong MFA, right? But if you understand a little bit more of like the why and the concept and all of that behind it, then it doesn't matter if you're doing it in In Google or in Amazon or in Azure, you know, it's basically the same concept, just different checkboxes.

SPEAKER_01Awesome. So let's jump in, Brandon. Like, what are your tips for conditional access? Like, you did a talk recently at the HIP conference I was there, and there were some really good insights you had. I'd love to hear some of, like, the origin stories behind how you came up with those.

SPEAKER_03Yeah, so that's a, it's, it is, as I said on stage, it's a, it's a series of soap boxes that are just increasingly a little bit higher than the previous soap box as I like stand on these things. And it's, it really stems from just the customer environments that I see. I don't think I can actually figure out how many conditional access policies I've seen in my career, but it's probably well over a thousand. And the talk that I gave and just the reason I have some of these stances is

SPEAKER_03that it's so easy to mess up some of this stuff. And like I said before, it's understandable because Either as an administrator, you have so many other roles, like you have to also handle the data center. And I was talking to somebody earlier today who said, hey, I have to jump on another call because our UPSs are having a problem. And I'm like, well, you handle the power in your data center and you also handle Entra identity, right? So I get that it's difficult.

SPEAKER_03But one of the funny things that you had mentioned, the security defaults and And one of my first kind of soapbox that I like to stand on with this is that security defaults actually protects more administrative roles than the Microsoft defined Managed policies when you actually create your conditional access. So between the template and also the Microsoft managed policy, those only touch 14 roles by default.

SPEAKER_03And I've been saying 14 roles for the last like year and a half. And it's always been the same roles. Security default has two more than that, that they protect by default, which I can't rattle them off off the top of my head, but it's just maddening that Sometimes like the free stuff is more secure than

SPEAKER_01the... That's the thing. I think that's something a lot of people miss. And I like, I have some tenants that I just leave it at security defaults, even though I have like P1 license in that tenant because Security defaults does things that are there in P2 as well. And you just get it for free. And I know the moment I toggle it off and I'm creating CA policies, I actually lose out on some of those. It's crazy how insanely good security defaults is. And you should really, really think hard and a lot before you go turning it off.

SPEAKER_03Right, especially for some of the smaller tenants or those kind of administrators who wear so many different hats. But really, even beyond just those default roles, I feel like if I was doing an audit instead of like an actual assessment, like we dig in and we run graph queries, kind of like your tool Meister does, and it actually looks at that and it looks at What we consider privileged roles, not what Microsoft considers privileged roles.

SPEAKER_03And so it's easy in an audit to say, yeah, we require MFA on privileged roles. Well, Microsoft by default now requires MFA when you're connecting to the admin portal. So you might as well say, yes, that does, but it doesn't cover all applications. It doesn't cover all of the roles for all of the resources and clients that you can connect to. You can still attach the graph with single factor in several cases. One of the big things that I like to harp on I think it's something like 36 roles now that I always claim to be ones

SPEAKER_03that I think that should be included in those kind of policies that protect all administrators. You know, I kind of break things down into the Tier 0 and the Tier 1. I fell back into Microsoft's old what's old is new again type strategy. And I think it works just as well as it as it did 20 years ago.

SPEAKER_01So nice, nice. You had some really some interesting insights on some of the other C policies and like what I think one was around, was it around devices?

SPEAKER_03Yeah, probably device platforms, which was covered in a previous episode of A Venture Trat. And I kind of actually, I pivoted one of my other problems that I tend to see into kind of like showcasing how device platforms causes a similar nightmare is just using multiple conditions inside the same policy. I feel like a lot of organizations still read conditional access like they would read a firewall where they're doing things like saying, yeah, we want to require MFA if the user is risky and if the sign-in is risky and

SPEAKER_03if they're coming from outside of the United States. But if you do all of those in the same policy, then it's the AND logic that hits on all of that. And so it's basically never gonna fire a policy like that if they're all on the exact same policy. And the same or similar is true when we start looking at device platforms, which on the previous episode was described that selecting every single device platform is not the same as selecting all device platforms,

SPEAKER_03which I told you earlier like blew my mind because I see that constantly. There's not the default policy that blocks all unknown and unsupported devices like is recommended by Microsoft. And instead what we see is like just a single policy that says Linux is blocked. And then we have another policy that says if you're coming from iOS or Android, then require compliant device. And then there's like MFA rules inside of there too, but there's nothing that specifically targets unknown devices or any of

SPEAKER_03the other like Windows Phone stuff and just how easily spoofable that is based on the user agent. That's one of the demos that I added to the talk. And I think there's an article that actually just got posted today that I had written on that too. Nice.

SPEAKER_01Yeah. We'll link to that. Yeah, so this is the thing with conditional access, right? Like you think you're doing the right thing and you're selecting all the, I should do Windows, I should do this, and you're selecting a lot of boxes. But then every time you do that, you're opening up holes. And it's not really clear that you're doing that. You're actually making your policies less secure the moment you flick some of those things on.

SPEAKER_03And some of it's just so illogical. You feel like it's logical, right? Where you, one of the other things that I always harp on is the allow rules that exist. Customers love to say, create a policy that says allow Finance access to finance app, right? And I always say conditional access doesn't have an allow policy, right? There's no allow rule inside of this. So what you're doing seems to functionally make sense where you're selecting the user base, the application and what you want.

SPEAKER_03But what you're missing is that when you select that, you're narrowing the scope and you're not being broad enough.

SPEAKER_01And the problem is testing, right? Like how, because a lot of folks will define something and they will test the happy part most of the time. And then you go, oh yeah, it's like that's prompting for the app I selected, it is prompting MFA, so it's all good. But then you might have lots of scenarios where the user is not in the group and this whole policy doesn't apply and it's not going through that. Like I've seen people create, like even myself, When we were first rolling out CA policies, we would come up with this whole test matrix, right?

SPEAKER_01And every location you add and say, okay, this is from the local network, this is coming from outside. And then if you're coming from managed device and unmanaged device, and just those four things, if you put up the matrix of the different scenarios you need to test in real life, that goes into like 40 different test cases. Because you need to now try a managed device coming from this network, coming from the other network and accessing the different apps. And then you need to try an unmanaged device, the same thing.

SPEAKER_01And like all these combinations, they just...

SPEAKER_03Yeah, yeah, for sure. You're right. It's like, it's exponential, especially as more and more conditions become available, right? Like once we start, like we just added, I think, Insider Risk was like a new condition that's getting added. So once we start playing with some of these new toys that we're getting inside of conditional access, you almost have to retest the whole suite because it's really not a game of this policy does this. It's a what doesn't it do and then does something else cover that?

SPEAKER_03In so many of these cases, you have to remember when you add a role to one policy, you have to remove it from another policy. Or when you make changes to this group, you have to also make changes to this group.

SPEAKER_01How have you seen it happening, Brandon? Do people go to that extent of creating the scenarios and test metrics? And like, we know this is how the holes get created, but what's the approach you recommended, especially when you create a new CA policy?

SPEAKER_03So it's not easy and it's getting really a lot harder. I really hope that That the AI agents are going to come to save us for the conditional access evaluation. I don't get the impression that that's fully vetted yet. What I have seen is I have been using AI to help Understand some of the more complexities involved with it,

SPEAKER_03where maybe I don't have permissions to test something, right? Cause I don't, when I do an assessment, I have a read-only access view. I can make changes. I have like a single user coming So I could what if tool this and that. And I've written a couple of scripts myself that help evaluate some of this stuff. But really when things start to get complicated, I really hand a lot of it over to AI and actually just recently grabbed JSON output of all of the conditional access and I sanitized all of it.

SPEAKER_03And then I kind of threw it into AI just to help me understand this, right? The native conditional access agent in this person's tenant, but I can help review this very specific use case that I'm trying to look at where, yeah, it gets hard. So in a lot of the cases, we try to be really narrow on what it is that we're We're trying to recommend. And so, I mean, a lot of things that people miss is some of the user actions stuff too,

SPEAKER_03with securing MFA registration, with registering devices and requiring MFA on those sort of things. So a lot of organizations are missing that. I still see a lot of device code flow that doesn't show up. I don't know what algorithm is being used at Microsoft to deploy the Microsoft Managed Policy, but I think I've seen it like three times. Actually, here's a quick funny story about device code flow. So there's a really easy way that you can just check to see if device code flow is being used,

SPEAKER_03you know, legitimately in your tenant where you just kind of like click a couple boxes and look at your sign Logs and identify if there's any use that's being happened. From my perspective, it's usually like Teams phones or some of these other types of devices that can authenticate using a GUI or keyboard and stuff like that, right? And so we had this customer who I found one. There was one authentication attempt that was using DeviceCodeflow and we had a username and we were trying to track it all down. But it was from like a couple months ago and couldn't figure out exactly what was going on.

SPEAKER_03Finally, the org was able to track it back to a penetration test that they had done where they had to utilize device code flow to infiltrate in and run some of the attack tools. And so I thought that was just hilarious. I'm like, so yeah, you're safe to turn it off then.

SPEAKER_01That's interesting. Let's take a quick break to share some exciting news from our sponsor, E-Now Software. They've drastically improved the app onboarding experience for Microsoft Entra ID with the release of App Governance Accelerator 4.0. This streamlines the process for both With users requesting new apps, and the admins and departments responsible for reviewing and approving them. It goes beyond Microsoft's native workflows with configurable multi-stage approvals, integrated Microsoft Defender for cloud app risk scores,

SPEAKER_01The result is faster app access for users, less manual work for admins, and fewer bottlenecks across the board. At the same time, it gives IT identity and security teams greater control What are some of the other common ones that you see, Brandon, where people like a rule of thumb that you would share to avoid creating holes?

SPEAKER_03Yeah, I guess. So one of the other big ones that I've talked about is trusted locations. So you had talked earlier about how, when we have multiple different locations identified and you have policies using a lot of these different complex locations. I don't think that they're a bad thing. I think that locations have been misused since Azure AD introduced these trusted locations. And what I'm still seeing in a lot of policies is they have a really solid It would require strong authentication,

SPEAKER_03everybody, all the time, everywhere, except for trust locations, right? So they're basically saying, if you're on-prem, single factor away, right? And I think that policy probably has been in place for two, three, even more years in these orgs where that was the best practice. And maybe they changed it to use even stronger auth, but they kept that That trusted location rule in place. And a lot of organizations don't understand that modern operating systems,

SPEAKER_03now that you've gotten to the point where you're doing hybrid join and you're running Windows 11 suite across the network, that you don't need that So I see, I see that a lot. And what I usually recommend with that besides just like Let the PRT and the modern OSs and the hybrid join do what it's meant to do.

SPEAKER_03Instead, shift to a mindset of using those locations as further locking down users that are the exceptions, right? So we're going to have non-human accounts. I don't want to talk about AI yet, Merill. This is like, I'm not an AI god like you are, but even just things like service accounts or shared accounts or kiosk account, whatever they may be, right? Things that can't MFA. Just you can use locations really, really strongly to lock those devices down or those users down to specific devices,

SPEAKER_03specific IPs, stuff like that. So that's probably one of the other, the main problems that I tend to see. Nice.

SPEAKER_01Yeah. And there are so many confusing things with the whole trusted location and the MFA and there are specific types of MFA trusted IP. There's a checkbox, which means something completely different. Like it's used with Federation and those frames. And I think with the GSA and the compliant network coming in, that's going to be a big part of it as well. You can now control a lot more on saying, yeah, we have the GSA client deployed and you're only allowed from there,

SPEAKER_01which makes it a bit more, gives you a bit more control because people move with their laptops, right? And you can use that flow as somebody.

SPEAKER_03You're right. Yeah. Like the CAE stuff, Yeah, access evaluation, continuous access evaluation causes mischief with locations. And one of the other things I like to point out is that a lot of times, I think I ask everybody like, hey, who knows how to subnet anymore, right? Because when you create this location, it's still in that That subnet text. And I'm terrible at it.

SPEAKER_03I've always been terrible at it. Every time I've learned it, I've forgotten it just as fast as I learned it. It's a mess. And then even if you want to include like IPv6 type addresses in there now, there's a lot of warnings around, you know, if there's IPv6 that's coming in, there's circumventing and some other awkwardness. Yeah, so check your location.

SPEAKER_01But now with AI, like a lot of those barriers like have just gone away. Like now I can comfortably go create the subnets and all of that and have an AI validated and actually go look at the Logs and recommend even what I should be doing. Stuff that would have taken me, like a senior, like a big difference between a senior engineer and a junior engineer. Now even a junior engineer with Yusuf and AI can get over a lot of the big harm Of course, they need to know the fundamentals, not just blindly trust it.

SPEAKER_01True, yes.

SPEAKER_03As long as you learn to challenge it, right? Don't just say, what's the half of a subnet network for this? Is it a slash 16 or a slash eight? And AI will just be like, it's an eight. And so it's like, no, like let's, is this IP in the range? Is this IP in the range? All right, like challenge and ask a question.

SPEAKER_01So we were talking about apps as well, right? And going into this and apps are becoming a theme That's something that attackers are using quite a lot because what else can you do with Entra ID, right? There are no unpatched vulnerabilities and things that you can use to attack Entra. So you try to come in through the front door, which is mostly like user auth. And the other one, the big part is apps and consenting apps. And we just have two episodes where we cover a lot of what Microsoft is building

SPEAKER_01with apps and some of the things that they've been doing to improve the security and those recommendations. What are the things you're seeing, Brandon, with apps that people are getting wrong?

SPEAKER_03So yeah, enterprise applications are becoming my newest and my tallest soapbox pretty darn quickly as I continue to dig more into it. And I've developed a couple proof of concepts for things just over the last couple of weeks where I'm looking at, what I'm basically looking into is just App culture, maybe, or even just the way that Entra has evolved has protected the outer shell,

SPEAKER_03but once an app's in and it's consented to and it has permissions and it has a client secret or whatever associated with it, it's going to live in there forever unless you're actively going to look at it. All of these All of these secure controls that we've been doing over the last several months where we're now enforcing pass keys everywhere, we're saying, hey, use PIM and we're doing all of this stuff to protect the user identity. We're putting multiple locks on the front But we're leaving

SPEAKER_03the back door completely wide open where a single leaked client secret could be the only thing that's necessary. The things that I've been working on too, which are some of the stuff I'm going to add to Meister is using the redirect URI. Where if you're able to identify an application that's either old or it has a wildcard in there that you're able to kind of abuse. And if you can control the URL, whether that's just a reclaimed domain name or some other mechanism, right?

SPEAKER_03If you can control that URL, then you can obtain that token for the consented authentication. And the same sort of thing is true. If you have an application with consented permissions and it's a homegrown app that's poorly written, if there's an application vulnerability associated with that, whether it's something like storing Storing the token information and like the local storage of the browser or if it's I've done like a really quick like cross site scripting vulnerability proof of concept

SPEAKER_03that can spit out that that auth token and just beacon it back to an attacker machine. So if you have an exploitable application, then essentially anyone who's using that app Maybe able to be exploited by an attacker as well. So that's some of the stuff that I'm playing with.

SPEAKER_01The quick note on the redirect UI that you mentioned, that's a really good one because for the longest time with Azure, the generic one, azurewebsites.net, everyone used it. But then attackers started realizing that if someone deletes the web app, Suddenly you can now take over that domain and then any reply URL stuff that you had, you could use that. And it came to a point, I think attackers were monitoring any domain that was let go and they would quickly register the .igl website's name.

SPEAKER_01And now they had a way to get it because what people might not realize is that when someone publishes a multi-tenant app, Like it becomes available globally for others to investigate and look at what are the reply URLs that these apps use. Like I'm not saying ServiceNow, but an example, right? Like ServiceNow, Salesforce and all the reply URLs that they have for the app is available to everyone, right? Like I can go and Create a list of all these different reply URLs and I can

SPEAKER_01then just reverse engineer and find out which website used what azurewebsites.net and then use that for, if the reply URL is configured with it, take over that. You would think it's like very extreme scenario, but it became so bad that now Microsoft actually blocked it. So when you create an Azure website or a container app, they just include like a random string in the URL. You can never give a domain yourself that you want. It's just a random one that they put.

SPEAKER_01You can have like the first prefix is your own custom one, but in between it has this long string of like meaningless word as part of the domain.

SPEAKER_03Yeah, and I'm not an app expert by any means yet. I'm slowly becoming more adept to it than I ever thought I would be, but my assumption was always that if the app URL All go stale that the app itself is probably stale, right? So you're thinking, okay, like nobody can use that app, but if you've got multiple reply URLs, that app may be alive and well. And then the only thing besides, you know, grabbing that domain is a phishing link.

SPEAKER_03And at that point, it's legitimate Microsoft authentication that's happening. And so it's really some stuff that it does seem like it's one of these like zero point something percent chances, but it's a cool hack.

SPEAKER_01I think the last year or early last year, Graph PowerShell had so many reply URLs. This is the Microsoft Graph PowerShell. And one reply URL was actually an invalid domain. It was one of the Azure websites. And someone tagged me on Twitter, on X or LinkedIn and said, Like one of the things that Microsoft Zero Trust assessment that I built is upon a check like that. It checks and he said, look, Graph PowerShell itself is being called out with this URL, which is not a valid URL.

SPEAKER_01And then I raised it back to the team and they actually, it was like a reply that was no longer being used and they actually cleaned it up. Like, yeah, it can be even, you know, big name vendors, like people miss that. And so you could have so many of your own application and lots of other ISVs falling into the same bucket. What are some of the things that you've seen in terms of the consent side of things where a tenant got taken over, et cetera, from an app as a vector?

SPEAKER_03So yeah, just from the consent stuff's interesting. I've primarily focused a lot of research previously on like application level permissions, which just basically screams I'm a dangerous application, right? It's more interesting the more I've gotten into some of the delegated permissions and probably the craziest thing that I see with the delegated permissions is that when an administrator is prompted to accept the permissions,

SPEAKER_03I can click like the except for everyone in my organization. And a lot of times that looks like a desirable checkbox to fill. And so, you know, I tend to see these applications regardless of if it's an elevated permission or not. It's the delegated consented permission, but it's for all principles. And so... If it's an elevated delegated permission on this application that has no business having like a, and this is probably not a good example anymore,

SPEAKER_03but the directory read write all, that's kind of the permission that everybody associated with global admin or a similarly dangerous thing. If all of a sudden you've got an administrator who authenticates to that application because it's consented to all principles, then that's the case where you've got a potential problem.

SPEAKER_01Exactly. So yeah, that's a good tip, right? So by default, if you're a global admin and you're consenting, don't consent to all other users, like leave it off so that you follow the least privilege and only if it's needed. If someone does hit a wall and it's an app that should be used by more people, then you can consent to all. But then at the same time, go into the app Owners and users and restrict the app so that only authorized users can sign, right? Like you don't need everyone in the tenant to be able to sign into that application.

SPEAKER_03Yeah. There's a lot, a lot of stuff around applications that I feel like are, are missing because they're hard, right? Like, I mean, especially in the GUI, because Us who have been around for 10 to 15 to 20 years, we love our GUIs and we're not all developers, although I'm turning myself into one slowly. But if I have to click into the application, I have to do this for every single app, right? I click the app,

SPEAKER_03I go to permissions, I look at the API permissions, I select stuff, I delete stuff. It's a huge pain. And there's not really an interface that says, where are my privileged applications?

SPEAKER_01Yeah. And this is another one of the Microsoft strategies, right? They do have it. But you have to go to Defender for cloud apps for certain things and you have to go to Defender for something else for certain things. It's like spread out across and like my challenge is people, even people who are licensed for it don't know. It's in some obscure Defender portal in some place. Challenging. Even Entra portal has this problem where there's a CA in caps that's built in,

SPEAKER_01but you need to tap through to that to actually see it. And then there's Entra Recommendations, which is somewhere else, which tells you, hey, you have these apps that aren't used, no one's using it, you might want to remove it, or this app has permissions and these permissions are not being used, you might want to remove it. Like that's hidden somewhere else and like all in different places. So that's a hard thing. So with Meister, one of the things we are doing is also like pulling those and also showing it in the report.

SPEAKER_01So at least when you get the report, it's a big list, but it tries to get all of the stuff that you're licensed for and you have in that one place.

SPEAKER_03Yep. That's why things like Meister are such a, A great gift to the community really is that they help you see through some of that and raise some of the concerns to be more visible that tend to be invisible. If it's not in the PIM recommendations or in the secure score, admins may not see it.

SPEAKER_01Yeah, exactly. Secure score is like a good base that you should look at, but that's just like a starting point for a lot of the things. But are there other key things you want to cover?

SPEAKER_03No, I mean, I think that's most of what I've been doing over the last And yeah, it's exciting to try to keep up. I feel like I'm barely keeping my nose above water sometimes just because things are changing so frequently. So just thanks to you for having me on the podcast and for all of the effort that you do to, you're probably one of the people underneath me trying to push my head above water, you know? So thanks for the community.

SPEAKER_01For me, it's fun, like I was telling you, right? It's fun having these chats because I learn, with every chat, I learn something. Yeah, I like the perspective people like you bring in, Brandon, because you see things from a very different angle, right? Like where people have run into the issues and then they need help and they need to fix things. Some people might say these are like basic ones, but it's still a lot of people struggle with. Sure.

SPEAKER_03Yeah, and that's part of why I like to basically tell people that I'm not special by any means. It's just sometimes I get up on stage and sometimes I sit in front of a computer and just write things down that I feel are important and that I see people struggle with. Or even if you're not in a consultant role like I'm in, if you're an administrator who is listening to this sort of thing, like you're already taking the step to To want to better security. So if you have a unique problem,

SPEAKER_03write it up, blog about it, submit a talk about it, because if you have that problem, somebody else also has that problem. And if you have a good angle on it, it's gonna speak to somebody, even if it's been blogged about a hundred different times, maybe your angle is the one that speaks to somebody.

SPEAKER_01Absolutely. The admins are the people who see like where the rubber hits the road and the changes that Microsoft is pushing out. So the more you write about it and share, you know, that helps others come across it as well. Cool. Brandon, thanks so much for joining in. I'm sure we'll definitely have you on more to talk about all of the new research you do in the coming months.

SPEAKER_03Sounds good. Thank you so much for having me. Happy to chat with you anytime, virtually or in person. [music]

Open the transcript file

Hosts and Guests

Nobody is credited on this episode yet.

Credit the people on this episode

Be the first to rate this episode

More episodes

All episodes
  1. Which Passkey Should Your Users Get? The FIDO Alliance CTO on Passkeys and Post-Quantum Cryptography

    Nov 14, 202645 minAudio

    Microsoft is moving millions of users off SMS and onto passkeys, and most admins now have to decide which kind of passkey each group of users should get. Nishant Kaushik, CTO of the FIDO Alliance, the industry body...

    Credit the people on this episode

  2. Free AI Agents, the E7 Bill and AD vs Entra: The Workplace Ninjas US Special

    Nov 7, 202625 minAudio

    AI agents are arriving in every Microsoft 365 tenant, and the questions admins ask first are what they cost to run and what it costs to secure them. In this Workplace Ninjas US special, four of the event’s speakers...

    Credit the people on this episode

  3. Entra Multi-Tenant App Mistakes Every SaaS Builder and Admin Should Know, with Kelvin Tegelaar

    Oct 31, 202643 minAudio

    Most SaaS vendors connect to your tenant with one multitenant app and one credential, shared by every customer. Kelvin Tegelaar, founder of CyberDrain and creator of CIPP (used by well over 10,000 MSPs), sees it from...

    Credit the people on this episode

  4. Stop the Bleeding: Cleaning Up Apps, Secrets and Consent in Microsoft Entra

    Oct 17, 202651 minAudio

    Most tenants have the same problem: hundreds of app registrations and service principals, client secrets that were set to expire in a hundred years, permission grants nobody remembers approving, and test tenants that...

    Credit the people on this episode

  5. Stolen Tokens, Agents and Universal CAE: What Global Secure Access Adds to Entra ID

    Oct 9, 202650 minAudio

    A phished and stolen refresh token is one of the most useful things an attacker can take from your tenant. It is a long-term artifact, which is why so many phishing attempts go after it. Alex Pavlovsky’s answer to that...

    Credit the people on this episode