答案1
这个答案有点晚了,但经过我自己的努力,我认为值得记录结果:
系统内部访问检查工具似乎可以做到。
它对命令行参数的顺序很敏感,因此需要进行一些实验才能获得预期的结果:
C:\sysinternals>accesschk.exe -p -f 13488
Accesschk v6.14 - Reports effective permissions for securable objects
Copyright 2006-2021 Mark Russinovich`
Sysinternals - www.sysinternals.com
[13488] game.exe
RW NT AUTHORITY\SYSTEM
RW BUILTIN\Administrators
Token security:
RW NT AUTHORITY\SYSTEM
RW BUILTIN\Administrators
Token contents:
User:
NT AUTHORITY\SYSTEM
Groups:
BUILTIN\Administrators OWNER
Everyone MANDATORY
NT AUTHORITY\Authenticated Users MANDATORY
Mandatory Label\System Mandatory Level INTEGRITY
Privileges:
SeAssignPrimaryTokenPrivilege DISABLED
SeLockMemoryPrivilege ENABLED
SeIncreaseQuotaPrivilege DISABLED
SeTcbPrivilege ENABLED
SeSecurityPrivilege DISABLED
SeTakeOwnershipPrivilege DISABLED
SeLoadDriverPrivilege DISABLED
SeSystemProfilePrivilege ENABLED
SeSystemtimePrivilege DISABLED
SeProfileSingleProcessPrivilege ENABLED
SeIncreaseBasePriorityPrivilege ENABLED
SeCreatePagefilePrivilege ENABLED
SeCreatePermanentPrivilege ENABLED
SeBackupPrivilege DISABLED
SeRestorePrivilege DISABLED
SeShutdownPrivilege DISABLED
SeDebugPrivilege ENABLED
SeAuditPrivilege ENABLED
SeSystemEnvironmentPrivilege DISABLED
SeChangeNotifyPrivilege ENABLED
SeUndockPrivilege DISABLED
SeManageVolumePrivilege DISABLED
SeImpersonatePrivilege ENABLED
SeCreateGlobalPrivilege ENABLED
SeIncreaseWorkingSetPrivilege ENABLED
SeTimeZonePrivilege ENABLED
SeCreateSymbolicLinkPrivilege ENABLED
SeDelegateSessionUserImpersonatePrivilege ENABLED
Security Attributes:
TSA://ProcUnique
[TOKEN_SECURITY_ATTRIBUTE_NON_INHERITABLE]
[TOKEN_SECURITY_ATTRIBUTE_COMPARE_IGNORE]
TOKEN_SECURITY_ATTRIBUTE_TYPE_UINT64
[0] 381
[1] 818343692 `
答案2
这仅适用于当前用户。我不知道如何指定 pid。
C:\WINDOWS\system32>whoami /priv
PRIVILEGES INFORMATION
----------------------
Privilege Name Description State
=============================== ========================================= ========
SeIncreaseQuotaPrivilege Adjust memory quotas for a process Disabled
SeSecurityPrivilege Manage auditing and security log Disabled
SeTakeOwnershipPrivilege Take ownership of files or other objects Disabled
SeLoadDriverPrivilege Load and unload device drivers Disabled
SeSystemProfilePrivilege Profile system performance Disabled
SeSystemtimePrivilege Change the system time Disabled
SeProfileSingleProcessPrivilege Profile single process Disabled
SeIncreaseBasePriorityPrivilege Increase scheduling priority Disabled
SeCreatePagefilePrivilege Create a pagefile Disabled
SeBackupPrivilege Back up files and directories Disabled
SeRestorePrivilege Restore files and directories Disabled
SeShutdownPrivilege Shut down the system Disabled
SeDebugPrivilege Debug programs Disabled
SeSystemEnvironmentPrivilege Modify firmware environment values Disabled
SeChangeNotifyPrivilege Bypass traverse checking Enabled
SeRemoteShutdownPrivilege Force shutdown from a remote system Disabled
SeUndockPrivilege Remove computer from docking station Disabled
SeManageVolumePrivilege Perform volume maintenance tasks Disabled
SeImpersonatePrivilege Impersonate a client after authentication Enabled
SeCreateGlobalPrivilege Create global objects Enabled
SeIncreaseWorkingSetPrivilege Increase a process working set Disabled
SeTimeZonePrivilege Change the time zone Disabled
SeCreateSymbolicLinkPrivilege Create symbolic links Disabled
C:\WINDOWS\system32>