Hacker Directory — Understand what you hack.Hacker Directory — Understand what you hack.
Continue learning
TR
Contents15 chapters · 82 lessons
LESSON 02.02DERİN TEKNİK İNCELEME

LSA, LSASS, SAM, and NTDS: Which component manages what?

LSA denotes security-authority and architectural functions; LSASS is the critical process boundary that hosts relevant components; SAM is the local account store; and NTDS is the AD DS directory store on a domain controller. A process, an interface, and a store are different objects.

1. Core mechanism

The path from an application on a Windows host through SSPI/LSA interfaces, the LSASS process boundary, and the local SAM store; domain authentication additionally reaches a domain controller and its AD DS directory store. This lesson locates the components; token internals are covered in 02.03, and credential storage and protection in 10.x.

Interfaces and specifications

  • LSA: security-authority and subsystem functions that provide local security policy, logon, and authentication-package architecture.
  • LSASS: the critical system-process boundary that hosts LSA functions and authentication/security package components.
  • SAM: the local user and group account store present on each Windows system.
  • AD DS/NTDS: the directory service for domain objects and its persistent store on a domain controller; Ntds.dit is not a member-workstation store.
  • SSPI and LSA authentication-package interfaces: the boundary through which applications work with security packages; normal application flow does not read SAM or Ntds.dit directly.
  • 4611 Version 0: records a trusted logon process registering with LSA in the Security channel.

Architectural function, running process, and storage are different layers

LSA names the authority functions of Windows’s local security policy and logon architecture. LSASS is the protected process boundary for these functions and authentication packages.

SAM is the store for local accounts. Using SAM to verify a local account does not make SAM the same component as LSASS.

This distinction keeps incident analysis precise: the presence of lsass.exe does not prove credential access, and the presence of the SAM file does not prove that anyone read it.

A domain account does not create NTDS on a member host

AD DS stores domain objects on domain controllers and replicates directory data between DCs. Ntds.dit is the persistent file that contains that data on a DC.

When a member workstation receives a domain-account logon request, its local LSA and security packages communicate with the domain authority. Using a domain account does not place a full Ntds.dit store on the workstation.

The local SAM and the domain directory belong to different authorities. The flow must preserve which authority owns an account, especially when short account names match.

Interfaces define a boundary; they are not direct store access

Applications and services normally use package interfaces in the SSPI and LSA authentication model. A supported logon flows from those interfaces to a security package and then to the appropriate local or domain authority.

A local flow may use SAM-backed verification; a domain flow sends the request to the domain authority on a DC. A successful result becomes a logon session and security context on the client host.

Privileged direct access to a store file requires a different security event and different prerequisites from the normal authentication interface.

State and data flow

  1. The application or logon component supplies credential information through a supported security interface.
  2. The appropriate authentication package inside local LSA/LSASS processes the request.
  3. Local-account verification relies on the local SAM authority.
  4. For a domain account, the client-side security package communicates with the security authority on a domain controller.
  5. The domain controller uses AD DS account data to produce the protocol result.
  6. A successful result becomes a logon session and security context on the client or service host.
  7. Process telemetry, security events, and store-access evidence remain distinct evidence types.

2. Exploitation

Broken trust assumption

The broken assumption is that only trusted code can load into or access LSASS, and that only authorized security components can reach SAM or AD DS stores.

Technical prerequisites

  • High local privilege, unprotected process access, or permission to install a trusted security/authentication extension on the target host.
  • Privileged file or system access on the host for a local store such as SAM.
  • Separate access and sufficient privilege on a domain controller for the AD DS store.

Exploitation mechanism

Accessing LSASS memory or registering a trusted package targets the process boundary. Accessing SAM or Ntds.dit follows a separate store path with separate prerequisites. Evidence for one path does not prove that the other occurred.

Do not confuse the process boundary with the store boundary

A process attempting to open LSASS supports a memory-access hypothesis, but it does not show that SAM or Ntds.dit was read. Store access requires separate authorization and telemetry.

Conversely, access to a store file does not prove that code loaded into LSASS. Incident analysis should classify the mechanism supported by the evidence.

