TransWikia.com

How to list all Privileges held by a Process?

Super User Asked on November 14, 2021

Using Process Explorer tool, we can see the privileges held by a running process. A running process might delete the privileges, and hence effective privileges held by the process would be less than what’s allowed to the user/group.

If we open a process in ProcExp, and select ‘Security’ tab, we can see all privileges currently held by the process, and status of each privilege:
enter image description here

If we select any other process (Service) running under SYSTEM account, it would not have all the privileges (like SeTcbPrivilege) – the process itself might have deleted the process (using AdjustTokenPrivilege with SE_PRIVILEGE_REMOVED flag).

Which command can list the privileges held by a running process?

2 Answers

This answer is a bit late, but after fighting to with this myself, I thought it would be worth documenting the result:

Sysinternals accesschk.exe seems to do it.

It's sensitive to the order of the command line paramters, so it took a few experiments to get the expected result:

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 AUTHORITYSYSTEM
  RW BUILTINAdministrators

  Token security:
  RW NT AUTHORITYSYSTEM
  RW BUILTINAdministrators

  Token contents:
    User:
      NT AUTHORITYSYSTEM
    Groups:
      BUILTINAdministrators                           OWNER
      Everyone                                         MANDATORY
      NT AUTHORITYAuthenticated Users                 MANDATORY
      Mandatory LabelSystem 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 `

Answered by Sami Sallinen on November 14, 2021

This only works for the current user. I don't know how to specify a pid.

C:WINDOWSsystem32>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:WINDOWSsystem32>

Answered by plong on November 14, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP