SECURITY ENGINEERING · PART 1 · LINUX AND WINDOWS, FROM THE INSIDE · WINDOWS · 20 OF 229

Windows Hardening: Group Policy, Defender, LAPS

Turning Windows machines from default to defensible at scale: using Group Policy and Intune to enforce a baseline, the Microsoft and CIS security baselines, removing local admin, LAPS for unique local-admin passwords, attack surface reduction rules, application control (WDAC/AppLocker), credential protections, and keeping the baseline applied with reporting and drift detection.

  1. 1
  2. 2
  3. 3
  4. 4
  5. 5
  6. 6
  7. 7
  8. 9
  9. 10
  10. 11
  11. 12
  12. 13
  13. 14
  14. 15
  15. 16
  16. 17
  17. 18
  18. 19
  19. 20
  20. 21
  21. 22
  22. 23
  23. 24
  24. 25
  25. 26
  26. 27
  27. 28
  28. 29
  29. 30
  30. 31
  31. 32
  32. 33
  33. 34
  34. 35
  35. 36
  36. 37
  37. 38
  38. 39
  39. 40
  40. 41
  41. 42
  42. 43
  43. 44
  44. 45
  45. 46
  46. 47
  47. 48
  48. 49
  49. 50
  50. 51
  51. 52
  52. 53
  53. 54
  54. 55
  55. 56
  56. 57
  57. 58
  58. 59
  59. 60
  60. 61
  61. 62
  62. 63
  63. 64
  64. 106
  65. 107
  66. 108
  67. 109
  68. 110
  69. 111
  70. 112
  71. 113
  72. 114
  73. 115
  74. 116
  75. 117
  76. 118
  77. 119
  78. 120
  79. 121
  80. 122
  81. 123
  82. 124
  83. 125
  84. 126
  85. 127
  86. 128
  87. 129
  88. 130
  89. 131
  90. 132
  91. 133
  92. 134
  93. 135
  94. 136
  95. 137
  96. 138
  97. 139
  98. 140
  99. 141
  100. 142
  101. 143
  102. 144
1 / 11

Press play to hear the narration, or step through at your own pace.

Key takeaways

  • Enforce a baseline via GPO/Intune
  • remove local admin
  • LAPS
  • ASR + app control
  • Credential Guard
  • report and fight drift

Notes

The lever

The lever is central policy. On domain-joined machines, Group Policy pushes settings from Active Directory to every computer and re-applies them regularly. On modern or cloud-managed fleets, Microsoft Intune does the same through mobile device management. Both enforce settings centrally, so a user cannot simply turn a protection off, and both re-apply, so drift is corrected. This is how a security baseline stops being a document and becomes the actual state of ten thousand machines.

How settings reach every host
  • domain-joined: Group Policy (GPOs) from Active Directory
  • modern/cloud: Microsoft Intune (MDM) pushes the same
  • both enforce settings centrally and re-apply them
  • a user cannot simply turn a policy off
  • this is how a baseline becomes real on 10,000 machines

Baselines

As with Linux, you do not invent the settings. Microsoft publishes Security Baselines, ready-made Group Policy objects in its Security Compliance Toolkit, and the CIS Benchmarks cover Windows too. Both give you hundreds of vetted settings with the reasoning for each. You import a baseline, tune it for your environment, and roll it out gradually, testing on a pilot group first so a strict setting does not break everyone at once. Starting from a baseline is faster and safer than building one by hand.

Use a published baseline
  • Microsoft Security Baselines (in the Security Compliance Toolkit) — ready GPOs
  • CIS Benchmarks for Windows
  • both: hundreds of settings with rationale
  • import, then tune for your environment
  • test in a pilot ring before the whole fleet

Remove local admin

If you do one thing, remove local admin rights from everyday users. Most people do not need it, and without it a phished user cannot silently install malware, dump credentials from LSASS, or turn off the security tools. Grant admin only where genuinely needed, ideally just-in-time. Microsoft's own analysis repeatedly finds that removing admin rights mitigates a large share of their most critical vulnerabilities. It is the highest-value single change on Windows.

Least privilege on endpoints
  • most users do NOT need local admin
  • without it: one phished user cannot install malware, dump LSASS, or disable defenses
  • give admin only where needed, ideally just-in-time
  • Microsoft: removing admin mitigates a large share of critical vulnerabilities

LAPS

Even where a local admin account must exist, there is a classic mistake: the same local admin password on every machine. Steal it once, from one laptop's memory, and you can log in to every other machine, which is how attackers spread. The Local Administrator Password Solution, LAPS, fixes this. It sets a unique random local admin password per host, rotates it automatically, and stores it in AD or Entra with access control. Now a stolen local password unlocks one machine. LAPS is built into Windows.

Windows LAPS
  • problem: the SAME local admin password on every machine → crack one, own all (lateral movement)
  • LAPS sets a unique, random local-admin password per host
  • rotates it automatically, stores it in AD/Entra, access- controlled
  • built into Windows now

ASR and app control

Two families of control go beyond settings. Attack surface reduction rules block whole techniques: an Office document spawning a child process, macros from the internet, attempts to steal LSASS credentials, and more. Controlled folder access stops unknown programs encrypting your documents, blunting ransomware. And application control, WDAC or AppLocker, flips the model to allowlisting, so only approved software runs, which is strong but takes effort to maintain. All are pushed through Group Policy or Intune.

