User Enumeration in Microsoft Products: An Incident Waiting to Happen?
Intruder’s latest research reveals that up to 13,000 organisations are affected by little-known user enumeration flaws in a range of popular Microsoft products. The flaws have been exposing internal corporate networks to attacks for years, yet are undetected by leading vulnerability scanners.
Over the last decade or so multiple user enumeration flaws have been discovered in a range of popular Microsoft products that are commonly exposed to the Internet, such as Outlook Web Access and Skype for Business.
Most organisations won’t be aware that these flaws exist; they are not detected by the leading vulnerability scanners, documented by Microsoft or even assigned a CVE reference. They are generally ignored by the industry and are under the radar of most security professionals; but is this an acceptable situation or should you be working to find and fix these issues in your infrastructure?
Let’s take a look at the attack scenarios these bugs create, and explore why they should be considered a security risk, particularly when it comes to Microsoft products. But first, a quick recap for readers that are less familiar with the terminology:
What is user enumeration?
User enumeration flaws provide attackers with a method to determine whether a specified username exists. An app signup error message saying “username already in use” would be one example. If the attack can be automated (by comparing the response to when a username is not in use), it allows an attacker to whittle down a large list of potential usernames to a smaller list of confirmed usernames.
Having a list of valid usernames for a system is extremely valuable to an attacker because it facilitates a range of other attacks which would otherwise take much more effort to pull off, including automated password guessing (brute-force) and denial of service attacks (more on this later).
Where do Microsoft come in?
A range of Microsoft products and services are affected by user enumeration flaws, and have been for years:
- Outlook Web Access (aka Outlook on the Web, OWA): This flaw affects versions of Outlook Web Access from OWA 2007, including OWA 2010, 2013 and 2016.
- Skype for Business (Formerly Lync): Reported to Microsoft in 2016.
- Office 365 ActiveSync: Reported as vulnerable in 2017.
- Active Directory Federated Services (ADFS) single sign-on: Reported in 2018.
Since these products are commonly accessible from the Internet, and often use the organisation’s internal Active Directory (AD) for authentication, this creates a situation where an attacker on the Internet can easily identify usernames from an internal Windows domain.
Why is this a problem?
Exploiting one of these user enumeration flaws is a fairly easy task. The first step is to identify the username format. This can be done by guessing common username formats (e.g. dan.andrew, d.andrew, etc) with employee names (for example obtained from LinkedIn or other public sources). If an organisation uses an uncommon format, other techniques can be used, such as extracting a username from PDF or Microsoft Word file metadata.
With this information in hand, a long list of potential usernames in the correct format is generated using common forenames and surnames or a public list of employee names. Finally, the enumeration flaw is exploited to test the presence of each username in the list.
Now armed with a list of usernames that exist within the organisation’s Active Directory (AD), the attacker can:
- Launch a password spraying attack where a small number of common passwords, such as Password1, are tried against a large number of valid users. This technique is surprisingly effective, even against household-name companies. Intruder uses this technique on penetration tests and trust us, it works!
- If the Windows domain is configured to lock out accounts after several failed logins, then a denial of service can be caused by submitting multiple bad logins against these known user accounts.
- If an account lockout policy is not configured, the attacker has free rein to keep guessing passwords, increasing their chances of compromising accounts.
- If credentials are successfully compromised, the attack can continue. The attacker can log into the affected product or another exposed remote access solution like remote desktop or a VPN, either of which could allow remote access to the internal network.
- Exposed email services like Outlook Web Access or Outlook Office 365 could also allow access to sensitive information in emails, or the ability to mount further attacks by emailing malware appearing to come from inside the organisation. The attacker is constrained only by what is exposed to the Internet.
Without a user enumeration flaw to first get a confirmed list of users, these attacks become an order of magnitude more difficult. What’s more, easy-to-use tools are publicly available to exploit three of the four examples above, so attacks against these commonly exposed technologies can be carried out even by unskilled attackers.
How many organisations are affected?
To understand the extent of the problem, Intruder investigated the enumeration flaw in Skype for Business. Our research uncovered that over 13,000 servers on the internet are vulnerable, potentially exposing their organisation’s internal Windows network to Denial of Service and credential guessing attacks.
Among the list of vulnerable servers are household names and large organisations whose high profile make them likely targets for remote attackers, including:
- Numerous blue-chip companies including almost 40% of FTSE 100 companies
- Many well-known and trusted organisations, including some of the ‘big four’ professional services firms
- UK government-owned domains
Despite the scale of the problem though, Microsoft have made it clear they do not intend to fix these issues. Below is their response to the researcher that reported the ActiveSync flaw:
“Thank you for contacting the Microsoft Security Response Center (MSRC). Upon investigation we have determined that these do not meet the bar for security servicing. In general, username enumeration does not meet the bar as there are many ways to do this and on its own it does not allow an attacker access or control in any way, as the attacker would still need to bypass login.”
It’s hard to tell exactly what they mean by “there are many ways to do this”, but perhaps they are referring to the fact that email addresses are inherently public and often match internal domain usernames. Or perhaps they are referring to other methods of username enumeration which could be performed by an attacker with a foothold within the internal network.
However, this glosses over the key point; it makes the attacker’s job easier. Security is never perfect, we’re always fighting a losing battle just trying to make the attacker’s job that little bit harder, and here Microsoft seem to be just giving up the game.
How to protect your business
So, what should savvy CIOs be doing to prevent this from happening, and what lessons can we learn from this?
Sadly, there’s not going to be an easy answer to this one. Since Microsoft isn’t currently planning to fix the bugs, we’re left without the usual patch/upgrade option that is often the best solution to fixing security issues.
That said, here’s some advice which should help:
- These issues really highlight how important it is to think carefully before exposing any system on the Internet. Your attack surface should be reduced wherever possible. The less you have exposed to the Internet, the harder you’ll be to breach. In general, attackers like to pick easy targets, and you never know when the next big vulnerability will be discovered.
- Where possible, don’t expose the products listed above to the Internet. Outlook Web Access is a good example of a product which doesn’t necessarily need to be exposed to the internet. You can restrict access to the web portal to your internal network and those connected via a secure VPN. Products like Skype for Business are a little more difficult, since you might use them to host web conferences with 3rd parties which need remote access. Consider using an alternative product to host web conferences with people outside of your organisation.
- As a more general rule, two-factor authentication should be enabled and enforced everywhere, especially for internet-facing services. This can eliminate the risk of both the Denial of Service and credential guessing attacks described above, and prevent unauthorised access to those services — even if an attacker has compromised the credentials to an account.
- If affected products must be exposed, ensure that effective logging and monitoring and active IDS is in place to ensure that attacks are noticed and reacted to appropriately.
A lesson to learn from this case study is that it’s important to always check for known issues in the software you are deploying and the most secure configuration for the product. Even huge vendors like Microsoft are not perfect, and it should never be assumed that software is secure out of the box in its default configuration. Most importantly, reduce your perimeter attack surface to a minimum and keep an eye on things with logging and monitoring, particularly where you know there are risks; you’ll be much less likely to suffer a breach and will be better prepared if the worst does happen.
Intruder is a vulnerability scanning platform which specialises in finding weaknesses in your perimeter infrastructure, and includes helpful advice on how to manage your attack surface and reduce the risk of a breach. Intruder is easy to use, and proactively keeps track of the latest vulnerabilities for you by scanning your systems for existing and emerging threats.
Thanks to Patrick Craston and Olya Osiagina
- Raw CVE Coverage
- Risk Rating Coverage
- Remote Check Types
- Check Publication Lead Time
- Local/Authenticated vs Remote Check Prioritisation
- Software Vendor & Package Coverage
- Headline Vulnerabilities of 2021 Coverage
- Analysis Decisions
Red teamers, security researchers, detection engineers, threat actors have to actively research type of vulnerability, location in vulnerable software and build an associated exploit.
Tenable release checks for 47.43% of the CVEs they cover in this window, and Greenbone release 32.96%.
Red teamers, security researchers, detection engineers and threat actors now have access to some of the information they were previously having to hunt themselves, speeding up potential exploit creation.
Tenable release checks for 17.12% of the CVEs they cover in this window, and Greenbone release 17.69%.
The likelihood that exploitation in the wild is going to be happening is steadily increasing.
Tenable release checks for 10.9% of the CVEs they cover in this window, and Greenbone release 20.69%.
We’re starting to lose some of the benefit of rapid, automated vulnerability detection.
Tenable release checks for 9.58% of the CVEs they cover in this window, and Greenbone release 12.43%.
Any detection released a month after the details are publicly available is decreasing in value for me.
Tenable release checks for 14.97% of the CVEs they cover over a month after the CVE details have been published, and Greenbone release 16.23%.
With this information in mind, I wanted to check what is the delay for both Tenable and Greenbone to release a detection for their scanners. The following section will focus on vulnerabilities which:
- Have CVSSv2 rating of 10
- Are exploitable over the network
- Require no user interaction
These are the ones where an attacker can point their exploit code at your vulnerable system and gain unauthorised access.
We’ve seen previously that Tenable have remote checks for 643 critical vulnerabilities, and OpenVAS have remote checks for 450 critical vulnerabilities. Tenable release remote checks for critical vulnerabilities within 1 month of the details being made public 58.4% of the time, but Greenbone release their checks within 1 month 76.8% of the time. So, even though OpenVAS has fewer checks for those critical vulnerabilities, you are more likely to get them within 1 month of the details being made public. Let’s break that down further.
In Figure 10 we can see the absolute number of remote checks released on a given day after a CVE for a critical vulnerability has been published. What you can immediately see is that both Tenable and OpenVAS release the majority of their checks on or before the CVE details are made public; Tenable have released checks for 247 CVEs, and OpenVAS have released checks for 144 CVEs. Then since 2010 Tenable have remote released checks for 147 critical CVEs and OpenVAS 79 critical CVEs on the same day as the vulnerability details were published. The number of vulnerabilities then drops off across the first week and drops further after 1 week, as we would hope for in an efficient time-to-release scenario.
While raw numbers are good, Tenable have a larger number of checks available so it could be unfair to go on raw numbers alone. It’s potentially more important to understand the likelihood that OpenVAS or Tenable will release a check of a vulnerability on any given day after a CVE for a critical vulnerability is released. In Figure 11 we can see that Tenable release 61% their checks on or before the date that a CVE is published, and OpenVAS release a shade under 50% of their checks on or before the day that a CVE is published.
So, since 2010 Tenable has more frequently released their checks before or on the same day as the CVE details have been published for critical vulnerabilities. While Tenable is leading at this point, Greenbone’s community feed still gets a considerable percentage of their checks out on or before day 0.
I thought I’d go another step further and try and see if I could identify any trend in each organisations release delay, are they getting better year-on-year or are their releases getting later? In Figure 12 I’ve taken the mean delay for critical vulnerabilities per year and plotted them. The mean as a metric is particularly influenced by outliers in a data set, so I expected some wackiness and limited the mean to only checks released 180 days prior to a CVE being published and 31 days after a CVE being published. These seem to me like reasonable limits, as anything greater than 6 months prior to CVE details being released is potentially a quirk of the check details and anything after a 1-month delay is less important for us.
What can we take away from Figure 12?
- We can see that between 2011 and 2014 Greenbone’s release delay was better than that of Tenable, by between 5 and 10 days.
- In 2015 things reverse and for 3 years Tenable is considerably ahead of Greenbone by a matter of weeks.
- But, then in 2019 things get much closer and Greenbone seem to be releasing on average about a day earlier than Tenable.
- For both the trendline over an 11-year period is very close, with Tenable marginally beating Greenbone.
- We have yet to have any data for 2021 for OpenVAS checks for critical show-stopper CVEs.
With the larger number of checks, and still being able to release a greater percentage of their remote checks for critical vulnerabilities Tenable could win this category. However, the delay time from 2019 and 2020 going to OpenVAS, and the trend lines being so close, I am going to declare this one a tie. It’s a tie.
The takeaway from this is that both vendors are getting their checks out the majority of the time either before the CVE details are published or on the day the details are published. This is overwhelmingly positive for both scanning solutions. Over time both also appear to be releasing remote checks for critical vulnerabilities more quickly.