Skip to content
Pwnversity
FUND-WINDOWSbasic · 15 min · upd. 2026-11

Windows: Files, Users and Permissions

Most machines in a company run Windows, and almost everything you’ll do on them comes down to two questions: who you are and what you can touch. Windows answers both with its own building blocks (SIDs, tokens, privileges, ACLs) that look nothing like Linux’s rwx. Once you understand them, whoami /all and icacls stop being noise and start telling you where the escalation is.

Every current Windows runs on the NT kernel: internally, Windows 11 reports itself as version 10.0. There are two families:

  • Client: Windows 10 and 11 (Home, Pro, Enterprise). Home can’t join a domain. Windows 10 reached end of general support in October 2025, but you’ll keep running into it.
  • Server: 2019, 2022 and 2025. The default install is Server Core, with no desktop: console only, less memory and a smaller attack surface. It’s the lightest option for a lab.
Linux Windows
Shell Bash or zsh, passing text CMD and PowerShell, which passes objects
Configuration Text files in /etc Mostly the registry
Top account root Administrator and, above it, SYSTEM
Services Daemons under systemd Services managed by the SCM
Installing apt, dnf .exe, .msi or winget
Line endings LF CRLF
ext4 (Linux) NTFS (Windows)
Root A single one: / One per drive: C:\, D:\
Separator / \
Case Notes and notes are different Case-insensitive
Permissions rwx for owner, group and others ACL with per-user or per-group entries
Hidden files Name starts with a dot Hidden attribute
What runs Anything with the x bit Anything with an executable extension
  • Absolute: C:\Users\ana\Desktop\notes.txt. Relative: ..\Documents. UNC: \\FS01\shared\reports, a shared folder on another machine.
  • Paths with spaces always go in quotes: "C:\Program Files\App\app.exe".
  • FAT32 and exFAT (USB sticks, SD cards) have no permissions: a file protected on NTFS loses its whole ACL when copied there.
Folder What it holds Linux equivalent
C:\Windows\System32 System programs and libraries /usr/bin, /usr/lib
C:\Program Files · (x86) 64-bit · 32-bit programs /opt
C:\Users\<user> Profile; inside, AppData (hidden) /home/<user>
C:\ProgramData Program data shared by everyone /var/lib
C:\Windows\Temp · %TEMP% System · user temporary files /tmp
Variable Example value
%USERPROFILE% C:\Users\ana
%APPDATA% C:\Users\ana\AppData\Roaming
%TEMP% C:\Users\ana\AppData\Local\Temp
%SystemRoot% C:\Windows
%PATH% Folders searched for executables

In CMD you read them with echo %USERPROFILE% (and set lists them all); in PowerShell, with $env:USERPROFILE (and Get-ChildItem env:).

What runs on double-click or when you type its name depends on the extension: .exe, .msi, .bat and .cmd, .ps1 (if the Execution Policy allows it), .vbs and .js, .lnk. A .dll doesn’t run on its own: another process loads it. The %PATHEXT% variable lists the extensions the console tries when you type a name without one.

  • Local account: lives in the machine’s SAM database and only works there. Written as MACHINE\user.
  • Domain account: stored by the domain controller and valid on every machine in the domain. Written as DOMAIN\user or user@domain. Covered in Active Directory.
  • Built-in: Administrator (disabled by default on Windows 10 and 11), Guest (disabled) and the account you create during setup, which is an administrator.
  • SYSTEM (NT AUTHORITY\SYSTEM) is the identity of the operating system itself. It has more power than any administrator and is the goal of a local privilege escalation.

Windows doesn’t identify anyone by name: it uses the SID (Security Identifier). The name is just a label that can be changed. Example:

S-1-5-21-3623811015-3361044348-30300820-1013
│ │ │ │ └─ RID: the specific account
│ │ │ └─ machine or domain identifier (21 + three numbers)
│ │ └─ authority 5: NT Authority
│ └─ revision 1
└─ it's a SID
RID Account
500 Administrator
501 Guest
1000 onwards Accounts created later

If someone renames Administrator to support, the account still ends in -500. Some SIDs are the same on every machine: S-1-5-18 is SYSTEM and S-1-5-32-544 is the local administrators group.

Group SID What it allows
Administrators S-1-5-32-544 Full control of the machine
Users S-1-5-32-545 Normal use
Backup Operators S-1-5-32-551 Reading any file to back it up, even if the ACL says no
Remote Desktop Users S-1-5-32-555 Connecting over RDP
Remote Management Users S-1-5-32-580 Connecting over WinRM (remote PowerShell)

When an administrator logs on, Windows gives them two tokens: a filtered one without admin powers and a full one. By default everything starts with the filtered token. Accepting the UAC prompt (“Run as administrator”, or Start-Process powershell -Verb RunAs) launches the process with the full token: it’s the equivalent of sudo.

The process integrity level gives it away: Medium in a normal console, High in an elevated one, System for SYSTEM’s processes. That’s why being in Administrators isn’t enough to do admin things from a non-elevated console.

Besides groups, the token carries privileges: individual capabilities you can check with whoami /priv.

Privilege What it allows
SeImpersonatePrivilege Acting on behalf of another user who connects to the process. Service accounts have it
SeBackupPrivilege Reading any file regardless of its ACL, for backups
SeDebugPrivilege Opening and reading the memory of any process
SeShutdownPrivilege Shutting down the machine. Harmless

