A look into authentication: Credentials

Welcome to the next part of our series on authentication. In our previous post, we covered hashes: what they are, how they are calculated and stored. In this blogs we will step back and look at credentials as a whole and see how these are used, stored and protected

When you log into a Windows machine, authentication typically happens by verifying your credentials with a remote domain controller. But what happens when you’re offline, disconnected from the network? Windows provides a feature known as cached credentials, which allows you to continue logging in even when you’re not connected to the domain. In this blog, we’ll explore how Windows handles cached credentials, the protection mechanisms in place, and the security aspects involved—especially when it comes to different account types, like local accounts, Active Directory (AD) domain accounts, and Entra ID accounts.

How cached credentials work in Windows

Cached credentials are passwords or password hashes that are stored locally on a Windows machine, allowing users to authenticate without contacting a domain controller. This functionality is especially useful when a device is temporarily disconnected from the network, such as when you’re travelling or working remotely.

Here’s how the process works:

The specific way cached credentials are handled varies depending on the type of account you’re using.

Where and how are cached credentials stored?

Windows stores cached credentials in different ways depending on whether you’re using a local account, a domain account, or an Entra ID account.

Local user accounts

For local user accounts, Windows does not rely on the cached credentials system like domain accounts do. Instead, local credentials are stored in the Security Account Manager (SAM) database on the system.

Domain accounts (Active Directory)

For domain-joined machines, Windows stores cached credentials for Active Directory (AD) accounts in the Windows registry, specifically under:

HKEY_LOCAL_MACHINE\Security\Cache

This registry location holds PBKDF2-hashed credentials for the last few successful logins (usually the last 10).

Really these cached credentials are not credentials as such but they are offline verifiers that are used to confirm a credential that an end user submits. These verifiers are a relatively low risk, although weak passwords, using the same password in multiple places and lack of MFA does mean that there is still a risk associated with these cached credentials.

Entra ID (Azure AD) accounts

For Entra ID (Azure Active Directory) accounts, the process is somewhat different. These accounts do not use the traditional cached credentials stored in the registry. Instead, Entra ID accounts leverage modern authentication mechanisms, where credentials are stored on the device and are encrypted using Next-Generation DPAPI (NG). This encryption relies on the Entra ID account and its associated device as the boundary for authentication. Windows Hello for Business or device-based authentication is also employed for offline authentication, avoiding the need to store any credentials at all.

By understanding how cached credentials work and the associated protection mechanisms, both administrators and users can take proactive steps to ensure their Windows systems remain secure—even when disconnected from the network.

In the next blog post on authentication we will look at MFA and how that enhances security and the use of passwords

Comments

Add a comment
Loading...
Follow
Follow