Close Windows escalation at the door: LAPS, SeImpersonate, paths
The scenario is fictional. Everything here is from the book and not tested on live Windows; try it in a lab first. What you'll learn Fixing service paths and ACLs Why AlwaysInstallElevated must be 0 Enablin
The scenario is fictional. Everything here is from the book and not tested on live Windows; try it in a lab first.
What you'll learn
- Fixing service paths and ACLs
- Why
AlwaysInstallElevatedmust be 0 - Enabling 4688 command-line logging
- LAPS and limiting SeImpersonate
- What to monitor
Checklist
- Quote service paths (
sc.exe config), and verify no write access for normal users on binaries and service registry keys. -
AlwaysInstallElevated= 0 (or absent) under both HKLM and HKCU policy keys. - Enable process-creation auditing and
ProcessCreationIncludeCmdLine_Enabled = 1. It is off by default. - Deploy LAPS so one stolen local-admin hash does not open every host.
- Run web app pools under dedicated low-privilege accounts; inventory
SeImpersonatePrivilegewithwhoami /priv; use gMSA. - Monitor 4672 (unexpected privileged accounts), 7045 (non-standard paths) and 4688/Sysmon 1 (low-privilege parent -> System child).
Next: escalation by vulnerability, where patching is the answer.
Adapted from chapters 16 and 25 of my Japanese book on server defense.
π° Read the original article on Dev.to Security
Originally published by Dev.to Security. Aggregated on AIWithGhost for educational purposes β full credit and traffic to the original publisher.