Windows and Active Directory Security Basics for Beginners

Most businesses run on Windows desktops and servers, and most of those are joined to an Active Directory (AD) domain that controls who can log in and what they can reach. That makes Windows and AD central to both everyday IT and real-world incidents. If you understand how they work, you can harden them and recognise trouble in their logs. This lesson covers the architecture, authentication protocols, key log events and the hardening basics, with practice for a Windows evaluation VM in your lab.

Windows Security Architecture in Brief

  • Accounts and SIDs: every user, group and computer has a unique Security Identifier (SID).
  • Access tokens: when you log in, Windows builds a token listing your SID, group memberships and privileges. Every process you start carries it.
  • NTFS permissions and ACLs: files, folders and registry keys have access control lists defining who can do what.
  • User Account Control (UAC): separates standard and administrative actions, prompting before elevation.
  • Local Security Authority (LSASS): the process that handles logins and holds credential material in memory, which is why protecting it matters.
  • Registry: configuration database, including many persistence locations.
  • Windows Defender and SmartScreen: built-in antimalware and reputation filtering.
  • BitLocker: full-disk encryption protecting data on lost or stolen devices.

Active Directory Fundamentals

TermMeaning
DomainA logical group of users, computers and resources managed together (for example, corp.example.com)
Domain controller (DC)The server that stores the AD database and authenticates users
Forest and treeCollections of domains sharing a schema and trust relationships
Organisational Unit (OU)A container for organising objects and delegating administration
Group Policy (GPO)Centrally managed settings pushed to users and computers
Security groupsCollections used to assign permissions (for example, Domain Admins)
Service accountA non-human account used by applications and services

AD is attractive to attackers because whoever controls it controls identities across the whole organisation. This is why protecting domain controllers and privileged groups gets special attention.

Authentication: Kerberos and NTLM

Kerberos (default in domains)

Kerberos uses tickets so passwords never travel across the network. In simplified form:

  1. You log in and ask the domain controller’s Key Distribution Center (KDC) for a Ticket Granting Ticket (TGT).
  2. When you want to use a service (a file share, for example), you present the TGT and get a service ticket for that service.
  3. You present the service ticket to the service, which trusts it because it was issued by the KDC.

Kerberos depends on accurate time (clock skew over a few minutes causes failures) and on strong passwords for service accounts, since service tickets are encrypted with keys derived from the account password. Weak service-account passwords are a well-known risk; defenders counter with long random passwords or managed service accounts.

NTLM (legacy)

NTLM is an older challenge-response protocol still used as a fallback. It has known weaknesses, including susceptibility to relay and “pass-the-hash” style abuse, so organisations should reduce and eventually disable it where possible. These attack concepts are discussed from the defender’s side in Privilege Escalation and Lateral Movement: The Defender’s View.

Important Windows Event IDs

Windows records security-relevant events in the Event Log (eventvwr.msc). Learn these IDs; they appear constantly in SOC work:

Event IDLogMeaningWhy it matters
4624SecuritySuccessful logonCheck logon type (2 interactive, 3 network, 10 remote interactive)
4625SecurityFailed logonBursts suggest guessing attempts
4634 / 4647SecurityLogoffSession timeline
4648SecurityLogon using explicit credentialsPossible lateral movement
4672SecuritySpecial privileges assigned to a new logonAn administrator-level logon
4688SecurityNew process createdNeeds command-line auditing enabled for full value
4720SecurityUser account createdUnexpected accounts
4732 / 4728SecurityMember added to a security groupPrivilege changes
4768 / 4769Security (DC)Kerberos TGT and service ticket requestsAuthentication patterns
1102SecurityAudit log clearedStrong indicator of tampering
7045SystemNew service installedA common persistence mechanism

Practice Lab: Exploring Windows Logs

On a Windows evaluation VM in your lab:

  1. Open Event Viewer, go to Windows Logs, then Security.
  2. Lock the screen and log in with a wrong password twice, then the correct one. Refresh and find the two 4625 events and the 4624 event. Read the logon type, account name and source.
  3. Create a test user in PowerShell and find event 4720:
net user labuser "ChangeMe-Lab-Only-123!" /add
# find the related event
Get-WinEvent -FilterHashtable @{LogName='Security'; Id=4720} -MaxEvents 5 | Format-List TimeCreated, Message
# clean up
net user labuser /delete
  1. Count failed logons in the last hour:
(Get-WinEvent -FilterHashtable @{LogName='Security'; Id=4625; StartTime=(Get-Date).AddHours(-1)} -ErrorAction SilentlyContinue).Count
  1. Enable command-line logging for process creation (Group Policy: Computer Configuration, Administrative Templates, System, Audit Process Creation, then Include command line in process creation events), run a few commands, and look at 4688 events.

Useful Built-in Commands and Tools

whoami /all                  # your SID, groups and privileges
ipconfig /all                # network configuration
netstat -ano                 # connections with process IDs
tasklist                     # running processes
sc query                     # services
gpresult /r                  # applied Group Policy
Get-LocalUser                # local accounts (PowerShell)
Get-Service | Where-Object Status -eq Running

Sysinternals tools (Process Explorer, Autoruns, TCPView) are free from Microsoft and excellent for understanding what a system is doing and what starts automatically.

Hardening Basics

  1. Patch promptly, including third-party software.
  2. Least privilege: daily work with standard accounts; separate admin accounts for administration.
  3. Unique local administrator passwords on every machine using Microsoft’s LAPS (Local Administrator Password Solution).
  4. Protect privileged groups: keep Domain Admins very small and use them only on domain controllers.
  5. Enable multi-factor authentication for remote and privileged access.
  6. Disable legacy protocols such as SMBv1 and, where possible, NTLM.
  7. Enable BitLocker on laptops.
  8. Turn on useful auditing and forward logs to a central system; see SIEM, Log Analysis and SOC Operations.
  9. Use Microsoft Defender features such as attack surface reduction rules, tamper protection and Credential Guard where supported.
  10. Apply security baselines: Microsoft Security Baselines and CIS Benchmarks give tested settings; see Endpoint Security and System Hardening.
  11. Back up domain controllers and test recovery.

Common Mistakes

  • Everyday users with local administrator rights.
  • Service accounts with weak, never-changing passwords and excessive privileges.
  • Administrators logging in to ordinary workstations with domain admin accounts.
  • Never reviewing group membership of privileged groups.
  • Logs not collected centrally, so evidence is lost when a machine is wiped.

Practice Exercises

  1. Explain in your own words the difference between a TGT and a service ticket.
  2. Generate and find events 4625, 4624 and 4720 in your lab VM, and write what each tells an investigator.
  3. Use whoami /all as a standard user and as an administrator. What differs?
  4. List five Group Policy settings you would apply to harden a workstation.
  5. Why is event ID 1102 more alarming than most others?

Mentor tip: Learn what normal looks like in your own Windows lab before you hunt for abnormal. Familiarity with everyday events makes anomalies stand out.

Educational use only: practise security techniques only on systems you own or have explicit written permission to test.

Key takeaways
  • Active Directory centralises identity, so protecting it protects the organisation.
  • Kerberos issues tickets instead of sending passwords; NTLM is legacy and should be reduced.
  • Events 4624, 4625, 4672, 4688, 4720, 1102 and 7045 are essential to recognise.
  • Least privilege, LAPS, patching, MFA and central logging provide strong baseline hardening.

Related Lessons