> For the complete documentation index, see [llms.txt](https://viperone.gitbook.io/pentest-everything/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://viperone.gitbook.io/pentest-everything/everything/everything-active-directory/credential-access/credential-dumping/cached-domain-credentials.md).

# Cached Domain Credentials

**ATT\&CK ID:** [T1003.005](https://attack.mitre.org/techniques/T1003/005/)

**Permissions Required:** <mark style="color:red;">**SYSTEM**</mark>

**Description**

Adversaries may attempt to access cached domain credentials used to allow authentication to occur in the event a domain controller is unavailable.

On Windows Vista and newer, the hash format is DCC2 (Domain Cached Credentials version 2) hash, also known as MS-Cache v2 hash. The number of default cached credentials varies and can be altered per system. This hash does not allow pass-the-hash style attacks, and instead requires [Password Cracking](https://attack.mitre.org/techniques/T1110/002) to recover the plaintext password.

## Techniques

**Note:** MS-Cache password hashes cannot be used in Pass-The-Hash (Pth) attacks. However, they can be cracked to reveal the clear-text password.

### LaZagne

```
LaZagne.exe windows
```

![](/files/ZCkkiYRD7ONVXatPiCh8)

### Metasploit

```
use post/windows/gather/cachedump
```

![](/files/2yZnDxUSDOa5aC0VeUWr)

### Mimikatz

```powershell
Invoke-Mimikatz -Command '"lsadump::cache"'
```

![](/files/xxaCeI5VKho1JTXfo9at)

## Mitigation

### LAPS

The "Local Administrator Password Solution" (LAPS) provides management of local account passwords of domain joined computers. Passwords are stored in Active Directory (AD) and protected by ACL, so only eligible users can read it or request its reset.

{% embed url="<https://www.microsoft.com/en-us/download/details.aspx?id=46899>" %}

### Group Policy - Limited cached credentials

**Policy Description**

Each unique user's logon information is cached locally so that, in the event that a domain controller is unavailable during subsequent logon attempts, they are able to log on. The cached logon information is stored from the previous logon session.

**Policy name**

`Interactive logon: Number of previous logons to cache (in case domain controller is not available)`

**Location**

`Computer Configuration\Windows Settings\Security Settings\Local Policies\Security Options`

**Value**

`5` (Recommended by CIS Controls)

### Protected Users Group

This group was developed to provide better protection for high privileged accounts from credential theft attacks. Members of this group have non-configurable protection applied.

{% embed url="<https://docs.microsoft.com/en-us/windows-server/security/credentials-protection-and-management/protected-users-security-group>" %}

* [**Device protections for signed in Protected Users**](https://docs.microsoft.com/en-us/windows-server/security/credentials-protection-and-management/protected-users-security-group#device-protections-for-signed-in-protected-users)
* [**Domain controller protections for Protected Users**](https://docs.microsoft.com/en-us/windows-server/security/credentials-protection-and-management/protected-users-security-group#domain-controller-protections-for-protected-users)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://viperone.gitbook.io/pentest-everything/everything/everything-active-directory/credential-access/credential-dumping/cached-domain-credentials.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