Reduce what can run
  • ASR rules: block Office spawning child processes, block macros from the internet, block LSASS credential theft, etc.
  • controlled folder access vs ransomware
  • WDAC / AppLocker: allowlist which apps may run
  • Defender + SmartScreen on

Credential and network

Round out the baseline with the credential and network protections from earlier episodes, now enforced fleet-wide. Turn on Credential Guard and LSASS protection so credentials cannot be dumped. Disable weak protocols: SMBv1, NTLMv1, old TLS, and require SMB signing. Enforce BitLocker. Apply firewall rules. And deploy EDR with log forwarding to both prevent and detect. None of this is new from this part; the point is that Group Policy and Intune make it true everywhere at once.

Finish the baseline
  • Credential Guard + LSASS protection on disable SMBv1, NTLMv1, old TLS
  • require SMB signing
  • BitLocker enforced (episode 8)
  • Windows Firewall rules
  • Defender for Endpoint (EDR) + log forwarding (episode 10)

Keep it applied

Finally, prove it stays applied. Intune and Defender give compliance reporting that shows which machines are out of policy, so you can chase the gaps. Alert when a protection is disabled or a host falls out of compliance. Group Policy and Intune re-apply on a schedule, reverting local changes automatically. Roll changes out in rings, pilot then broad then full, to catch breakage early. And treat a control someone turned off as a possible attacker clearing the way, not just a tired user.

Verify continuously
  • Intune/Defender compliance reporting: who is out of policy
  • alert on protections disabled or a host non-compliant
  • policies re-apply on a schedule, reverting local changes
  • pilot → broad → full rollout rings
  • treat a disabled control as a possible attack, not just an error

Common mistakes

Mistakes. Leaving everyone a local admin, which undoes much of the rest. The same local admin password on every machine, with no LAPS, so one theft spreads everywhere. No baseline, so settings are applied by hand and inconsistently. Never enabling attack surface reduction or application control. No compliance reporting, so you do not know which machines drifted. And pushing a strict setting to the whole fleet with no pilot, breaking everyone and teaching the organisation to distrust hardening.

Avoid these
  • everyone a local admin
  • same local-admin password everywhere (no LAPS)
  • no baseline, settings by hand
  • ASR and app control never enabled
  • no compliance reporting
  • strict settings pushed with no pilot, breaking everyone

Say it like this

In the interview: I harden Windows at scale by enforcing a Microsoft or CIS baseline through Group Policy on domain machines and Intune on modern ones. The highest-value moves are removing local admin, deploying LAPS so every machine has a unique rotating local password, and enabling ASR rules and application control. I add Credential Guard, BitLocker and disable old protocols like SMBv1, roll out in rings, and use compliance reporting with drift alerts to keep it applied.

In the interview
  • "Enforce a Microsoft or CIS
  • baseline through Group Policy or Intune. Remove local admin, deploy LAPS for unique local
  • passwords, enable ASR rules and app control, turn on Credential
  • Guard and BitLocker, and disable
  • old protocols. Then use
  • compliance reporting and alert
  • on drift."

Interview questions

Q1How do you enforce security settings across many Windows machines?

Through central policy: Group Policy objects from Active Directory on domain-joined machines, and Microsoft Intune (MDM) on modern or cloud-managed ones. Both push and re-apply settings so users cannot disable them and drift is corrected.

Q2What security baselines exist for Windows?

Microsoft Security Baselines, shipped as ready Group Policy objects in the Security Compliance Toolkit, and the CIS Benchmarks for Windows. Both provide hundreds of vetted settings with rationale; you import one, tune it, and roll it out gradually.

Q3Why is removing local administrator rights so important?

Without local admin, a phished or tricked user cannot silently install malware, dump credentials from LSASS, or disable security tools. Microsoft’s analysis finds it mitigates a large share of critical vulnerabilities, making it the highest-value single change on Windows.

Q4What problem does Windows LAPS solve?

It replaces the same local-admin password reused on every machine (which lets one stolen password unlock them all) with a unique, random, automatically rotated local-admin password per host, stored access-controlled in Active Directory or Entra, limiting lateral movement.

Q5What are attack surface reduction (ASR) rules?

Defender rules that block whole attacker techniques, such as Office applications spawning child processes, macros from the internet, and credential theft from LSASS. With controlled folder access they blunt ransomware, and they are deployed via GPO or Intune.

Q6What is application control (WDAC/AppLocker)?

A model where only approved applications are allowed to run (allowlisting), rather than blocking known-bad. It is very effective against unknown malware but requires effort to define and maintain the allowed set, so it is rolled out carefully.

Q7How do you keep a Windows hardening baseline applied over time?

Group Policy and Intune re-apply settings on a schedule, reverting local changes. Compliance reporting shows which machines are out of policy, alerts fire when a control is disabled or a host is non-compliant, and changes roll out in rings (pilot, broad, full).

Q8Why treat a disabled security control as a possible incident?

Attackers often disable protections (EDR, logging, ASR) to clear the way before acting. So a control that turned off should be investigated as a potential attack step, not assumed to be a benign change, especially when combined with other signals.