Operating systems for security work: users, permissions, processes, and logs on Windows, Linux, and macOS
The same four questions on three operating systems: who is signed in, what can they touch, what is running, and where the evidence is written.
Diagram
Four questions, three systems
Step 1 of 4
Who
Users and groups, and which ones are administrators.
Linux: id; getent group sudo Windows: whoami /groups; net localgroup administrators macOS: dscl . -read /Groups/admin GroupMembership
The example on the open step is one illustration, or the fix you can paste into an application you own.
What this page is made of
3 pieces. Each one says what fails, who is affected, what you would notice, and what you change.
Administrators are few on purpose
- What fails
- Daily work as an administrator turns every phishing click into a full compromise.
- Who is affected
- Everything on the machine and anything its credentials reach.
- What you would notice
- Ordinary users in the local Administrators, sudo, or admin group.
- What you change
- Use separate admin accounts or just-in-time elevation.
Permissions are inherited
- What fails
- A folder ACL or a world-writable directory passes access to everything inside.
- Who is affected
- Owners of files that become readable or writable by others.
- What you would notice
- chmod 777 in a deploy script, or Everyone: Full control on a share.
- What you change
- Grant to groups, remove inheritance where needed, and review with icacls or getfacl.
Logs need to be turned on and kept
- What fails
- Defaults keep small logs that roll over quickly.
- Who is affected
- Responders who arrive after the evidence rotated out.
- What you would notice
- A Security log that holds only a few hours of events.
- What you change
- Raise log sizes and forward events to a central store.
Linux in brief
Everything is a file with an owner, group, and mode bits; sudo grants elevated commands; systemd starts services and journald collects their logs. Package managers record what is installed, which makes inventory easy.
Windows in brief
Accounts are local or domain accounts; access tokens carry group memberships; NTFS ACLs control files; services and scheduled tasks run code at startup; the Security, System, and PowerShell logs hold the evidence. User Account Control splits admin sessions into a filtered and an elevated token.
macOS in brief
macOS is Unix underneath, adds Transparency, Consent, and Control prompts for sensitive data, Gatekeeper and notarization for apps, and the unified log for events. Launch agents and daemons are its autostart mechanism.
$ spctl --status assessments enabled $ csrutil status System Integrity Protection status: enabled.
Check yourself
Recognition and the fix. Nothing here is a procedure.
Which Windows command shows members of the local Administrators group?
Sibling techniques
Pages at the same depth, plus a lab and a glossary card for this one.
This page stands on its own. The lab and the glossary card are the next reading.