Latest / Blue Security / Storm-0558 - Attack on Exchange Online
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 house for
- 0:19today's show, Andy JA and Adam Brewer.
- 0:21Welcome to this week's episode of the Blue Security Podcast.
- 0:24I'm Andy, your host. I'm Adam, your cohost.
- 0:27This week we're going to talk about this attack that has
- 0:30happened on Exchange Online that has been in the headlines where
- 0:34a China based actor has accessed some of Exchange Online data and
- 0:40exfiltrated it. So we'll just talk about from a
- 0:42high level first what happened and that is on July 14th.
- 0:48Microsoft put out a blog that reported an attack by a China
- 0:51based actor that we have dubbed Storm 558.
- 0:56And that threat actor gained access to e-mail accounts
- 0:59affecting approximately 25 organizations including
- 1:02government agencies as well as some consumer accounts of
- 1:06individuals that were likely associated with those
- 1:09organizations. And the TLDR version of it is
- 1:14essentially they used a Microsoft account or an.
- 1:18MSA from the consumer side token signing key to forge access
- 1:22tokens for a set of victim, user, consumer and enterprise
- 1:27inboxes and this allowed them to access the e-mail data from
- 1:31those inboxes and they were able to exfiltrate unclassified
- 1:35Exchange Online Outlook data from a small number of those
- 1:38accounts. The issue was mitigated in
- 1:42Exchange Online on June 27th by blocking the use of the key and
- 1:45then full invalidation of. The key was done on June 29th
- 1:49which prevented it to be used in any systems.
- 1:52So bottom line is Microsoft has completed the mitigation of the
- 1:56attack for all customers. So Storm 558 isn't something
- 2:01that's new. If you know anything about
- 2:03Microsoft threat Intel. We have a bunch of different
- 2:08agencies that we work with different parts of the company
- 2:12and by we as a disclaimer, both Adam and I do work for
- 2:15Microsoft, but the show is not sponsored.
- 2:18By Microsoft we just mentioned that.
- 2:19And so Microsoft does have a whole threat intelligence
- 2:23department that works with nation states.
- 2:26We have people who are focused on different geographical areas,
- 2:29different government agencies, and this storm five of eight has
- 2:34popped up before in the threat. Intel's as part of their tactics
- 2:38and procedures and normally they have targeted US and European
- 2:42diplomatic, economic or legislative governing bodies or
- 2:45individuals connected to Taiwan. Or the Uighur geopolitical
- 2:49interests in China. And historically they have
- 2:52displayed interest in targeting media companies, think tanks and
- 2:55telecommunication equipment or service providers.
- 2:57This was kind of the first time that they saw it targeting the
- 3:01US government and that's mainly who was compromised here.
- 3:05The objective for Storm 558 has usually been to obtain
- 3:11unauthorized access to e-mail accounts and they do that
- 3:14through a number of means like credential harvesting.
- 3:18Campaigns or Oauth token attacks.
- 3:21This threat actor has displayed a higher than normal interest in
- 3:25Oauth applications, token theft and token replay against
- 3:28Microsoft accounts since August 2021.
- 3:31And the actors are generally pretty technical and they are
- 3:35aware of their targets, environments, their logging
- 3:38policies, their authentication requirements and policies and
- 3:41procedures. Their tooling and reconnaissance
- 3:43activity suggests that Storm 558 is very technically.
- 3:48Well resourced and has a indepth understanding of many of the
- 3:52authentication techniques and applications.
- 3:54So this is not your basic script Kitty that is trying to do some
- 3:58sort of MFA bombing or something like that.
- 4:01These guys are very very good. I think that's the really
- 4:03important point here is the sophistication of a threat actor
- 4:07like Storm 0558 in that they were able to deploy very novel
- 4:12techniques to gain this level of access, things that I will say
- 4:17at least from. My perspective I haven't really
- 4:19seen before or heard about before.
- 4:21And this is where sometimes when we talk about guidance for
- 4:26things that may seem difficult to implement or may seem
- 4:29sometimes even counter to prevailing notions, This is why
- 4:33that's so important is it's not so much paranoia as it is just
- 4:39limiting the possibility of things happening, regardless of
- 4:42the sophistication of a threat actor.
- 4:44When you say, well, you know, maybe they could do this, these
- 4:47are the folks we're talking. About when we talk about things
- 4:50that seem relatively unlikely but possible, when you make it
- 4:54impossible entirely, even the most sophisticated threat actor
- 4:56can't do it. So I guess when I'm beating
- 4:58around the Bush at Sane and I'll come out more directly is we did
- 5:01a show about this Andy, I think 4-6 weeks ago now about
- 5:05decoupling your online environments from Microsoft or
- 5:10even third parties from your on premises environment.
- 5:13So separating cloud and on premises and some of that
- 5:16activity is difficult. And some of it runs counter to
- 5:19prevailing notion. And I've had really great
- 5:22conversations with customers who've kind of walked me through
- 5:25some of their concerns and the way they do things today and why
- 5:29that might be difficult. And to be clear, that would not
- 5:32have mitigated this specific attack.
- 5:34But I'm just speaking more generally about when we share a
- 5:37new story like this and we talk about an adversary like this,
- 5:41you know, my intention is not to scare you and make you think the
- 5:45sky is falling. It's to.
- 5:48Take that really rational, sober look at these kinds of attacks
- 5:52and figure out what we can do about them.
- 5:54And with very sophisticated threat actors that are very
- 5:58determined, it's going to be difficult to keep them out.
- 6:00And that's where you almost have to get into mitigations where
- 6:03it's not unlikely, it's impossible.
- 6:05And that's where some of this guidance goes sometimes.
- 6:08So anyhow, I don't mean to get on the soapbox, although I tend
- 6:11to do that on this show. And that's kind of the point.
- 6:13But when I hear about the level of sophistication here, it is
- 6:16scary, but we just kind of have to take.
- 6:18That step back and figure out what control we can control.
- 6:20And sometimes that is taking very well-intentioned guidance,
- 6:23even if it's difficult to implement sometimes.
- 6:25And this was a very targeted attack to.
- 6:28Vary. Yes.
- 6:29This was mainly essentially a China sponsored actor that
- 6:33attacked to the US government. They were looking at a very
- 6:36small subset of accounts. It was mostly the US government.
- 6:40So you do have to take into account risk, right?
- 6:43How at risk is your organization and then implement many.
- 6:48Applications based on that some things will be more difficult,
- 6:51but in this case, let's continue talking about a little bit more
- 6:54of how this all happened. So Microsoft began an
- 6:58investigation on June 16th following a customer reported
- 7:01anomaly and Exchange Online data access.
- 7:04That customer was actually the Federal Civilian Executive
- 7:07Branch or FCEB and the FCEB agency around mid June 2023,
- 7:15observed mail item. Access events with an unexpected
- 7:20client App ID and App ID in M365 audit logs.
- 7:25So that is a specific event that's generated when licensed
- 7:29users access items within Exchange Online mailboxes using
- 7:33any connectivity protocol from any client.
- 7:36The FC EB Agency deemed that this was suspicious because the
- 7:40observed app ID did not normally access mailbox items in their
- 7:45environment, so this was a well tuned.
- 7:48Sock environment where they knew their baseline and they have
- 7:52audit turned on and they were able to kind of see something
- 7:55was being accessed that was outside of their normal
- 7:58baseline. They reported this to Microsoft
- 8:00and then based on the investigation Microsoft
- 8:03attributed the activity to Storm 0558 based on prior Ttp's and
- 8:08they it was also determined that the access was gained around May
- 8:1215th based on kind of the level of access and how things were.
- 8:18Being done, at first, the Microsoft analysts were actually
- 8:21worried that an Azure AD enterprise signing key had been
- 8:24compromised and that the actor was using it to forge
- 8:27authentication tokens. However, during the
- 8:30investigation, in an indepth analysis of the attack, it was
- 8:32discovered that the attacker was forging Azure AD tokens using an
- 8:37acquired Microsoft account or MSA consumer signing key.
- 8:41This was made possible by a validation error in Microsoft
- 8:45code. That is the whole crux of.
- 8:48The issue, the attack and essentially the zero day that
- 8:51happened here, the use of an incorrect signing key to sign
- 8:55the request allowed the investigation teams to see that
- 8:58the actors access requests, which followed a pattern across
- 9:02both enterprise and consumer systems that it was an indicator
- 9:05that no Microsoft system would sign tokens in this way.
- 9:08So based on that, we knew that there was number signing key
- 9:13that had been essentially compromised from an enterprise
- 9:16standpoint from the Azure AD. Standpoint.
- 9:18So the signing key that was compromised, it was used to
- 9:21forge a token and I guess we could kind of talk about token
- 9:25forgery and how that happens. Authentication tokens, they're
- 9:28generally used to validate identities of entities
- 9:31requesting access to a resource and in this case it's e-mail.
- 9:35And these tokens are issued to a requesting entity like a user's
- 9:39browser by an identity provider like Azure AD.
- 9:43And in order to prove authenticity, the identity
- 9:46provider signs the token using. A private key.
- 9:49The Relaying Party validates that token presented by the
- 9:52requesting entity by using a public validation key.
- 9:55So very similar to you know, PKI, you're just signing it with
- 9:59a private key, you validate it with a public key and if the
- 10:03signatures are validated then the key will be trusted by the
- 10:06relating party. An actor can acquire a private
- 10:09signing key and then use that to create falsified tokens with the
- 10:12valid signature that would be accepted by the relying party.
- 10:14So essentially you're stealing this the private key signing.
- 10:18It and then sending it off and because you have the key, it is
- 10:20forged. Storm 0558 acquired an inactive
- 10:24MSA consumer signing key and used it to forge authentication
- 10:27tokens for Azure AD Enterprise and MSA Consumer to access
- 10:32owaandoutlook.com. All MSA keys active prior to the
- 10:36incident, including the one that the actor acquired, have been
- 10:39invalidated. Azure AD keys were not impacted.
- 10:42The method by which the actor acquired the key is still an
- 10:45ongoing investigation, but the key.
- 10:48It was only intended for MSA accounts and because of this
- 10:51validation issue it was allowed to be used to sign Azure AD
- 10:55tokens and this issue has been corrected.
- 10:58So again, that is the reason why they were able to use an an MSA
- 11:02signing key to sign an Azure AD token.
- 11:05That was never intended to happen and that was an error in
- 11:08the code. So what I previously was just
- 11:11talking about, you know, kind of comes back here in the sense
- 11:15that one of the concerns we've talked about in the past why?
- 11:18We guide against running your own identity infrastructure on
- 11:21premises is because you're at risk for this attack too.
- 11:24And in fact, we saw many organizations fall victim to
- 11:27attacks just like this in the aftermath of the Salora Gate.
- 11:31The SolarWinds Compromise, where those threat actors use that
- 11:35initial foothold from that malicious SolarWinds code, got
- 11:38into your environment, stole your signing keys for your
- 11:42tokens, you're minting in your on premises identity
- 11:45infrastructure, and that was often duo could have been.
- 11:48DFS as well and then use that to gain privileged access to cloud
- 11:51based services. So not the same thing as here.
- 11:54Again to be clear, but same concept, same idea in theory.
- 11:59Now ultimately what this comes down to is there's still an
- 12:02investigation on how this threat actor obtained the MSA signing
- 12:05key. That's still something we need
- 12:07to figure out because obviously problematic, we don't want bad
- 12:10guys gaining access to signing keys for Microsoft Identity
- 12:13services. So more to come there.
- 12:15The second piece of it is Azure AD.
- 12:18Should not trust tokens that are intended for the consumer
- 12:22environment. MSA.
- 12:23That has been corrected and has been corrected for all
- 12:26customers. Now the one benefit, if we're
- 12:29finding a silver lining to all this, and Andy touched on this a
- 12:31moment ago, was because the threat actor used this very
- 12:34novel technique in a way that would never happen under normal
- 12:38circumstances. It made it possible to find any
- 12:41and all instances of this behavior and eradicate all of
- 12:44them. So we're able to very
- 12:46conclusively say this risk. It's been fully mitigated.
- 12:49This thread has been fully extinguished.
- 12:50The thread actor has been fully repelled from the environment.
- 12:53So that's a positive thing to come out of this.
- 12:56Obviously, I think all of us as security professionals are
- 13:00interested to continue following in this story.
- 13:02And I will say Microsoft has stated in our blog post that we
- 13:07intend to be very transparent about this.
- 13:09I think there have been just acknowledging some commentary in
- 13:14the Infosex space that they would like to see more
- 13:17transparency. I don't have any insight into if
- 13:19or when that will happen, but I imagine we will see more,
- 13:23especially as some of these investigations complete and more
- 13:25details are able to be shared. So I will say stay tuned, but
- 13:29ultimately what you need to know right now is this is no longer a
- 13:32threat, but it would be helpful to know what can you do to be
- 13:36better protected And I think Sisa has shared some guidance
- 13:39that we can pass along. Absolutely.
- 13:41There will be a lot of links for this week's show notes, so take
- 13:46a look at, you know, the. Description of the podcast
- 13:49Wherever you listen, there will be a lot of links, like the
- 13:51links to the blog for Microsoft where we first announced it.
- 13:54There is an updated blog on a complete analysis of the
- 13:59techniques for Storm 0558. And then I will have the Sisa
- 14:03recommendations as well, which is very, very good, which we'll
- 14:06go through from a high level right now.
- 14:08And then there will also be links to all the things that
- 14:11Sisa talks about, which they first start off with making sure
- 14:15that you have audit logging enabled and so this.
- 14:18Again, I will have the links to the Microsoft documentation on
- 14:22how to turn on Audit Logging and within the documents for SEESA
- 14:27they also link to their Microsoft Exchange Online
- 14:30Microsoft 365 Minimal Viable Secure Configuration Baseline.
- 14:34Wow, that is a mouthful. But this is actually super
- 14:37interesting because if you go to their Secure Configuration
- 14:41Baseline it talks about many different things, but one of the
- 14:44things in there is Audit Logging shall be enabled and this is.
- 14:48For all federal agencies. So this is Sisa's guidance for
- 14:52all Microsoft Exchange Secure Configuration baseline.
- 14:55All federal agencies must have audit logging enabled by
- 14:58default. Microsoft retains audit logs for
- 15:0090 days. Activities for users with E5
- 15:03license is logged for one year and with Sisa's requirements
- 15:08they actually need like longer than that.
- 15:10It's I think 18 months or something like that.
- 15:13Hot storage and then longer with cold storage.
- 15:16So if you do need longer. You can do a couple of things.
- 15:19You can either offload the logs and then store them somewhere
- 15:21else, or you can create an audit log retention policy within M365
- 15:27and there are some options there.
- 15:28You can do seven days, 30 days, six months, nine months, one
- 15:31year, three years, five, or seven years.
- 15:33And then there's even a longer like addon license for audit log
- 15:37retentions where you can go up to 10 years for your audit logs.
- 15:40So this is #1 because this is where they found, you know, some
- 15:45of the things that were anonymous based on their
- 15:47activity. Activity the second one in
- 15:49addition to audit logging is enable Purview Audit Premium
- 15:53logging. This does require licensing at
- 15:56the E5 or G5 for government agencies, but that just is
- 16:02premium logging which gives you more robust events I think.
- 16:06If I'm not correct there was some talk on some of the
- 16:10Infosect, Twitter or mastered on all the different things threads
- 16:14that are out now where the mail. Accessed events was only
- 16:20available within the premium audit logging O some of the
- 16:24events you may not be able to see unless you have remium audit
- 16:27logging. Yeah, that's correct.
- 16:29The bail items accessed is a premium audit feature and I want
- 16:32to touch on this for a moment because there has been some
- 16:36commentary in the Infosex space about this.
- 16:38So to be clear, this is not something that previously
- 16:42existed in Exchange Online and then was yanked away and added
- 16:46in a premium tier. This was net new capability that
- 16:50was added to the Exchange Online service for an additional cost
- 16:54if you chose to pay it. If you wanted premium audit, you
- 16:58could. Get it?
- 16:58And the benefit is, this does give you a much higher level of
- 17:01confidence over exactly what items were accessed by either
- 17:06users who should have access or users who shouldn't have access.
- 17:09But it's down to an individual mail item level, regardless of
- 17:13protocol, regardless of client, regardless of anything.
- 17:15So it's a very powerful audit event, extremely noisy,
- 17:20extremely computationally expensive, that costs Microsoft
- 17:23money to run. That reduces Microsoft's margin.
- 17:26So ultimately some of the cost. Of that has to be shared by
- 17:30customers both the research and development to create and enable
- 17:33that new capability as well as the ongoing operationalization
- 17:37of it. So I know there's been some
- 17:39commentary about that feeling like this is pay for play
- 17:42security, which I would say the whole info sect space is pay for
- 17:45play but ultimately this is expensive to operate.
- 17:48If you want this level of auditing, it is available for a
- 17:51nominal fee and I don't think it's anyone just trying to gate
- 17:55everything between a higher tier, it's ultimately.
- 17:58There's a cost to run that service.
- 18:00There's a cost to create and maintain that service, and some
- 18:04of that has to be shared by the customer.
- 18:06So this is not a malicious thing.
- 18:08This was not a existing capability that was locked away
- 18:11later. It was new engineering effort.
- 18:13And it's a very, very, very noisy service.
- 18:16If you can imagine across the millions of Exchange Online
- 18:19mailboxes, auditing down to an individual mailbox item every
- 18:23single time it's touched and accessed would be enormously
- 18:26computationally expensive, you have to think.
- 18:28Of when you operate at cloud scale, and we're talking in the
- 18:31millions and billions and trillions of events, anything,
- 18:34even if it seems relatively small, can add up at that scale.
- 18:38And so this is just one of those things.
- 18:40So not trying to be a Microsoft apologist here, but trying to
- 18:43give equal weight to the whole story.
- 18:45Things like this aren't always easy to just flip on and enable
- 18:48for everyone. And then you also have to
- 18:50balance that against Microsoft did do a cost increase on the E3
- 18:55platform for the first time in essentially the services.
- 18:58History, you know, over 10 years of service over basically the
- 19:02last 12 months or so, last 18 months or so.
- 19:04And obviously any cost increases, enormously unpopular,
- 19:08but there had been a lot of new capability added to the service.
- 19:11And of course, the cost of operating cloud services has
- 19:13gone up over the last decade with the increases in energy
- 19:16costs and computing hardware costs and people costs and real
- 19:20estate costs and everything else.
- 19:22And so eventually that cost had to be added on too.
- 19:24If Microsoft kept throwing everything into the E3 platform,
- 19:27the cost. Would increase a lot faster than
- 19:30I think most customers are comfortable with.
- 19:32So the model, instead of throwing everything in there and
- 19:35just raising the cost all the time, is allowing organizations
- 19:38to self select what additional capabilities and features they
- 19:41want. And again, I don't want to sound
- 19:42like an apologist, but I think it's really easy to sit in our
- 19:45infosec armchairs and throw shade at cloud providers and act
- 19:49like they should just include everything for free all of the
- 19:51time. And that's just not economically
- 19:54viable. And I think for most
- 19:55organizations they actually would not want that because.
- 19:58Is they don't want a the rate of change without their own buy in,
- 20:02but B they wouldn't want the rate of cost increase without
- 20:04them being able to choose when and how they want to bear that
- 20:07cost increase. So things to think about, it's
- 20:10not as simple as just give it away to everyone all the time.
- 20:13As much as we would love for everything to be free all the
- 20:16time, there are costs associated with everything and there are
- 20:19trade-offs involved and those decisions aren't always easy.
- 20:22And I will say nobody gets them right, including our employer
- 20:25all of the time, but it's really easy sometimes to take those.
- 20:28Shots And in reality, it's a lot harder to balance all those
- 20:31conflicting needs and resources. A couple more things on logs
- 20:35that Sisa recommends Making sure that logs are searchable by
- 20:39operators and then enabling Microsoft 365 Unified Audit
- 20:44Logging or UAL. UAL should be enabled by
- 20:46default, but we're basically saying go and validate these
- 20:50settings and I'll have a link for you to go and check the
- 20:52documentation if you're not sure where to find it.
- 20:54And finally understand your organization's baselines this
- 20:58was. Super important in discovering
- 20:59this activity. So you need to know what your
- 21:02baseline patterns look like and then when things are abnormal
- 21:05versus normal traffic, you should be able to visualize that
- 21:09under general cloud mitigations. I found this to be a very
- 21:12interesting section that Sisa talked about.
- 21:14The first thing they talked about was a little bit throwback
- 21:18to our last episode of our podcast where we talked about
- 21:20the shared responsibility model, in this case the mitigation
- 21:24actions All were responsible for Microsoft.
- 21:28To mitigate because it was part of the cloud based
- 21:30infrastructure, so this was on Microsoft.
- 21:32However, CSA and the FBI have recommendations for critical
- 21:36infrastructure implementations or hardening cloud environments,
- 21:39and while some of these probably wouldn't have mitigated this
- 21:43particular attack, they will reduce the impact of less
- 21:47sophisticated malicious activity targeting cloud environments in
- 21:50the future. So a couple of things.
- 21:51They have recommendations for baseline security configurations
- 21:55for all the different Microsoft solutions here listed.
- 21:58O defender for Office 365, Azure Active Directory which now is
- 22:03called Intra ID and Exchange Online, OneDrive for Business,
- 22:07so on and so forth. So there LL be links within the
- 22:10documentation to take a look at the security configuration
- 22:13baselines. Another bullet that they have is
- 22:15have separate administrator accounts from user accounts.
- 22:17We've talked about that many, many times.
- 22:19Collect and store your security logs, endpoint solutions, cloud
- 22:23applications, security services, firewalls, DLP systems all that
- 22:27and. You know, make sure that you
- 22:29have a way to store and collect those and then use a telemetry
- 22:33hosting solution. The interesting way to put it,
- 22:35basically a SIM that aggregates log data and telemetry data to
- 22:39allow you to monitor and audit and alert off of that.
- 22:43And then the final bullet, again, this is something that I
- 22:45love reading through this stuff because it's like, oh, this is
- 22:48something that I would have never thought of.
- 22:49Review contractual relationships with all your cloud service
- 22:52providers and ensure the contracts include security
- 22:55controls the customer deems appropriate appropriate monitor.
- 22:58Monitoring and logging of provider managed customer
- 23:00systems, Appropriate monitoring of service provider presence
- 23:03activities and connections to the customer networks, and
- 23:05notifications of confirmed or suspected activity.
- 23:08So all of your cloud services, all of your solutions that you
- 23:11implement, make sure that you're reviewing the contracts and
- 23:14understand what that all entails.
- 23:16Yeah, great guidance here from our friends over at CISA.
- 23:20I think top to bottom, this is spot on.
- 23:22I have not looked through these configuration baselines for some
- 23:26of these services. I'm interested to check that
- 23:28out. And maybe we could do a show on
- 23:29it in the future because I'm kind of curious to see that laid
- 23:32out on how they recommend for example, you configure Exchange
- 23:35Online. So things I'll be checking out
- 23:37for sure. But overall, yes, make sure your
- 23:39audit logs are enabled, end to end audit log, all the things.
- 23:43Most of these cloud mitigations are good guidance, separate
- 23:47administrator and user accounts. That's kind of what I've been
- 23:49getting at earlier. Collect everything, store it in
- 23:51different solutions. Yeah, perfect.
- 23:53I like to call out too about reviewing the contracts with
- 23:55Csp's and seeing what what is. Is it included and understand
- 23:59the providers responsibilities versus your responsibilities.
- 24:03This still comes up regularly with customers in that there's
- 24:06sometimes misperceptions or outright confusion over what's
- 24:10Microsoft's responsibility versus what's their
- 24:12responsibility. And you undoubtedly have more
- 24:16cloud service providers than just Microsoft.
- 24:18You may work with ServiceNow or Salesforce or Work Day.
- 24:20And so having that clear understanding of what their
- 24:23responsibilities are and what yours are is really, really
- 24:25important as well. And I think it's easy to be
- 24:28like. While we're in the cloud, they
- 24:29do everything, but that's not how it actually works.
- 24:32So really, really good call out there on making sure you're
- 24:35crisp on what you need to do. And that's our show for this
- 24:38week. Thanks for watching and
- 24:39listening. As always, our contact
- 24:41information will be in the show notes if you have any questions
- 24:43or topics you want us to talk about in the future.
- 24:46Thanks. We'll talk to you guys next
- 24:47week. Thank you for listening to the
- 24:48Blue Security Podcast. Please check out the show notes,
- 24:51catch up on episodes you may have missed, and subscribe so
- 24:54you don't miss any future episodes.
- 24:56Find Andy on Twitter at Age AW0 and Adam at Ajbrewer.
- 25:01See you at our next episode.