Insecurely protected: The paradox of modern cyber defence

#Advanced threats Deployment methodology#Security architecture#Articles#Cybersecurity#double key encryption


The recent disclosure of a critical vulnerability in the Microsoft 365 conditional access system has caused great concern in our cybersecurity community.

This vulnerability, discovered over the 2024 Christmas holidays, allows digital crooks to get around our device compliance rules, seriously compromising the integrity of our corporate security policies.

The seriousness of this breach lies in its ability to undermine one of the fundamental pillars of our cloud security: access control based on identity and on the state of our devices.

The attack targets the Microsoft Intune portal specifically, a crucial tool for managing our mobile devices and applications in business environments.

The vulnerability exploits the application identifier 9ba1a5c7-f17a-4de9-a1f1-6178c8d51223, which corresponds to the Intune portal.

This component, designed to make it easier to manage our devices and security policies, has paradoxically become the entry point for digital crooks.

The attack mechanism takes advantage of a quirk in how our Intune portal works.

Since a device cannot identify itself as compliant at the moment it enrols in Intune, there has to be at least one application that temporarily skips our conditional access rules.

This exception, meant to make our enrolment process easier, has become the Achilles heel of our system.

Our Intune portal, when accessing our Microsoft 365 cloud resources through the Graph API, obtains access and refresh tokens from the authenticated user.

These tokens, designed to give our users a smooth experience, become the keys to our kingdom in the hands of a digital crook.

The recently published tool TokenSmith has greatly simplified carrying out this attack against our systems.

It works in a deceptively simple way: after signing in to our Intune portal, the digital crook can obtain the necessary tokens through a specially crafted redirect URL.

With these tokens in hand, the digital crook can access our Microsoft 365 tenant through the Graph API, bypassing our device compliance requirements altogether.

The implications of this attack are deep and many-sided for our organisation.

First of all, it undermines trust in one of the most fundamental security mechanisms of cloud computing: conditional access.

This system, designed to guarantee that only our authorised devices and users can access our sensitive corporate resources, is completely sidestepped.

Digital crooks can now reach our confidential data, emails, documents and other critical resources without needing a compliant corporate device. One caveat: the attack is not anonymous, because it requires completing a legitimate authentication (password and MFA, as applicable) or holding valid session cookies, plus other conditions. What is bypassed is the compliant-device requirement, not the user’s identity. See the original analysis in JUMPSEC’s research.

What’s more, this attack opens the door to a series of secondary threat scenarios for our organisation.

A digital crook with access to our Microsoft 365 tenant could, for example, set up inbox rules to forward our sensitive emails, making large-scale exfiltration of our data easier.

They could also move laterally within our organisation, taking advantage of the inherent trust in our internal communications to launch more sophisticated phishing attacks against other employees of ours.

The ease with which this attack can be carried out against our systems is particularly alarming.

Free tools such as TokenSmith and GraphRunner have democratised what used to be a complex attack vector, putting it within reach of a much wider range of digital crooks.

This accessibility significantly increases our attack surface and the risk for our organisation, which depends on Microsoft 365.

The potential consequences of a successful attack on our organisation are vast and potentially devastating.

Unauthorised access to our sensitive corporate data can lead to direct financial losses, damage to our reputation and legal liabilities.

In highly regulated industries, such as healthcare or financial services, a breach of this kind in our systems could lead to significant regulatory penalties and a loss of trust from our customers.

Faced with this threat, we must act quickly and decisively to mitigate our risks.

Our first line of defence involves a thorough review of our existing conditional access policies.

It is crucial to make sure there are no exceptions for our critical applications, including our Intune portal.

Our policies must be granular enough to provide security without getting in the way of our productivity, a delicate but essential balance.

Putting solid monitoring of activity related to our Graph API in place is another critical component of our effective mitigation strategy.

We must set up systems to detect and alert on unusual or suspicious access patterns in our systems. This includes monitoring abnormal traffic volumes, sign-ins from unusual geographical locations, or usage patterns that deviate significantly from the baseline established for each of our users.

Enabling multifactor authentication (MFA) for all our access becomes an imperative necessity in this context.

While MFA is not a cure-all, it provides a crucial additional layer of security that can thwart many attempts at unauthorised access to our systems.

It is especially important to implement MFA for our privileged accounts and for access to our sensitive resources.

