# Source: https://docs.datadoghq.com/security/default_rules/def-000-66l.md

---
title: Windows SAM registry hive handle request
description: Datadog, the leading service for cloud-scale monitoring.
breadcrumbs: >-
  Docs > Datadog Security > OOTB Rules > Windows SAM registry hive handle
  request
---

# Windows SAM registry hive handle request

{% alert level="danger" %}
This rule is part of a beta feature. To learn more, [contact Support](https://docs.datadoghq.com/help/).
{% /alert %}
Classification:attackTactic:[TA0006-credential-access](https://attack.mitre.org/tactics/TA0006)Technique:[T1552-unsecured-credentials](https://attack.mitre.org/techniques/T1552) 
## Goal{% #goal %}

Detects access requests to the Windows Security Account Manager (SAM) registry hive.

## Strategy{% #strategy %}

This rule monitors for Windows event ID `4656`, which records handle requests to securable objects. The query looks for handle requests specifically targeting registry keys with a path ending in `SAM` as indicated in the `@Event.EventData.Data.ObjectName` field.

The Windows SAM registry hive contains password hashes for local user accounts. Direct access to this registry hive is typically restricted while Windows is running to prevent credential theft. However, there are several techniques that attackers use to bypass these protections and access the SAM hive directly.

Legitimate access to the SAM hive through the registry is extremely rare during normal system operations. Windows APIs and system components typically use alternative methods to authenticate users and verify credentials. Direct SAM hive access is often associated with credential harvesting tools that extract password hashes for offline cracking or pass-the-hash attacks.

## Triage & Response{% #triage--response %}

- Identify the process and user account that requested access to the SAM registry hive on `{{host}}`.
- Determine if the access attempt was successful by looking for subsequent event IDs related to registry access.
- Examine the process lineage to understand how the access was initiated.
- Review other suspicious activities from the same user account or process in the surrounding timeframe.
- Check for evidence of credential dumping tools or techniques being deployed on `{{host}}`.
- Isolate the affected system if unauthorized access to the SAM hive is confirmed.
- Reset local account credentials that may have been compromised.
- Verify no lateral movement attempts have been made using potentially harvested credentials.