Microsoft quietly snuck out a blog yesterday to say that Office 365 got compromised by China and used to steal emails. Thread follows. https://msrc.microsoft.com/blog/2023/07/microsoft-mitigates-china-based-threat-actor-storm-0558-targeting-of-customer-email/
Microsoft mitigates China-based threat actor Storm-0558 targeting of customer email | MSRC Blog | Microsoft Security Response Center

Microsoft mitigates China-based threat actor Storm-0558 targeting of customer email

They used Outlook Web App - runs the Exchange Server codebase btw - to craft tokens to bypass auth.

There's some clever wording in blog around only impacting OWA. OWA is a part of Microsoft 365 and Exchange Online.

The problem was discovered by the US Government and reported to Microsoft. https://edition.cnn.com/2023/07/12/politics/china-based-hackers-us-government-email-intl-hnk/index.html

Microsoft have not linked the blog on @msftsecintel or @msftsecresponse Twitter accounts or social media, instead linking pieces yesterday about an unrelated phishing campaign.

This one looks like a huge mistake, a consumer MSA key (managed end to end by Microsoft - there's no external logs) was able to forge any Azure AD key.

It's only become public it appears as the US Government told Microsoft, which forces public disclosure.

Although MS haven't called this a vulnerability, haven't issued a CVE or used the term zero day.. they don't issue CVEs for cloud services, forging a token is a vulnerability, so it's a zero day.

CISA's advisory on the Microsoft 365 compromise is wayyyyyyyyyyy better than the Microsoft advisory - contains actionable hunting and logging information. Kinda nuts that the US Government are providing better information about Microsoft than Microsoft.

https://www.cisa.gov/sites/default/files/2023-07/aa23-193a_joint_csa_enhanced_monitoring_to_detect_apt_activity_targeting_outlook_online.pdf

Another element - to spot this activity, the US government used enhanced logging aka Purview Audit (Premium) logging - the US government had a huge public fight with Microsoft over this a few years ago over cost, to get access. Turns out they needed it indeed.
Does anybody have the AppID used in the Microsoft 365 compromise? -> [email protected]
WSJ reporting the Microsoft 365 hack was used to spy on the State Department. https://www.wsj.com/articles/chinese-hackers-spied-on-state-department-13a09f03
Chinese Hackers Breached Email of Commerce Secretary Gina Raimondo and State Department Officials

Hackers didn’t appear to gain access to national security information

WSJ
For anybody interested - the “acquired Microsoft account (MSA) consumer signing key” used in this must have come from inside Microsoft’s internal network.
The teams who worked on the Microsoft 365 breach of customer data are having a snow day still, I see.

Okay - I found a victim org.

The situation for them is 😬

MS are going to have to release more info, methinks.. or I crank out the blog writing.

Really good Washington Post piece on the breach of Microsoft 365’s email service.

- hackers accessed customer emails for a month
- Microsoft didn’t notice
- USG had to tell them
- The access to generate tokens very likely came from MS being hacked and not realising

https://archive.is/2023.07.12-230927/https://www.washingtonpost.com/national-security/2023/07/12/microsoft-hack-china/

None of these would have helped, since the breach was at Microsoft’s end.

Talked to another impacted victim org in the Microsoft 365 hack, they basically got no actionable info from MS. Basically ‘lol you got hacked’ with wordsmithing and padding. 👀😬

I think I’m going to post hunting queries for this with an MS Paint logo.

🎶 regulation 🎶

I agree with CISA here (and have publicly for years) - security access logs for customers own services shouldn't be locked behind E5 per user licensing.

Yes, it will cost Microsoft money in upsell. They're more profitable than a large portion of the UK economy; they can afford it.

I should also point out the reason Microsoft was able to tell orgs specifically that they'd be targeted even when they didn't have E5 is MS already store the logs anyway.

https://archive.ph/MFnxP

On how the USG, European govs and Microsoft have been threat hunting the MS 365 breach, per Microsoft documentation on the logs... "If a mailbox is throttled, you can probably assume there was MailItemsAccessed activity that wasn't recorded in the audit logs."
Really good new MS blog on the MS compromise - contains IOCs etc. I'll put MSPaint.exe down. https://www.microsoft.com/en-us/security/blog/2023/07/14/analysis-of-storm-0558-techniques-for-unauthorized-email-access/
Analysis of Storm-0558 techniques for unauthorized email access | Microsoft Security Blog

Analysis of the techniques used by the threat actor tracked as Storm-0558 for obtaining unauthorized access to email data, tools, and unique infrastructure characteristics. 

Microsoft Security Blog

“We don’t have any evidence that the actor exploited a 0day." say Microsoft. Their first blog on this says “exploit” - so are MS saying they don’t patch vulnerabilities in their cloud? 🤔

Their latest blog also says “This was made possible by a validation error in Microsoft code” - which is a vulnerability. Which is a 0day as it was under exploitation before Microsoft knew of it existing.

Microsoft lying to media and customers is not a good look.

https://arstechnica.com/security/2023/07/microsoft-takes-pains-to-obscure-role-in-0-days-that-caused-email-breach/

Microsoft takes pains to obscure role in 0-days that caused email breach

Critics also decry Microsoft's "pay-to-play" monitoring that detected intrusions.

Ars Technica

All it took was Exchange Online in GCC and GCC High getting breached

Non-E5 users to get some security log availability finally.

https://www.wsj.com/articles/microsoft-to-offer-some-cybersecurity-tools-free-after-suspected-china-hack-6db94221

WSJ News Exclusive | Microsoft to Offer Some Cybersecurity Tools Free After Suspected China Hack

Company says it will make security logs available to customers with lower-cost cloud services

WSJ
@GossiTheDog This sounded very serious indeed.
@GossiTheDog with all the layoffs and worsening economy Microsoft probably couldn't afford E5
@GossiTheDog They should be generating new private keys every 24 hours. And have the previous keys be valid for 72-96 hours.
Nils Goroll (@[email protected])

In the context of the latest #microsoft #breach https://msrc.microsoft.com/blog/2023/07/microsoft-mitigates-china-based-threat-actor-storm-0558-targeting-of-customer-email/ : We run a daily job checking azure jwks from https://login.microsoftonline.com/<AUD>/discovery/v2.0/keys into git. Here's the history of key ids added and removed since 2022-12-05 (- removed, + added): 2023-06-01: -"nOo3ZDrODXEK1jKWhXslHR_KXEg" 2023-06-02: +"nOo3ZDrODXEK1jKWhXslHR_KXEg" 2023-06-03: -"nOo3ZDrODXEK1jKWhXslHR_KXEg" 2023-06-22: -"l3sQ-50cCH4xBVZLHTGwnSR7680" 2023-07-13: -"Mr5-AUibfBii7Nd1jBebaxboXW0" more in 🧵#infosec

Fosstodon
@slink @GossiTheDog Hmm so they aren't actually rotating just removing abused ones as if they attacker didn't grab them all.
@GossiTheDog They have been doing it since 1975. What's new? Only the language used and Gates' whiny voice isn't there anymore.
@GossiTheDog
Maybe E5 was too expensive and they just don't have logs.
@GossiTheDog What does this tell us that we didn't already know? Is it just the IoCs, or are there other new and helpful details?
@dangoodin from a reporting point of view I don't think anything new, but good from customer point of view as it gives new things to look at

@GossiTheDog @dangoodin did we know this little tidbit before?

"Though the key was intended only for MSA accounts, a validation issue allowed this key to be trusted for signing Azure AD tokens. This issue has been corrected."

@GossiTheDog I have been on the sidelines when it comes to this event, but my impression has been that Microsoft is dancing around the precise role of its own cloud service in this breach. It's a vulnerability in their own cloud service. that is the root cause, yes? If so, shouldn't Microsoft say that?
@GossiTheDog As Will notes, they say the "issue" has been corrected, when, in fact, the thing that has been corrected is a zeroday. They also reference consumer accounts in the "public cloud," when they should say OWA accounts. Do you agree with my read of today's post?

@dangoodin I don't think Microsoft ever acknowledges vulnerabilities in their cloud services (also there's no CVEs for cloud), and you don't say breach at Microsoft.