Another crucial security measure is implementing our impossible travel rule. This security feature, which is part of our Microsoft anomaly detection capabilities, can identify sign-in attempts from geographically distant locations within an unreasonably short period of time.

For example, if one of our users signs in from New York and then, 30 minutes later, tries to sign in from Tokyo, our system would flag this as impossible travel and block access.

The education and awareness of our users also play a crucial role in our mitigation of this threat. Our employees must be taught about the risks of phishing and other social engineering techniques that could be used to gain initial access to our accounts.

We must be alert to signs of compromise, such as unusual activity on our accounts or suspicious emails, and know how to report these incidents quickly to our security team.

From a technical perspective, we should consider implementing more advanced security solutions. Token binding, for example, is a promising technology that ties our session tokens to specific devices.

If we implement it correctly, this could make our stolen tokens useless if they are replayed on a different device.

Although this technology is still in preview, it represents a promising approach to counter this type of attack against our systems.

Continuous Access Evaluation (CAE) is another advanced security feature we should consider implementing.

CAE will continuously monitor the activity of our sessions and periodically reassess their security.

If it detects suspicious activity, such as a sudden change of location, our CAE can force a re-authentication, which could help us catch and stop digital crooks red-handed.

For our organisation, if we have Microsoft Entra P2 licences, there are additional risk detection capabilities we can take advantage of.

These include the ability to configure our conditional access policies to block our users’ sign-in when risk detection is medium or high.

This additional layer of protection can be crucial in preventing unauthorised access to our systems, even if a digital crook has managed to obtain valid tokens.

On top of these technical measures, we should consider implementing broader security policies.

For example, applying location-based access policies can limit access to our Microsoft 365 to trusted locations only, such as our corporate network or an approved VPN.

This means that even if one of our tokens is stolen, the digital crook will not be able to reach our corporate resources unless they are signing in from a location we have approved.

The management of our devices also plays a crucial role in our mitigation of this type of attack.

We must make sure that only devices that meet our corporate security standards can access our Microsoft 365 resources.

This means implementing solid device compliance policies through our Intune, which can include requirements such as up-to-date antivirus software, disk encryption turned on and security patches up to date on all our devices.

It’s important to stress that our remediation of this vulnerability is not a one-off event, but an ongoing process.

We must adopt an adaptive approach to security, constantly monitoring new threats and adjusting our policies and controls accordingly.

This will involve carrying out regular security assessments, penetration tests and incident response drills to make sure our security systems and processes are effective and up to date.

Working with external security experts is also beneficial for our organisation, since they will give us a fresh perspective and specialised expertise, helping us identify vulnerabilities that might have gone unnoticed internally.

They can also offer us guidance on industry best practices and help us develop our long-term security strategies.

In the wider context of our cloud security, this incident underlines the importance of a layered approach to security.

None of our individual security measures is foolproof and, therefore, we must implement multiple layers of protection to build a strong defence.

This includes not only technical measures such as MFA and conditional access policies, but also our administrative and physical controls.

It is crucial that we don’t underestimate the importance of our incident response and the planning of our business continuity.

Should we find ourselves caught up in a breach of our systems, having a well-defined and tested incident response plan can make the difference between a minor disruption and a major disaster for our organisation.

This plan must include clear procedures for detecting, containing and eradicating threats, as well as for our recovery and post-incident learning.

Transparency and communication are also vital in how we handle this type of vulnerability.

We must have clear plans for communicating any breach or security incident to our stakeholders, including our employees, customers and, where necessary, regulators.

Clear and timely communication can help us limit reputational damage and maintain the trust of our stakeholders.

As we continue migrating more of our operations and data to the cloud, the importance of our security in these environments will keep rising.

This incident serves as a reminder that our cloud security is an ongoing effort that requires constant vigilance, adaptability and a commitment to best practices.

In conclusion, the vulnerability discovered in our Microsoft 365 conditional access system represents a significant challenge to the security of our organisation, which depends on these cloud services.

However, with a proactive, 360-degree approach to our security, we can effectively mitigate the risks associated with this and other emerging threats.

The key lies in implementing solid technical controls, the continuous education of our users, our constant vigilance and our ability to adapt quickly to an ever-evolving threat environment.

By adopting this 360-degree approach to our security, we can keep enjoying the benefits of cloud services while effectively protecting our most valuable digital assets.

See you on the socials!!