Notes
Accounts and SIDs
Windows identifies every account by a security identifier, a SID, not by its name, so renaming an account changes nothing underneath. Local accounts are stored in a database called the SAM. Domain accounts live in Active Directory, which the next episode covers. Permissions are granted to SIDs and groups such as Administrators and Users. The two most powerful identities are the built-in Administrator account and SYSTEM, the account the operating system itself runs as.
- every account has a SID, a unique id like S-1-5-21-...
- local accounts live in the SAM
- domain accounts live in Active Directory (next episode)
- groups: Administrators, Users
- the built-in Administrator and SYSTEM are the powerful ones
Tokens and UAC
When you log in, Windows builds an access token listing your SID, groups and privileges, and every program you run carries a copy. User Account Control means that even an administrator runs with a limited token for normal work, and only switches to the full admin token when something elevates, which is the consent prompt you see. Microsoft is explicit that UAC is a convenience to reduce accidental admin actions, not a hard security boundary, so do not rely on it alone.
- a token lists your SID, groups and privileges
- User Account Control: even an admin runs with a limited token by default
- elevation (the consent prompt) switches to the full token
- UAC is a speed bump, not a security boundary, per MS
Where credentials live
This is the most important Windows security fact. The process called LSASS holds logon secrets in memory while you are signed in, including password hashes and Kerberos tickets. An attacker who gains administrator rights can read that memory and steal those credentials, then reuse them on other machines. The offensive tool is famous enough to name, Mimikatz. The defenses are Credential Guard, which isolates those secrets in a protected area, LSASS protection, a good EDR, and above all not handing out local admin.
- LSASS process holds logon secrets while you are signed in attackers with admin dump LSASS to steal password hashes and Kerberos tickets
- tools: Mimikatz (offense)
- defense: Credential Guard, LSASS protection, EDR, least admin
The registry
The registry is one large database of settings, split into hives: HKLM for the whole machine, HKCU for the current user. It matters for security because it is where programs arrange to start automatically, in so-called run keys. Attackers add an entry there so their code runs at every login, which is persistence. Defenders monitor the autorun locations with tools like Autoruns and Sysmon, and restrict who can write to the machine-wide keys.
- HKLM: machine-wide settings
- HKCU: per-user settings
- persistence lives in run keys: ...\CurrentVersion\Run
- and in services and tasks
- defense: monitor autorun locations (Autoruns, Sysmon) and lock down who can write
Services and tasks
Services are background programs, the Windows equivalent of daemons, and many run as SYSTEM, the most powerful account. If a service points at a program an attacker can replace, or has an unquoted path with a writable folder along it, the attacker gets their code run as SYSTEM. Scheduled tasks are Windows cron and are abused the same way. Defenders keep service binaries properly permissioned and signed, fix unquoted paths, and run services with the least privilege they need.
- services run in the background, often as SYSTEM
- a service with a weak path or weak file permissions can be hijacked to run attacker code as SYSTEM
- scheduled tasks = cron for Windows, also abused
- fix: strong perms, signed binaries, least privilege
Built-in protections
Windows ships with strong protections, and the job is to turn the right ones on. Microsoft Defender provides antivirus and, in its paid tier, full EDR. SmartScreen warns on unknown downloads and sites. BitLocker encrypts the whole disk, so a stolen laptop is useless. The firewall is on by default. And attack surface reduction rules, with controlled folder access, block many ransomware and malware techniques outright. Part twelve manages these across a fleet with device management.
- Microsoft Defender Antivirus + EDR (Defender for Endpoint)
- SmartScreen: warns on unknown downloads and sites
- BitLocker: full-disk encryption
- Windows Firewall: on by default
- Controlled Folder Access + ASR rules cut ransomware and common attack techniques
Where attackers hide
Two themes recur in Windows attacks. First, stealing credentials from LSASS and reusing them on other machines, which Part seven covers as pass the hash. Second, persistence: run keys, services, scheduled tasks and WMI subscriptions. Attackers also live off the land, using built-in tools like PowerShell so there is no new file for antivirus to catch. Defenders answer with EDR, detailed PowerShell and process logging through Sysmon, and the single biggest lever, not giving users local admin.
- steal creds from LSASS, reuse them (pass-the-hash, next part)
- persist via run keys, services, scheduled tasks, WMI
- living off the land: PowerShell, wmic, built-in tools, so no new file to flag
- defense: EDR, PowerShell logging, least admin, Sysmon
Hardening a Windows host
A short hardening list removes most of the risk. Take local admin away from everyday users, which alone blocks a huge share of attacks. Turn on Credential Guard and LSASS protection. Enable BitLocker and SmartScreen. Switch on attack surface reduction rules and controlled folder access. Patch promptly through Windows Update. Turn on PowerShell and process logging and ship it to a SIEM. And disable ancient protocols like SMB version one. Part twelve applies all of this at scale.
- no local admin for daily users
- Credential Guard + LSASS protection on BitLocker on, SmartScreen on ASR rules + controlled folders
- patch promptly (Windows Update)
- enable PowerShell + process logging, ship to a SIEM
- disable SMBv1 and old protocols
Common mistakes
Mistakes. Making everyone a local administrator, which turns one phished user into a credential-theft machine. Treating UAC as a security boundary. Leaving LSASS unprotected so credentials are trivial to dump. No disk encryption, so a lost laptop is a breach. No EDR or PowerShell logging, so living-off-the-land attacks are invisible. Unquoted service paths through writable folders. And leaving old protocols like SMB version one enabled for no reason.
- everyone a local admin
- trusting UAC as a boundary
- LSASS unprotected
- no disk encryption
- no EDR or PowerShell logging
- unquoted service paths
- old protocols left enabled
Say it like this
In the interview: I secure a Windows endpoint by removing local admin from daily users, turning on Credential Guard and BitLocker, enabling attack surface reduction rules and SmartScreen, deploying EDR, and logging PowerShell and process creation to a SIEM. The two threats I design against are credential theft from LSASS, which I counter with Credential Guard and least admin, and persistence through run keys, services and scheduled tasks, which I monitor for.
- "Remove local admin, turn on Credential Guard and BitLocker, enable ASR rules and SmartScreen, deploy EDR, and log PowerShell
- and process creation to a SIEM.
- LSASS credential theft and autorun persistence are the threats I design against."