SAM file

The SAM (Security Account Manager) file is the registry hive that holds a Windows computer's local user accounts and groups. It is stored at C:\Windows\System32\config\SAM and loaded as HKEY_LOCAL_MACHINE\SAM. Domain accounts are not in it; they live in Active Directory on the domain controllers.

WindowsUser activityParser: sam_users21 fieldsCollected by priority triage

What SAM Users is

For each local account the SAM holds the user name, the relative identifier (RID: 500 for the built-in Administrator, 501 for Guest, 1000 and above for accounts created later), account flags such as disabled or password-not-required, the last logon time, the last password change, the last failed logon, the logon count, the failed logon count, and the password hashes. The hashes are encrypted with a key derived from the SYSTEM hive, so both hives are needed to read them.

In an investigation the SAM answers which local accounts exist, which were created recently (a RID higher than the rest is a later account), which were used and when, and whether an account is enabled. Arcsentry parses it from collections and images, decrypts the hashes when the SYSTEM hive is present, and keeps parsing the other accounts if one record is damaged.

Forensic value

What SAM Users can tell an investigator:

  • Every local account, with its RID, flags and enabled state: the place to spot an account an attacker added.
  • Last logon, last password change and last failed logon times, and logon and failed logon counts per account.
  • Group membership through the built-in groups (Administrators, Remote Desktop Users), parsed separately.
  • NT hashes, to check for password reuse across machines (the same local administrator hash on many hosts) during an investigation.

What it does not prove

  • The SAM is locked while Windows runs; copy it with a forensic collector or from a disk image or volume shadow copy.
  • Times are the last occurrence only; the full history is in the Security event log (4624, 4720, 4724).
  • Password hashes are sensitive: handle the parsed output as credentials and redact them in reports.
  • Domain accounts and their logons are not recorded here.

Where it is stored

Arcsentry looks for SAM Users at these locations inside a collection, disk image or mounted volume:

**/Windows.old/Windows/System32/config/RegBack/SAM
**/Windows.old/Windows/System32/config/RegBack/SYSTEM
**/Windows.old/Windows/System32/config/SAM
**/Windows.old/Windows/System32/config/SYSTEM
**/Windows/System32/config/RegBack/SAM
**/Windows/System32/config/RegBack/SYSTEM
**/Windows/System32/config/SAM
**/Windows/System32/config/SYSTEM

What Arcsentry records

Each SAM Users record is written to Arcsentry's common schema with these fields, alongside the host, timestamp and provenance every record carries:

FieldTypeMeaning
event_reasonVARCHAREvent reason
messageVARCHARHuman-readable message
account_disabledBOOLEANSam account disabled
account_flagsBIGINTSam account flags
account_typeVARCHARSam account type
admin_commentVARCHARSam admin comment
country_codeBIGINTSam country code
failed_loginsBIGINTSam failed logins
last_incorrect_loginTIMESTAMPSam last incorrect login
last_loginTIMESTAMPSam last login
lm_hashVARCHARSam lm hash
login_countBIGINTSam login count
nt_hashVARCHARSam nt hash
password_changeTIMESTAMPSam password change
ridBIGINTSam rid
user_commentVARCHARUser comment
user_full_nameVARCHARUser full name
user_nameVARCHARUser name
user_sidVARCHARUser sid
registry_hive_setVARCHARRegistry hive set the record was read from: live, regback, windows_old or windows_old_regback
registry_hive_replayVARCHARWhy the registry hive this record was read from lacks its transaction-log changes: failed when replay failed at staging, disabled when replay was turned off

Time

Arcsentry keeps each record's own time and labels its time zone when the source does not state one. A record with no time of its own stays untimed; Arcsentry never substitutes the collection time.

Collecting SAM Users with Arcsentry Collector

Arcsentry Collector gathers SAM Users in these triage profiles: windows::profile::triage::priority, windows::profile::triage::offline, windows::profile::triage::timeline, windows::profile::triage::full. It is read straight from the file system, on a live host or inside a disk image, without mounting.

The collection targets that pick it up: windows::registry::registry_hives_system, windows::security::windows_hello.

.\arcsentry-collect.exe collect --local -t windows::profile::triage::priority `
  -o E:\IR -f host.arcx --password-file E:\IR\pw.txt

Every file lands in one AES-256 archive with a SHA-256 recorded for it, and the collection log notes which target collected it. See everything each profile collects.

Already collected with something else? Arcsentry also reads KAPE, Velociraptor and UAC collections, so SAM Users can come from the tools you already use.

Analysing SAM Users in Arcsentry

Ask in plain English, for example "show SAM Users records from the incident window, newest first", and Arcsentry shows the query before it runs. Or write it in AQL:

filter event_type == "sam_users"
sort {-timestamp}
take 100

Mark a record malicious or suspicious and it joins the timeline in its kill-chain lane. Add its values as indicators and Arcsentry matches them across every host. When the AI investigator works the case, it reads SAM Users records with the same tools and cites them by event ID.

Corroborate with

No single artifact settles a question on its own. Check SAM Users against:

  • Windows event log: Parses Windows Event Log (.evtx) files.
  • ProfileList: User profile SIDs and profile image paths with key timestamps.
  • SAM Builtin Groups: Built-in local groups (aliases) from the SAM hive with RIDs and member counts.
  • LSA Secrets Inventory: Names and last-write times of the LSA secrets and cached domain logons stored in the SECURITY hive, without their values.

Frequently asked

Where is the SAM file located?

C:\Windows\System32\config\SAM, with backup copies in config\RegBack on some versions and in volume shadow copies. It is loaded as HKEY_LOCAL_MACHINE\SAM.

Why can't I copy the SAM file?

Windows keeps it open and locked while running. Forensic collectors read it from the raw NTFS volume, or it can be taken from a disk image or a volume shadow copy.

What information does the SAM file contain?

Local user accounts and groups: names, RIDs, flags, last logon, last password change, logon counts and encrypted password hashes. Domain accounts are stored in Active Directory instead.

How do you find an account created by an attacker in the SAM?

Compare RIDs and names: accounts created after installation have RIDs from 1000 upwards in creation order, so a new, high RID with a service-like name is a lead. Confirm with event 4720 and the account's last logon time.

Does Arcsentry parse SAM Users?

Yes. Arcsentry's SAM Users parser (sam_users) reads it from Windows evidence and records 21 fields per record, with provenance back to the source file.

How do I collect SAM Users?

Arcsentry Collector gathers it with the priority triage profile (windows::profile::triage::priority), live or from a disk image, sealed in an AES-256 archive with a SHA-256 for every file.

Parse SAM Users on your own evidence.

Tell us what you want to investigate. A person replies within one business day with the download and a trial licence.

Request a trial