The “State” column shows Enabled or Disabled. Disabled doesn’t mean you don’t have it: it’s assigned to you, just not switched on right now, and a program can enable it when it needs to. If a privilege isn’t in the list at all, then you really don’t have it.

Every NTFS file and folder has an ACL: a list of entries, each with a user or group and its permissions. There are no three fixed blocks as in Linux.

Permission Meaning
F Full control, including changing permissions and owner
M Modify: read, write, execute and delete
RX Read and execute
R Read only
W Write only
  • An explicit Deny beats an Allow: if one of your groups has Deny, it doesn’t matter that another has Allow.
  • Permissions are inherited from the parent folder. In icacls, (OI) means it’s inherited by files inside, (CI) by subfolders and (I) means the entry was inherited rather than set by hand.

Windows doesn’t store passwords: it stores a hash of each one (the NT hash). At logon, it hashes what you type and compares. Local accounts live in the SAM; domain accounts, in the NTDS.dit file on every domain controller. A hash can’t be reversed, but you can try millions of passwords until one produces the same hash: that’s why password length matters more than odd symbols.

C:\> whoami /all
USER INFORMATION
pwnlab\ana S-1-5-21-1004336348-1177238915-682003330-1105 ← domain account, RID 1105
GROUP INFORMATION
BUILTIN\Administrators Alias S-1-5-32-544 Group used for deny only ← admin, but this console isn't elevated
Mandatory Label\Medium Mandatory Level ... ← Medium integrity: not elevated
PRIVILEGES INFORMATION
SeShutdownPrivilege Shut down the system Disabled
SeChangeNotifyPrivilege Bypass traverse checking Enabled

“Group used for deny only” is the mark of the filtered token: the administrators group is there, but it only counts for denying. Open a console as administrator and you’ll see High Mandatory Level and many more privileges.

Ventana de terminal
PS> Get-LocalGroupMember -SID S-1-5-32-544 # local administrators, in any language
ObjectClass Name PrincipalSource
----------- ---- ---------------
User WS01\support Local # the renamed Administrator (RID 500)
Group PWNLAB\Domain Admins ActiveDirectory # joining the domain adds Domain Admins here
User PWNLAB\ana ActiveDirectory
C:\> icacls "C:\Tools\backup"
C:\Tools\backup BUILTIN\Users:(OI)(CI)(M) ← Users can modify! set by hand, not inherited
BUILTIN\Administrators:(I)(OI)(CI)(F) ← inherited, full control
NT AUTHORITY\SYSTEM:(I)(OI)(CI)(F)
Successfully processed 1 files; Failed processing 0 files

If that folder holds a program that runs as SYSTEM, any user can replace it: that’s the line you look for in an audit.

C:\> net user support
User name support
Account active Yes
Password last set 11/3/2026 9:12:44 AM
Local Group Memberships *Administrators
Ventana de terminal
PS> Get-LocalUser | Select-Object Name, Enabled, SID
Name Enabled SID
---- ------- ---
support True S-1-5-21-…-500 ← ends in 500: it's the renamed Administrator
Guest False S-1-5-21-…-501
ana True S-1-5-21-…-1001
Concept What to remember
SYSTEM Above any administrator. Goal of local escalation.
SID · RID The real identity. 500 = Administrator, 501 = Guest, your own from 1000.
S-1-5-32-544 Local administrators in any language.
S-1-5-18 SYSTEM.
SAM · NTDS.dit Local account hashes · the whole domain’s.
Medium · High Normal console · elevated console.
“Group used for deny only” You’re an admin, but not elevated.
Disabled privilege You have it; it’s just not enabled right now.
F · M · RX · R Full · modify · read and execute · read.
Deny versus Allow The explicit Deny wins.
(OI)(CI) · (I) Inherited downwards · came from the parent.
FAT32 · exFAT No permissions: copying there drops the ACL.
%PATHEXT% Which extensions run by name.
  1. Someone renamed the Administrator account to helpdesk. How do you spot it?

    Answer

    By its SID, which still ends in RID 500. Get-LocalUser | Select-Object Name, SID shows it instantly.

  2. You write a script that checks whether a user is an administrator by looking for the “Administrators” group, and it fails on Spanish-language machines. How do you fix it?

    Answer

    Look the group up by its SID, S-1-5-32-544, which is the same in every language. For example, Get-LocalGroupMember -SID S-1-5-32-544.

  3. You’re in Administrators, but a command returns “Access denied”. whoami /all shows the group as “Group used for deny only”. What’s going on?

    Answer

    The console is running with UAC’s filtered token, at Medium integrity. You need an elevated console (“Run as administrator”) to use the full token.

  4. whoami /priv shows SeImpersonatePrivilege as Disabled. Do you have it or not?

    Answer

    You have it: it’s assigned to your token, just not enabled at the moment. A program can enable it when it needs it. If you didn’t have it, it wouldn’t appear in the list at all.

  5. icacls shows BUILTIN\Users:(OI)(CI)(M) on the folder holding the executable of a service that runs as SYSTEM. Why do you care?

    Answer

    Because any user can modify or replace the files in that folder, and the service will run them as SYSTEM: that’s a privilege escalation. Also, since it has no (I), someone set that permission by hand.

  6. One of your groups has Allow read on a folder and another has Deny read. Can you read it?

    Answer

    No. An explicit Deny beats an Allow.

  7. You copy a protected NTFS document to a FAT32 USB stick and then to another machine. What happens to its permissions?

    Answer

    They’re lost: FAT32 doesn’t store ACLs, so the file is left with no protection of its own.