DC storage has a different security boundary

High local privilege on a member host increases risk to that host's LSASS and SAM, but does not itself grant access to Ntds.dit on a domain controller.

The DC store requires separate access and DC-specific privilege. This lesson does not describe credential extraction or store-copying procedures.

3. Defense & Detection

Telemetry scope

  • Audit Security System Extension / Success produces 4611 when a trusted logon process registers; this subcategory has no Failure event.
  • 4611 is recorded in the source Windows host's Security channel and uses Version 0.
  • Sysmon Event 10 ProcessAccess provides process-open visibility only when Sysmon is installed and configured with appropriate filters.
  • Do not hard-code Sysmon fields into the content model without checking the deployed version's sysmon -s schema.
  • Evaluate added LSA protection changes with audit mode and compatibility observation before enforcement.

Events and relevant fields

  • 4611 / SubjectUserSid, SubjectUserName, SubjectDomainName, SubjectLogonId: the registering subject context.
  • 4611 / LogonProcessName: the name registered with LSA for the trusted logon process.
  • 4611 / Version 0: the only event version documented; available from Windows Vista/Server 2008.
  • Sysmon 10 / ProcessAccess: records one process opening another with the source and target process context; LSASS memory access visibility is only an example.
  • CodeIntegrity Operational 3065/3066 audit events and 3033/3063 enforcement events must be interpreted in the context of LSA protection compatibility and applicable operating-system conditions.

4611 shows process registration, not store access

4611 reports that a trusted logon process registered with LSA. It does not show that LSASS memory was read, SAM was opened, or Ntds.dit was accessed.

The event is primarily informational. A Subject or LogonProcessName outside the expected baseline can start an investigation, but is not a conclusion.

Process access requires separate telemetry

Microsoft cites Sysmon Event 10 for inter-process open activity and LSASS memory-access visibility. This telemetry does not replace built-in 4611 and does not exist without Sysmon.

Do not write a portable query with fixed Event 10 fields until the installed Sysmon schema has been verified. Expected EDR, diagnostic, and management tools can produce false positives.

Detection logic · Sigma

title: LSA ile kaydolan trusted logon process
status: experimental
logsource:
  product: windows
  service: security
detection:
  selection:
    EventID: 4611
  condition: selection
fields:
  - SubjectUserSid
  - SubjectUserName
  - SubjectDomainName
  - SubjectLogonId
  - LogonProcessName
falsepositives:
  - Isletim sistemi baslangici ve normal logon bilesenleri
level: low

Query assumptions

  • The rule selects only 4611 records; deciding whether one is anomalous requires a host- and operating-system-specific allowlist.
  • Subject or LogonProcessName is not evidence of malicious intent alone.
  • This query does not detect LSASS ProcessAccess, SAM access or Ntds.dit access.
  • The rule was not run on a real SIEM or data set.

False positives

  • Normal trusted logon process registrations during operating-system startup.
  • Supported authentication or security extension components.
  • Documented and approved components of enterprise security products.

Hardening

  • Evaluate added LSA protection/PPL against supported operating-system and plug-in compatibility; review audit-mode results first.
  • Maintain an inventory of authentication and security packages; compare new 4611 LogonProcessName values with approved change records.
  • If you use Sysmon ProcessAccess, verify the version-specific schema and filters, then baseline expected diagnostic and security tools.
  • Do not treat DC and member-host protection as equivalent; apply DC-specific least privilege, backup protection, and management boundaries to AD DS store access.
  • Pilot hardening changes, monitor CodeIntegrity audit/enforcement events, and keep a rollback path ready.

Read the examples

READ THE EXAMPLE TOGETHER

SYNTHETIC TEACHING EXAMPLE

Which logon process was registered with LSA, under which account?

4611 · trusted logon process record (Event XML, Version 0)

01
Registered logon processSyntheticLogonProcess

4611 records registration of a trusted logon process with LSA. SyntheticLogonProcess is this teaching fixture’s name, not an observed product process.

02
Registration accountS-1-5-18