So if you Ctrl+F I doubt you will find vulnerability or breach in relation to Microsoft.

They did say "exploit" in the original MSRC blog in relation to Microsoft's cloud services, and you exploit a vulnerability. So I think it's fair to say that, yes, they had vuln(s).

@GossiTheDog Yeah, but the earlier post says only that the threat actor "exploited a token validation issue to impersonate Azure AD users and gain access to enterprise mail." Microsoft never says whose "issue" it was.
@dangoodin @GossiTheDog surely Azure AD isn't letting anyone else perform token validation on their behalf?
@dangoodin it is Microsoft’s issue. They are the only party that validate Azure AD tokens.
@dangoodin @GossiTheDog Honestly the IoCs are a substantial addition to this case. I'm pleasantly surprised, I thought they would never publish them.
@GossiTheDog uhhhhhhmmmmm…why would they do this?
@deepthoughts10 @GossiTheDog Maybe you can buy additional logs per entry as an add-on just like with Teams Chat scanning?
@GossiTheDog Could we also not charge extra for BitLocker? All editions of Windows must include FDE
@GossiTheDog I think this is a very important issue. #microsoft365 should include security logs in every license for free. Because otherwise they knowingly sell an insecurable system.
#gdpr basic rights for customers.

@GossiTheDog given how much Azure fraud is a result of credential stuffing, I’ve long argued that MSFT might very well save money by taking the account protection features currently gated by E3/E5/AAD P1/P2 and making them free for everyone.

