Latest / Blue Security / Protect against token theft
Transcript
- 0:06Welcome to the Blue Security Podcast, a weekly podcast for
- 0:10information security defenders where we bring you discussions
- 0:13on best practices, tools, and implementation for enterprise
- 0:16security. Now here are your hosts for
- 0:19today's show, Andy JA and Adam Brewer.
- 0:22Welcome to this week's episode of the Blue Security Podcast.
- 0:24I'm Andy, your host. I'm Adam, your Co host.
- 0:28This week I'm going to go over this blog article that was
- 0:32written by Alex Weinhart, who's one of our executive folks in
- 0:37charge of identity. He's been an identity for a very
- 0:40long time. He's been at Microsoft for a
- 0:41very long time, and the blog article's a few months old, so
- 0:45you may have missed it. I've been meaning to talk about
- 0:48this on the show, and so it's really good talking about
- 0:51protecting against token theft and token theft has been in the
- 0:55news lately. But as a baseline, anytime we're
- 0:59talking about identity attacks, MFA is going to be the thing
- 1:02that you want to turn on in order to prevent the majority of
- 1:07identity attacks, password attacks.
- 1:09The issue is that attackers are now going after the tokens and
- 1:17essentially kind of bypassing or attacking MFA.
- 1:22And so how do we defend against that when the attackers are
- 1:27going against something that is our #1 defense?
- 1:32But before we get into that, you might not know what tokens are.
- 1:36So let's just talk a minute about what are tokens.
- 1:39Adam, can you give our listeners kind of a one-on-one on what
- 1:44tokens are when it comes to identity?
- 1:47Absolutely. So tokens, and this applies
- 1:51across almost any identity provider you're doing, there's
- 1:54been kind of a migration to a standard model of doing
- 1:58identity. And whether you're using Okta or
- 2:01Pang or Entra or Google's identity or Facebook identity,
- 2:07they all operate on more or less the same concept.
- 2:10So the good news is that you learn these concepts, they're
- 2:13mostly transferable. They're nuances between
- 2:16different implementations, of course, but for the most part
- 2:19these concepts are transferable. And that's because a lot of
- 2:23identity today is built around standards.
- 2:25Things like SAML, Open ID, Connect, to name a few.
- 2:29So what is a token? Well, a token is an
- 2:33authentication artifact that grants you access to a resource
- 2:37or put more simply, it's something you can show, think
- 2:40like a hotel key to let you into your room.
- 2:44That would be an example of of kind of a real life example of a
- 2:48token. And so you get a token when you
- 2:51sign into your identity provider.
- 2:52And at first it's going to do authentication, validate your
- 2:57identity. And there's various ways to do
- 3:00that. And that happens before tokens
- 3:02get handed out. So think of tokens as separate
- 3:06from that authentication process.
- 3:08And so once you successfully sign in, then that identity
- 3:12provider will issue a token that describes who you are and what
- 3:16you have permission to do. Now when you want to go access
- 3:20an application or a service or we'll just say app from here,
- 3:24you get permission to talk to that resource by presenting a
- 3:28token that's currently signed by an issuer it trusts.
- 3:32So that's where, for example, let's say you use Salesforce,
- 3:36but you use Entra as your identity platform.
- 3:39You can create a trust between Salesforce and Entra where when
- 3:44Salesforce is presented with a token from Entra, it will say,
- 3:48ah, yes, I trust Entra for this scenario.
- 3:51Come on in. Now, the software on the client
- 3:55or the device you're using, it kind of takes care of all this
- 3:57behind the scenes. So you don't really need to
- 3:59worry about it except when it comes to things in our security
- 4:03professional mindset where it impacts our ability to secure
- 4:07organizations, like when tokens are stolen, as an example.
- 4:11So the first token you get when you sign into this identity
- 4:15provider is called a session token, and that shows you've
- 4:19successfully signed in and how you signed in.
- 4:22And so when you sign into an app, you show that session token
- 4:26and exchange it for something called an access token, which
- 4:30gives you access to a specific resource for a certain amount of
- 4:33time without having to do reauthentication.
- 4:38Now this is an important concept as well, that token exchange can
- 4:42happen even when you are not as a end user being prompted to re
- 4:48authenticate. So this is an important concept.
- 4:50I always land with folks that there used to be this
- 4:54perception. If I'm not forcing a user to
- 4:57manually re authenticate, put in their username, put in their
- 5:00password, provide their multi factor authentication, there's
- 5:03no check to validate that's still the right person.
- 5:06That is false because session tokens usually last longer than
- 5:11access tokens. Access tokens have a shorter
- 5:13life span, and if the token expires or there's a change in
- 5:17risk, the client will go back to the identity provider and ask
- 5:21for a refresh. Now if nothing has changed and I
- 5:25say, hey, my access token expired, it's been an hour, I'd
- 5:28like another one please. And it says, well, Adam, your
- 5:30password hasn't expired and you're using the same IP range
- 5:34and computer you were before. Nothing's changed with your
- 5:37risk. I'm just going to give you
- 5:39another access token. Sounds good.
- 5:41But there's that evaluation that happens all of the time, every
- 5:44time those tokens are exchanged and even more frequently and
- 5:47modern identity providers like Entra.
- 5:50So a stolen access token is bad because that might grant the
- 5:54threat actor access for, say, an hour, But a stolen session token
- 5:59is particularly bad because now that threat actor can mint new
- 6:03access tokens and keep accessing stuff indefinitely again, until
- 6:07there's a change in risk or a change in the user or something
- 6:11to trigger actual reauthentication, not just a
- 6:14token exchange, which is again, that thing that happens behind
- 6:17the scenes. Thank you, Adam.
- 6:19Now that we have an idea of what tokens are, how do attackers
- 6:25steal these tokens? Well, generally they're done
- 6:29through the use of malware on the client to acquire like a
- 6:33token. And that's one method.
- 6:36But other ways they can also copy tokens from the network as
- 6:39they passed through a proxy or a router, or you can extract
- 6:42tokens from an unsecured server logs of like some other party.
- 6:47And so there's multiple ways to do it.
- 6:49We have talking about a tool called Evil Jinx that a lot of
- 6:54attackers will use to try to steal tokens.
- 6:58They have these tools that that you know the initial vector of
- 7:02attack is usually some sort of phishing or link malware,
- 7:08something like that that eventually gets you to get
- 7:11access to the attacker and then they steal the token using some
- 7:16other program. So let me jump in one second so
- 7:20it as our listeners are listening to this, how do I
- 7:22protect against this? Step one is still great e-mail
- 7:26hygiene, other malware vector hygiene, preventing malicious
- 7:31files, links, attachments, emails from coming in your
- 7:34environment and training your users not to click on suspicious
- 7:37links, suspicious files, etcetera.
- 7:39That is still step zero in prevention here and then we'll
- 7:43talk through from there. But just want to land that
- 7:45message again when organizations are saying I'm getting hit by
- 7:48this all the time, it still comes back to get you will never
- 7:52train your users to never click. 0 clicks is not a thing.
- 7:55You will never eliminate all true positives from coming in to
- 7:59your environment, but it still starts there in terms of
- 8:02anything you can do to will that down is going to help eliminate
- 8:06the need to do some of these prevention steps moving forward.
- 8:08But obviously you're going to cause stuff's always going to
- 8:10get through those first couple of steps.
- 8:12Yeah, everything is about the basics.
- 8:14You definitely need to have the basics.
- 8:15And I think a lot of organizations look for some
- 8:18magic new tool that comes out, which we are going to talk
- 8:21about. There are some new things that
- 8:23we're going to talk about here, but we're also going to talk
- 8:25about just some practical things that are baseline.
- 8:28And Adam kind of gave you a taste of that, which is you got
- 8:31to still have good e-mail hygiene, you got to still have
- 8:34good endpoint protection. And user training.
- 8:38And user training. Thanks.
- 8:39And so the new magic tool essentially is we have this new
- 8:45thing called token binding, which essentially a token that's
- 8:50issued should only be used and work on a device that it was
- 8:55issued to. And so if that token was stolen
- 8:58and then replayed on a different device, like the attacker's
- 9:01device, it should be rejected. And so that's this thing that
- 9:06Microsoft has developed called token binding.
- 9:09And these are cryptographically tied to the device that it's
- 9:15been issued to. And so once you have this
- 9:18protection in place, it essentially makes the act of
- 9:23stealing the token useless because it can't be replayed.
- 9:28The biggest thing that we have to do now, now that we have
- 9:32token binding, is get the developers who are coding their
- 9:37programs to enable the use of protected tokens so that you can
- 9:42enforce a new condition within ENTRA conditional access, to
- 9:48require that application to use protected tokens when they're
- 9:52accessing a service. The policy will reject any type
- 9:56of token that's not cryptographically tied to the
- 10:00machine. So understandably it's going to
- 10:04be a long road before we get there to the point where we can
- 10:09enforce token protection on every single application across
- 10:13the stack for ENTRA, because the developers do have to recode
- 10:18them to allow us to use this token protection.
- 10:21Right now in public preview, you can protect sign in tokens,
- 10:26session tokens for native applications on Windows devices
- 10:29when you're accessing Exchange, SharePoint and Teams services.
- 10:35It is limited to Windows 10 or 11 that are enter joined, enter
- 10:40hybrid joined or enter registered.
- 10:43And the natives clients that are out today that you can enforce
- 10:48this on are OneDrive, Teams and Power BI Desktop.
- 10:52Important to note that the Office perpetual clients aren't
- 10:56supported. And then as we continue this
- 11:00development support for Azure management scenarios, web
- 11:03applications that are accessing M365 resources and
- 11:07cross-platform capabilities to Mac, iOS, Android and other
- 11:10clients are going to come out over this next year.
- 11:13So it's going to be a long road, but we do have some today and
- 11:18that's the new thing, this token binding, this token protection
- 11:22that is already in as a condition within interest
- 11:26conditional access. Yeah.
- 11:27It's important to note again this timeline, Microsoft
- 11:31starting with technologies that controls end to end, so Windows
- 11:35and Teams client and that sort of thing.
- 11:37Everything in ENTRA is built around industry standards,
- 11:41things like Open ID Connect, which I mentioned earlier.
- 11:43So some of this is trying to kind of commit these standards
- 11:49or commit these changes to these standards and, and get these
- 11:52standards bodies to recognize them.
- 11:53That's some of the work here and working with other operating
- 11:56system vendors. Obviously it will require
- 11:58collaboration with Google, with Apple A to ship these changes on
- 12:01other platforms because I, I think it's going to require an
- 12:03interplay of operating system plus application to get all the
- 12:07way there. So start with what you can, can,
- 12:10can control and again, start with workloads that are popular,
- 12:15but maybe not the the most popular or most complicated or
- 12:19most mission critical to start and build confidence.
- 12:21And that snowball starts to roll downhill and pick up momentum as
- 12:25it goes further down the mountain.
- 12:27So this is this certainly encouraging and and it's
- 12:30probably one of those things where if you're listening to
- 12:32this and you're not deep in the identity realm, you may say, my
- 12:37goodness, why weren't tokens always bound?
- 12:39Why? Why was there ever the
- 12:41opportunity for token replay? Why could they be passed from
- 12:44client to client? And I think in general,
- 12:47attackers are very have a high level of ingenuity and when we
- 12:51design standards, we don't always protect predict all the
- 12:54malicious may ways they would be used.
- 12:56If you look back to a lot of the standards we use today, they
- 12:59were designed in a time where they just weren't the
- 13:01assumptions of the threat environment there are today
- 13:03e-mail, I mean, amazing example where we have kind of bolted on
- 13:08a lot of security on top of it. But it was built in the 1960s
- 13:10when the only people on the Internet was the Department of
- 13:12Defense and a bunch of universities.
- 13:14Like, there were no threat actors.
- 13:16And so you could just trust what happened.
- 13:18And bringing that into the modern world has been difficult
- 13:21and not without growing pains. And although a lot of these
- 13:24identity standards are not as old as Internet e-mail, there
- 13:27are some similarities there in terms of having to bolt on
- 13:30security over time. And, you know, think about this.
- 13:33I used the analogy earlier of an access token is a lot like a
- 13:36hotel key. You know, it's, it's only active
- 13:40for a certain amount of time, but if someone else gets access
- 13:44to that, then they can access my room.
- 13:45Well, there's benefits from that in that model because I can hand
- 13:49my key to someone else. But imagine if when you went to
- 13:51the hotel and before they would issue the key to you at the
- 13:55front desk, they had to bind the key to you like it.
- 13:58The key had say an iris sensor or a fingerprint sensor built
- 14:01into it, and you had to bind it to your identity before you left
- 14:06the the front desk. And so then there was no
- 14:09transferability options with it. Now, that's not a great analogy
- 14:12because again, you may say, well, I never want a token to be
- 14:16transferable, and that makes sense.
- 14:18But just in terms of the complexity of adding binding to
- 14:21the top of it, when you could just say just protect this like
- 14:24it's a key, like don't let somebody else have it while, you
- 14:27know, easier said than done sometimes.
- 14:28So that's that's why we've kind of had to bolt the security on
- 14:32over time. But really exciting development.
- 14:35I see this as an extension of the continuous access evaluation
- 14:39Microsoft shipped several years ago.
- 14:40Now. Where would we describe the
- 14:42token model? Or I did at the top of the show.
- 14:45I used the example of a one hour lifespan for an access token and
- 14:49that used to be how it worked. If you got an access token, it
- 14:52was good for an hour and they were irrevocable.
- 14:54You could not revoke them out in the field.
- 14:57Once someone had an access token it was good for one hour
- 15:01regardless. And today, continuous access
- 15:04evaluation does more of that real time building in the
- 15:07ability to revoke them and validate if they should still be
- 15:10allowed all of the time as opposed to only on a one hour
- 15:14interval. So there's been a lot of
- 15:16innovation and iteration in this space and I'm sure the folks
- 15:20over at PING and Octa are doing similar good work here.
- 15:24But taking a lot of these standards that frankly had too
- 15:27much trust built into them and bolting security on to them and
- 15:31making them much more secure is a hard engineering problem.
- 15:34And you get there iteratively. And so proud of the progress,
- 15:37but obviously more to do. Would love to see this extended
- 15:40in the near future to things like, oh, I don't know, Outlook
- 15:43as an example would be really awesome.
- 15:45So we'll see that. And then with the web apps as
- 15:47well. So it's all coming, but be
- 15:49patient and there's a chance if you want to kick the tires on
- 15:51this, you can try it out today. And if you're a team shop, I
- 15:54mean Teams is certainly a heavily used app and and you can
- 15:58start running that now in your environment and see how it works
- 16:00and provide feedback. Yeah, absolutely.
- 16:03I think in the blog it actually talked about how token theft is
- 16:09not a huge problem. It's maybe 5% of all of the
- 16:14identity attacks. But we have seen a rise in the
- 16:19token theft arena. So it's not, it's one of those
- 16:24things where, you know, it's like the buzzword of of the
- 16:28security news. It's this new fangled attack
- 16:31and, and now we're innovating and coming up with different
- 16:34ways to protect against it. But as we talked about at the
- 16:37beginning of the show, there are still a lot of things that you
- 16:40need to do as baseline that will help mitigate this.
- 16:44So we talked about some practical steps, reducing the
- 16:47risk of successful token thefts, preventing the malicious use of
- 16:50them, and then being prepared to detect and investigate attacks.
- 16:54So when we talk about reducing the risk of a token theft, the
- 16:59first thing, if you're a listener of the show, this
- 17:01should not be a surprise to you. The first thing that Microsoft
- 17:04recommends is require a managed and compliant device.
- 17:08You would be surprised how many customers that Adam and I talked
- 17:13to. We work in our field sales at
- 17:15Microsoft. If you've been listening here.
- 17:17And you know, as part of that, we talked to a lot of customers.
- 17:21Microsoft's not a sponsor of this show.
- 17:23We, we do this on our own time, but we do talk to these
- 17:26customers and we get a lot of feedback.
- 17:28And you know, you'd be surprised at how many of them are still
- 17:32not running managed and compliant devices for all of
- 17:36their organization today at Microsoft.
- 17:39If you had my username and password, there's nothing you
- 17:43can do. You can't access anything until
- 17:46you get a managed device. And you can't do that unless you
- 17:49have MFA. And in some cases you have to
- 17:53have a pass key. Actually, in all cases now you
- 17:55have to have a fish resistant pass key or a Fido 2 key.
- 18:01And so unless you're here and you're breaking my arm and
- 18:05making me like sign in, you're not going to be able to do
- 18:08anything. And hopefully at some point the
- 18:11majority of orgs are going to get to that point.
- 18:13But yeah, you got to get to manage and compliant devices
- 18:16using conditional access policies to make sure that that
- 18:19device is compliant at least, you know, I think majorities of
- 18:23companies are now at hybrid enter join.
- 18:27If you're there you can at least require conditional access
- 18:30policy to say must be hybrid enter, join.
- 18:35But that's only part of it like you got to move at some point to
- 18:38Co management. Let Intune take over the
- 18:40compliance policies to make sure that you have compliant devices.
- 18:44There's other things in here like making sure your storage is
- 18:47encrypted. Obviously L SAS protection,
- 18:50which is enabled by default on all new devices, but you can
- 18:54enable it for other devices via Intune jailbreaking and routing
- 18:59detection on mobile devices, which of course you can do again
- 19:03through Intune and then turn on Credential Guard.
- 19:06We did a whole show on Credential Guard why it's
- 19:08important and you should turn it on.
- 19:11It is enabled by default again for devices that are running,
- 19:16but if you haven't done it on the older devices or for some
- 19:19reason, you know, because we didn't like, go ahead and turn
- 19:23it on for existing devices that upgraded in place.
- 19:25It's only like devices that started with 22H2.
- 19:29So go back and turn that on and that protects your active
- 19:33director credentials by using virtual based security to
- 19:36isolate those local and cash credentials so that you can
- 19:40protect against like stuff like pass the hash.
- 19:42So that right in a nutshell is a lot for most organizations to
- 19:46do, but it is baseline. It's something that we highly
- 19:49recommend that you get. To yeah, this, The point here of
- 19:53everything Andy's gone through is if somebody steals a token,
- 19:56you say So what? Good luck with that.
- 19:59And if you're requiring manage and compliant devices, that is
- 20:02certainly a huge step in the right direction.
- 20:06Andy, let's see, did you have this, you had this elsewhere?
- 20:10OK. So yeah, reduce the risk.
- 20:11OK, we're we've got more. I was looking at the rundown,
- 20:14the management compliant devices just to Andy's point, and I know
- 20:16the the poor horse is dead. If you are hybrid joined, and
- 20:19you probably are, and if you're using SECM, and you probably do,
- 20:23it is trivial. To deploy Intune in a Co managed
- 20:27state for your Windows devices and you don't have to shift any
- 20:31management, any app deployment, nothing.
- 20:33You can just move that slider for compliance checking and you
- 20:37can run a compliance policy in Intune to look for stuff you
- 20:39need to look for. And then you tell enter ID to
- 20:41require that. And you have just massively up
- 20:45your security game like it. For all listeners of the show,
- 20:48Andy, you talked about on our four year anniversary show, like
- 20:51our goal is to provide actionable guidance on this
- 20:53show. My goodness, if you're not doing
- 20:56that, go talk to your device management team.
- 21:00You're hearing this on Tuesday. Go talk to them tomorrow, make
- 21:03set a meeting on their calendar for Wednesday and be like, why
- 21:06the heck aren't we doing Co management and running
- 21:08compliance policy checking on the Intune side and what help do
- 21:11you need from me to get there? And how soon can we do this?
- 21:14Because if you want to up your game in security, you can't
- 21:17think of a bigger win than requiring management compliant
- 21:21devices for accessing resources. It's just good practice at this
- 21:25point and it's well overdue. And again, Andy and I, we see
- 21:30tons of customers. We talked to tons of customers.
- 21:32Very few orgs are doing this. And it, it blows me away
- 21:36everyday because this is not an insurmountable hump to get over
- 21:41to do this. You don't have to stop using
- 21:44SCCM, you don't have to enter join your devices, you don't
- 21:47have to change anything. You don't have to redeploy
- 21:49devices in the field, you don't have to wipe them, nothing.
- 21:52It's so it's not that hard to get there and it's a great first
- 21:57step and it sets you on the right path forward.
- 21:59But this is a huge win you can get now.
- 22:01So please take a look at this, get it going.
- 22:05And if you're not using Credential Guard, kind of the
- 22:07same thing at this point, talk about low hanging fruit.
- 22:10Get it done. These are two huge, huge wins.
- 22:13We're begging you, please to get these knocked out.
- 22:16I love seeing that Credential Guard ships by default IN22H2.
- 22:20And even one of the exciting things about these Copilot PCs
- 22:22that have recently launched and we'll soon extend to Intel
- 22:26silicon and AMD silicon as well, is there are very strict
- 22:30security standards around Copilot Plus PCs.
- 22:34All of the things that must be enabled by default
- 22:36out-of-the-box, including like Windows Hello, Enhanced Sign on
- 22:38security, we continue to up the game for what's on by default in
- 22:42Windows. And I think that especially for
- 22:45our audience and listeners of our show is a huge, huge win.
- 22:48So love to see that keep marching forward.
- 22:49So when we talk about preventing the use of stolen tokens, you
- 22:54want to start by making a conditional access policy for
- 22:57this token protection. You can do that today, at least
- 23:01for the apps that are available like we talked about the apps
- 23:04that are available, but Microsoft is continually
- 23:07updating the apps and hopefully other application developers
- 23:10will follow suit. And you always want to be using
- 23:13the latest version, so make sure that you test it.
- 23:17Configure a conditional access policy to require token
- 23:20protection for sign in sessions on these applications, the Teams
- 23:23client, the OneDrive and Power BI and you know as more apps get
- 23:29updated and you should update that conditional access policy.
- 23:32If you are live customer or an entra P2 customer, you can
- 23:39create a risk policy. So risk based conditional access
- 23:42will help prevent the use of stolen tokens as well.
- 23:45That's when you know the sign in risk or a user risk goes to
- 23:51medium or high. You can then re require them to
- 23:55re authenticate or you know do another MFA prompt in order to
- 24:00get that new access token. So that will make it more
- 24:03difficult for the attackers to initiate a session using the
- 24:06session stolen session tokens. One point of clarification there
- 24:10that is specific to session tokens, which Andy did say.
- 24:13Remember the session token is the one I can exchange for
- 24:15access tokens with different apps.
- 24:17This doesn't help with the access token theft because that
- 24:21access token is already stamped saying you've already done MFA,
- 24:24you don't need to do it again so you can come on into the the
- 24:26app. So risk based conditional access
- 24:29doesn't help with access token theft.
- 24:31The good news about that is it has a limited lifespan, about an
- 24:33hour. But it does help with those
- 24:35other scenarios like session token theft and preventing that
- 24:39RE authentication because the attacker may have stolen the
- 24:41session token, but hopefully they haven't stolen those second
- 24:45factors your users are using. And so when the RE
- 24:47authentication prompt hits them because their risk changed, the
- 24:51attacker can't satisfy that and now you've locked.
- 24:53And then Adam talked about the continuous access evaluation or
- 24:57CAE that can automatically invalidate tokens when entry ID
- 25:02protection raises the risk of a user or a service principal.
- 25:06So this can trigger the risk based conditional access
- 25:09policies as well and mitigate them in real time by requiring
- 25:13re authentication. You can also reduce the risk of
- 25:17token reuse by restricting the sessions to a specific network
- 25:21boundary. So obviously, well I wouldn't
- 25:24say obviously, but like most of the time the so on tokens are
- 25:29going to be used outside of an untrusted IP.
- 25:32So you can establish network boundaries with policies to make
- 25:36sure that if they are coming from an unknown location or
- 25:40known bad location to block that.
- 25:42We've talked about some of the things in Entra suite as part of
- 25:45our Security Service edge solution.
- 25:49So intra private access and intra Internet access.
- 25:54And you can use this if you're, if you're a customer and you're
- 25:59actually using the solutions, you can use that as a network
- 26:03condition as well to require them as part of your conditional
- 26:07access policy to be coming from one of those IP addresses or
- 26:13compliant networks as part of that that condition access
- 26:17check. So I want to add a little bit of
- 26:19additional detail context around what Andy just talked about with
- 26:23the network locations. So if you've been listening to
- 26:26the show for four years, you know, Andy and I are really down
- 26:30on and continue to be down on using the network location of a
- 26:34sign in as a reason to reduce the requirements elsewhere.
- 26:39For example, we used to see a lot of organizations say, oh,
- 26:42well, if you're coming from a trusted network, you don't need
- 26:44to do MFA. We still do not recommend that
- 26:46to be crystal clear. In fact, I think every sign in
- 26:50every time should always require multi factor authentication, but
- 26:53the user experience should not be.
- 26:55They get prompted all day because of the default settings
- 26:58and ENTRA would not require that.
- 27:00If nothing else has changed, user doesn't get re prompted.
- 27:03Now what we're talking about here is using the network signal
- 27:07as an additional signal to build trust in a sign in.
- 27:10Just as we walk through using things like user risk and sign
- 27:14in risk and a managed and compliant device and using those
- 27:20to build trust in a sign in, the same is true here.
- 27:23You can use the network location to build trust in the sign in.
- 27:26Now the benefit of using the intra secure service edge for
- 27:30that the intra Internet access in this case is that Microsoft
- 27:36still does not recommend hair pinning all of your Microsoft
- 27:39365 traffic back through your on premises network through your
- 27:42VPN. So well, yes, you could tell
- 27:44users we're going to use an always on VPN, there's no split
- 27:47tunneling. Then we're going to require that
- 27:49in our conditional access policy.
- 27:51In theory, yes, that's going to build more trust and reduce your
- 27:54risk of token theft. However, your users will have a
- 27:57degraded experience in Microsoft 365.
- 27:59They'll have more latency, everything will be slower and
- 28:02degraded compared to the experience they could have.
- 28:05So the benefit is with intra Internet access you don't have
- 28:09that problem. It remains performant, low
- 28:11latency, high bandwidth experience.
- 28:14But you are still looking for that additional factor of this
- 28:18sign in must originate from the intra Internet access service in
- 28:22order to be allowed to proceed. And when an attacker steals that
- 28:25token, they don't have that and enter says, yeah, this token's
- 28:28no good here. And that is a beautiful thing
- 28:30for you. So just wanted to add some
- 28:32clarity on using network as an additional trust factor or or to
- 28:37build trust, I should say in the sign in as opposed to a reason
- 28:42to reduce your other security requirements, which you
- 28:45absolutely still should not do. But I'm seeing almost a little
- 28:49bit of a renaissance in terms of we can use the network to build
- 28:52trust elsewhere. And that is not a bad thing.
- 28:55It just can't be the only thing or the only signal we look for.
- 28:58And as an excuse to reduce security elsewhere.
- 29:00And Microsoft is doing this today with some of our
- 29:05applications. I have been denied access to
- 29:08some internal apps even though I'm on a managed device.
- 29:13I have MFAI have a pass key. They were still require you to
- 29:18be on VPN and come from a specific IP address.
- 29:22So it's not a bad thing to layer on more security.
- 29:26It's bad when you relax it and make an exception.
- 29:29Because. You're coming from a trusted.
- 29:30IP succinctly part yes. Well done.
- 29:32So finally, you want to be prepared to detect and
- 29:36investigate any attacks that are using stolen tokens.
- 29:39Now from the Entra side, in the Microsoft side, we have Entra ID
- 29:45protection in Microsoft Defender.
- 29:47Now whatever service that you're using, if you're using Octa or
- 29:50Ping or Duo or whatever IDP, you know, you're going to want to
- 29:53ask them do they have alerts for token theft?
- 29:57And same thing with your EDR, do they have alerts for possible
- 30:03attempts to access the primary refresh token or the PRT?
- 30:07And that's for the device. So with Microsoft solutions, we
- 30:10do have new alerts built in when a threat actor tries to replay a
- 30:15token or the sign an event triggers like a anonymous token
- 30:19or an unfamiliar sign in properties detection such as
- 30:22like an unusual token lifetime or token play from an unfamiliar
- 30:27location. Token attributes are unusual and
- 30:29don't and match known attack patterns.
- 30:32So those are things that we've built into our solutions.
- 30:35Definitely check with yours to see if they've updated because I
- 30:39think this was pretty new in the last six months to a year that
- 30:42we came out with these type of alerts.
- 30:44Yeah. Agree.
- 30:46And then finally, of course, the final thing, which is basic to
- 30:49anyone who's in security, pull all of your data into a SIM.
- 30:53Ours at Microsoft is called Sentinel, and you can use that
- 30:56to investigate potential theft. So if you're receiving an alert,
- 30:59you can pull it into a SIM and you know, get specific details,
- 31:03severity, when it occurred, so on and so forth.
- 31:07So you want to be prepared to see the alerts, you want to be
- 31:11prepared to investigate those type of alerts.
- 31:13Yeah, absolutely. And with these kind of post
- 31:18incident alerts, some of these are not necessarily real time.
- 31:22They're going to be after the fact, but hopefully you can
- 31:26catch before the attacker is done too much damage or gotten
- 31:29too far. But it's another tool in the
- 31:31toolbox, right? Obviously we talked about on the
- 31:34show. Here's where you can start with
- 31:36prevention and that's really basic in terms of e-mail hygiene
- 31:40and user training and requiring managed devices and, and there's
- 31:44different conditional access policies you can require that
- 31:47basically make it impossible or nearly impossible for attackers
- 31:50to steal these tokens. And we didn't even really get
- 31:53into like preventing the theft in the 1st place because some of
- 31:56the things you can do to help with that are require a fish
- 31:59resistant multi factor authentication.
- 32:01Because then the the fishing effort itself like the evil jinx
- 32:05server will fail because the fish resistant methods will
- 32:09detect, hey, this isn't the actual site, this is a proxy and
- 32:13and refuse to sign in. So there's other ways to prevent
- 32:16as well. But at a certain point you have
- 32:18to say, OK, well, we still have to have a plan for response.
- 32:22And your response is your IDP should generate alerts.
- 32:26Even better if those alerts are contextualized in the timeline
- 32:29of the incident with information from other services.
- 32:32If you do that in your SIM, awesome.
- 32:34If you do that in your XDR platform like Microsoft does,
- 32:37you would actually see the e-mail that came in the
- 32:40malicious attachment, you would see it detonate and execute on
- 32:44the endpoint from Defender for endpoint.
- 32:46And then you would see the identity compromise.
- 32:48And those would all be in a timeline and a single incident
- 32:51automatically correlated. And that really should be your
- 32:53North Star. Whatever you're doing, whatever
- 32:56set of solutions you're using, whether you're stitching
- 32:58together multiple third party solutions and you're dumping it
- 33:01all in a SIM, like you should be able to go in that SIM and that
- 33:04should all be automatically correlated in a single view.
- 33:08So you can track it across security domains.
- 33:10If you don't have that, Microsoft does, I don't know
- 33:12what else to tell you. So it's one of those things of
- 33:15that that should be a goal because that exists.
- 33:17That's not a flying car and being able to help you do your
- 33:20investigation because obviously at that point, if you're post
- 33:23incident, we well, we want to know did anybody else get this
- 33:26e-mail? Have we seen the signature
- 33:28anywhere else hasn't been on any other endpoints and let's block
- 33:31that from all endpoints. But I'll remove that e-mail from
- 33:34all mailboxes and then let's go investigate this user, let's
- 33:36reset their password and invalidate all their tokens and
- 33:41go do an investigation. So having the ability to see all
- 33:44that really seamlessly, obviously it's going to
- 33:47accelerate your investigation response.
- 33:48And that's really helpful. Well.
- 33:51Great show, Adam. Hopefully everyone learned a
- 33:53little bit about tokens, token theft and how to protect against
- 33:56them. That's our show for this week.
- 33:59Thanks for watching and listening.
- 34:01As always, our contact information will be in the show
- 34:04notes as well as a link to Alex Weinhart's blog.
- 34:07If you have any questions or topics you want us to talk about
- 34:10in the future, please let us know.
- 34:12Thanks. We'll talk to you guys next
- 34:13week. Thank you for listening to the
- 34:14Blue Security Podcast. Please check out the show notes,
- 34:17catch up on episodes you may have missed, and subscribe so
- 34:20you don't miss any future episodes.
- 34:22Find Andy on Twitter at a Jaw Zero and Adam at AJ Brewer.
- 34:27See you at our next episode.