Local Accounts on Domain-Joined Machines
Concept
Section titled “Concept”When a Windows workstation or server joins an Active Directory domain:
- The Local SAM Remains Fully Operational: Located at
%SystemRoot%\System32\config\SAM, it continues to manage local machine accounts (.\Administrator,.\Guest, local maintenance accounts). - Two Coexisting Authentication Realms:
- Local: Validated by local LSA against the SAM database (
HOSTNAME\user). - Domain: Validated by Kerberos or Netlogon against Domain Controllers (
DOMAIN\user).
- Local: Validated by local LSA against the SAM database (
- Default Group Nesting: During the domain join process, Windows automatically inserts the domain group
Domain Adminsinto the machine’s localAdministratorssecurity group, establishing administrative reach.
Why It Matters in DFIR
Section titled “Why It Matters in DFIR”Local account usage on domain-joined machines is one of the most prolific lateral movement vectors in enterprise breaches:
- DC-Free Lateral Movement (Local Pass-the-Hash): If fleet systems were provisioned from a cloned golden image sharing the same local Administrator password, an attacker who dumps the local NTLM hash on one workstation can pivot via SMB across every other machine on the network without triggering a single authentication event on domain controllers!
- LAPS (Local Administrator Password Solution): LAPS mitigates this vulnerability by generating a randomized, unique password per machine, stored in an encrypted AD attribute (
msLAPS-Passwordor legacyms-Mcs-AdmPwd). In DFIR, auditing LAPS coverage and read events is vital. - Bypassing Central SIEM Visibility: Authentications using local accounts (
Logon Type 3or10) are logged exclusively in the local Security event log of the target endpoint. SIEMs collecting only DC logs will remain blind to this activity.
How It Works
Section titled “How It Works”Authentication Authority Resolution
Section titled “Authentication Authority Resolution”Logon Attempt: "Administrator" │ Does string contain a domain prefix? / \ / \ YES / \ NO / \ ▼ ▼ "DOMAIN\Administrator" ".\Administrator" OR Workgroup host │ │ ▼ ▼ Validated by KDC / NTDS Validated by local LSA / SAM SID: S-1-5-21-DOM-500 SID: S-1-5-21-MACHINE-500LocalAccountTokenFilterPolicyEnforcement:- By default on modern Windows versions, non-RID 500 local accounts connecting over the network (SMB/WMI/WinRM) undergo UAC token stripping and lose administrative privileges (filtered to
Medium Integrity). - Only the built-in local Administrator account (RID 500) retains full administrative network tokens, unless
LocalAccountTokenFilterPolicy = 1was configured by administrators.
- By default on modern Windows versions, non-RID 500 local accounts connecting over the network (SMB/WMI/WinRM) undergo UAC token stripping and lose administrative privileges (filtered to
What Is Possible
Section titled “What Is Possible”- Pivoting Host-to-Host via Identical Local Credentials: If the RID 500 account shares a password across machines, an attacker can execute Pass-the-Hash via
psexecorwmiexecacross the entire fleet without contacting a DC. - Logging into Workstations During Network Outages: Local accounts guarantee break-glass access when network links or DCs are completely unavailable.
- Auditing LAPS Password Queries: Querying LAPS attributes in Active Directory logs Event ID 4662 on domain controllers, revealing who accessed local administrator passwords.
What Is Not Possible
Section titled “What Is Not Possible”- Accessing Domain Resources Using a Local Account: A local account can only authenticate to its local host. It possesses no identity in Active Directory and cannot access domain shares requiring domain credentials.
- Reviewing Local SAM Logons on Domain Controllers: Authenticators against
.\Administratorgenerate zero events on Active Directory DCs. - Automatic Password Synchronization Between Local SAM and AD: Updating a domain account password has zero effect on local machine accounts.
Common DFIR Confusions
Section titled “Common DFIR Confusions”| Frequent Confusion | Verifiable Forensic Reality |
|---|---|
| ”The attacker logged in as Administrator, so the domain is compromised.” | Check the SID: if the SID begins with the local machine prefix, it is a local account. The domain is not necessarily compromised. |
| ”We collect all DC logs, so we see all Pass-the-Hash attacks.” | False. Pass-the-Hash leveraging local accounts never touches domain controllers and is completely invisible without endpoint log collection. |
| ”Disabling the local Administrator account stops local lateral movement.” | If LocalAccountTokenFilterPolicy = 1 is configured, any local account in Administrators enables full lateral movement. |
Concrete Forensic Example
Section titled “Concrete Forensic Example”During an incident response engagement at a mid-sized enterprise:
- Domain controllers showed zero abnormal events, yet 40 client workstations were encrypted by ransomware.
- Triage on the patient-zero machine revealed an LSASS memory dump that harvested the local
AdministratorNTLM hash (S-1-5-21-209384-500). - This hash was identical across all 40 machines due to an unmanaged baseline image without LAPS.
- The threat actor used a PowerShell script to invoke
wmiexecwith the local hash across all subnet IPs. - DFIR Finding: The entire ransomware outbreak bypassed domain controller visibility by riding on local accounts.
Key Forensic Artefacts
Section titled “Key Forensic Artefacts”- Local Endpoint Security Event Logs:
- Event ID 4624 (Logon Type 3):
TargetDomainNamematches the local computer hostname;TargetUserSidbegins with the machine SID prefix. - Event ID 4672: Privileges assigned to
.\Administrator.
- Event ID 4624 (Logon Type 3):
- Active Directory LAPS Telemetry (on DCs):
- Event ID 4662: Read operation against
msLAPS-Passwordorms-Mcs-AdmPwd.
- Event ID 4662: Read operation against
- Windows Registry:
HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System\LocalAccountTokenFilterPolicy.
Investigation Methods
Section titled “Investigation Methods”- Differentiate Local vs Domain Accounts in Telemetry:
Compare
TargetDomainNameagainst the host computer name versus the AD NetBIOS domain name. - Audit LAPS Implementation Across All Workstations:
Run
Get-ADComputer -Filter * -Properties msLAPS-PasswordExpirationTimeto verify LAPS coverage. - Detect Clustered Local Type 3 Logons: Search for identical source IP addresses establishing Type 3 sessions using local credentials across multiple endpoints.
Investigative Tooling
Section titled “Investigative Tooling”- PowerShell AD / LAPS Module:
Terminal window Get-ADComputer -Identity "WS-01" -Properties msLAPS-PasswordExpirationTime - Kansa / Velociraptor:
Hunts querying Event ID 4624 where
TargetDomainName == ComputerNameacross all endpoints.
Key Takeaways
Section titled “Key Takeaways”- The local SAM database remains active and independent on domain-joined machines.
- Local authentications never touch Active Directory domain controllers.
- Local password reuse allows massive lateral movement undetectable from DC logs alone.
- LAPS is the only architectural defense against local credential reuse.