Windows Security Architecture
Windows is built around a security reference monitor that checks every access against the rights of the requester. Key parts:
- Security identifier (SID): a unique ID for each user, group and computer.
- Access token: created at logon, it carries the user's SID, group SIDs and privileges; every process runs with a token.
- Security descriptor and ACL: every object (file, registry key, printer) has a DACL (discretionary access control list: entries that allow or deny rights to a SID) and a SACL (which decides what to audit). If any entry denies a right, the deny wins over allows.
- Local Security Authority (LSASS) handles logon and passwords; Active Directory with Kerberos provides central authentication in a domain; Group Policy applies security settings to many computers.
- User Account Control (UAC): asks for approval before a program uses administrator rights, so everyday work runs as a standard user.
Windows Security Defences
- Windows Update: regular patches; keep it on.
- Microsoft Defender Antivirus and SmartScreen against malware and bad downloads; Windows Firewall with default rules.
- BitLocker: full-disk encryption, with a TPM chip holding keys; Secure Boot allows only trusted boot software; Windows Hello for strong sign-in (PIN or biometrics with multi-factor).
- AppLocker / application control: allow only approved programs; Credential Guard protects stored credentials.
- Least privilege: standard accounts for daily work; disable unused accounts and services; audit logs in the Event Viewer; backups, including offline copies, and System Restore.
- Attack types to watch: ransomware, credential theft (for example from LSASS memory), macro malware in Office documents, pass-the-hash, and unpatched services (the 2017 EternalBlue flaw spread WannaCry).
Definition: Access control list (ACL). A list attached to an object that states which users or groups are allowed or denied which rights to it, such as read, write or execute.
Table 4.2: Linux and Windows compared
| Feature | Linux | Windows |
|---|---|---|
| Identity | UID, GID | SID |
| Object permissions | Owner, group, others (rwx) and ACLs | DACL with allow and deny entries |
| Elevation | sudo | UAC |
| Disk encryption | LUKS | BitLocker |
| Mandatory control | SELinux, AppArmor | Integrity levels, AppLocker |
Example 4.2: Effective permission with allow and deny
Problem: A document has the ACL: group Staff allow read and write; group Interns deny write; group Everyone allow read. Alice is in Staff, Interns and Everyone; Bob is in Staff and Everyone; Carl is in Interns and Everyone. Find the effective permissions of each.
Solution:
- Alice: allows = read, write (Staff) and read (Everyone); deny = write (Interns). Deny wins, so she has read only.
- Bob: allows = read, write; no deny. He has read and write.
- Carl: allow = read (Everyone); deny = write. He has read only.
Result: Alice read, Bob read and write, Carl read. A deny entry in any group of the user overrides allows from other groups.
acl = [("Staff", "allow", {"read", "write"}),
("Interns", "deny", {"write"}),
("Everyone", "allow", {"read"})]
users = {"Alice": {"Staff", "Interns", "Everyone"},
"Bob": {"Staff", "Everyone"},
"Carl": {"Interns", "Everyone"}}
for user, groups in users.items():
allowed, denied = set(), set()
for grp, kind, perms in acl:
if grp in groups:
(allowed if kind == "allow" else denied).update(perms)
print(user, sorted(allowed - denied))
Output
Alice ['read']
Bob ['read', 'write']
Carl ['read']
Common mistakes
- Using an administrator account for everyday work.
- Turning off UAC, the firewall or updates for convenience.
- Forgetting that a deny entry overrides allows.
- Keeping backups connected so that ransomware can encrypt them too.
Key takeaways
- Windows: SID, access token, DACL and SACL, deny overrides allow.
- UAC, Defender, Firewall, BitLocker, Secure Boot, Windows Hello.
- Active Directory and Kerberos for domain authentication; Group Policy.
- Patch, least privilege, backups and audit logs.
Practice questions
- What is an access token in Windows?
- What does UAC do?
- What does BitLocker do?
Answers to the practice questions
- A structure created at logon holding the user's SID, group SIDs and privileges.
- It asks for approval before a program uses administrator rights.
- It encrypts the whole disk to protect data at rest.
Sources
- Official BCA syllabus Computer Security, course code 25BCA406DS02, Unit IV
