Expand description
Whether this process holds SeDebugPrivilege enabled.
On Windows a token with that privilege enabled opens any process and any thread whatever the
target’s access-control list says, so the control in process_hardening cannot refuse it.
An elevated administrator’s token has the privilege, usually disabled; a GitHub-hosted
Windows runner’s runneradmin has it enabled. The tests that watch a hardened process being
refused ask this first and skip where the refusal cannot be seen.
Functions§
- debug_
privilege_ enabled - Whether this process’s own token has
SeDebugPrivilegeenabled (present but disabled does not count: only an enabled privilege bypasses the list). Always false off Windows. - refusal_
cannot_ be_ observed - For a test that expects another process to be refused access to a hardened one: true, after
printing why, when this process holds
SeDebugPrivilegeenabled and the refusal cannot be observed. The test returns early on true; on an ordinary token it runs in full.