The Subject SID identifies the registering account. S-1-5-18 is Local System in this example; it is not evidence of LSASS memory access.

03
Account nameHOST01$

This example records HOST01$ with SubjectDomainName=BESIKTAS. Read it with the SID; a name alone identifies neither a person nor intent.

04
Same-host session link0x3e7

Use SubjectLogonId to correlate logon records on the relevant host and time interval. The same number on another host is not the same session.

What to take away

4611 records trusted logon-process registration. Reads of LSASS memory, SAM or Ntds.dit require separate evidence; the process name alone does not establish an attack.

This guide explains selected fields of the synthetic fixture. Editing returns to generic reading; no Windows operation or event authenticity is verified.

Scope of this example

This is a synthetic, schema-focused Version 0 field example, not a real Windows or lab record. SyntheticLogonProcess is not an observed product value. The artifact demonstrates only a trusted logon process registering with LSA at parser level; it is not evidence of access to LSASS memory, SAM, or Ntds.dit.

Open the raw record · EVENT-XML
<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
  <System>
    <Provider Name="Microsoft-Windows-Security-Auditing" />
    <EventID>4611</EventID>
    <Version>0</Version>
    <Channel>Security</Channel>
    <Computer>HOST01.besiktas.example</Computer>
  </System>
  <EventData>
    <Data Name="SubjectUserSid">S-1-5-18</Data>
    <Data Name="SubjectUserName">HOST01$</Data>
    <Data Name="SubjectDomainName">BESIKTAS</Data>
    <Data Name="SubjectLogonId">0x3e7</Data>
    <Data Name="LogonProcessName">SyntheticLogonProcess</Data>
  </EventData>
</Event>

Two reality checks

Assumption: LSA, LSASS, SAM and NTDS are four names of the same database.
In fact: LSA denotes security-authority and architectural functions; LSASS is the process boundary that hosts them; SAM is the local account store; and NTDS is the AD DS directory store on a domain controller.
Assumption: Signing in to a workstation with a domain account means the workstation contains the domain database.
In fact: The member computer's local security components communicate with the domain authority. The full domain directory store resides on domain controllers; a member workstation does not gain Ntds.dit.

YOUR TURN

Work through this story.

Go beyond recall: change a condition, read evidence, explain the reason for a decision.

1 / 3 · PREDICT

How should signing into WS01 with a domain account be interpreted?

Choose an answer

A hint

Which host owns the full domain-authority store?

Read the answer reasoning

The full domain Ntds.dit store is not created on WS01; DC01 remains the domain authority.

The member host’s security packages communicate with the domain authority; the directory store is on the DC.

2 / 3 · READ EVIDENCE

How should this observation be interpreted?

Synthetic process-inventory card.
Host
WS01
Image / Süreç
lsass.exe
Store-access telemetry / Depo erişim kanıtı
Not provided
Choose an answer

A hint

Do not equate process existence with a specific store access.

Read the answer reasoning

LSASS exists; a specific SAM/credential read is not yet established.

LSASS existence is architectural evidence; store access needs separate evidence.

3 / 3 · EXPLAIN

Distinguish LSA, LSASS and SAM in one short clause each.

A hint

Function → hosting process → account store.

Read the answer reasoning

LSA is the local security authority and logon functions; LSASS is the process boundary hosting them; SAM is the local account store. The domain-account AD DS store is on DC01; these are not different names for one database.

  • I separated LSA authority/functions from the LSASS process boundary.
  • I identified SAM as the local account store.

Your explanation is not automatically graded. Compare the checkpoints with your answer.

Open the case terminal · PowerShell / CMD

Training simulation · Commands and outputs belong to this case.

Read the account name and SID of this session.

Run the prepared script as supplied, or try the everyday commands below.

WS01 · Windows PowerShell 5.1SAMPLE SESSION
IYELABS\tunahanstudent0202 · lesson workspace

Ctrl / ⌘ + Enter: run · Shift + Enter: new line

Curious? Try everyday commands

Tap a command, then Run. User and network details follow the selected sample computer.

These are learning practices; they do not affect certification exam scores.

Sources