Even if they didn’t save money on that, like you said: they could afford it.

@GossiTheDog I *hate* using security features as an upsell opportunity instead of a baseline requirement. Years ago Auth0 quoted us more for 2FA for identity users - I pushed back hard (and made it clear that they would be named in any breach comms), and they capitulated.
@cfg @GossiTheDog thank you for your service
@GossiTheDog Three orgs I manage MS365 for, we had no idea about this, never heard from MS. Does this mean our email is safe, or do we worry? Always air on the cautious side, but thought I’d ask… :)
@outofcontrol @GossiTheDog Check the azure Logins report, I have seen a huge increase in attempts from China
@GossiTheDog Good grief. Sounds like ole Tom might be a proponent of the security-by-checklist approach so many big orgs live by.
@GossiTheDog
Wherein "robust security measures" means mark Microsoft as untrusted.
@GossiTheDog Perhaps some rigorous conditional access policies would have helped?
@GossiTheDog mfa makes me feel warm and fuzzy at least 🫠
@GossiTheDog it’s like adding a lock to a door while the robber is already inside looting
@GossiTheDog And people wonder why I hate Exchange so passionately.
@GossiTheDog they are using fucking Office 365? 😶
@GossiTheDog what is an USG exactly in this case? Pretty vague 'Goverment'.
United States Government
@GossiTheDog Perhaps one for the cloud vulnerability database? https://www.cloudvulndb.org/results?q=
Azure AZNFS-mount Utility Root Privilege Escalation | cloudvulndb.org

Cloud vulnerabilities database - an open project to list all known cloud vulnerabilities and Cloud Service Provider security issues

The Open Cloud Vulnerability and Security Issue Database

@GossiTheDog the blog says
"Our telemetry indicates that we have successfully blocked Storm-0558 from accessing customer email using forged authentication tokens."

That surely does not say that they have blocked all the attempts before they blocked them...