昇格前と昇格後 access token を比較してみます。
# 調査には whoami.exe を利用しました。
# <参考> Process の TokenIntegrityLevel を簡単に識別する方法 その2 (Command Prompt 限定)
まずは格納されている group の方。
(実際には SID が格納されているわけですが)
Group Information
| Group Name |
昇格前 |
昇格後 |
| Everyone |
enabled |
enabled |
| BUILTIN\Administrators |
deny-only |
enabled |
| BUILTIN\Users |
enabled |
enabled |
| NT AUTHORITY\INTERACTIVE |
enabled |
enabled |
| NT AUTHORITY\Authenticated Users |
enabled |
enabled |
| NT AUTHORITY\This Organization |
enabled |
enabled |
| LOCAL |
enabled |
enabled |
| NT AUTHORITY\NTLM Authentication |
enabled |
enabled |
ここで注目すべきは [BUILTIN\Administrators] に設定された "deny-only" ですが、これは CreateRestrictedToken を使ってもともとある group の SID を無効化しているという意味です。
Windows 内部で access token と ACL を照合して、権限があるかどうかを判断しているわけなんですが、"deny-only" が設定されているとこの entry は利用されずに他の group および user SID のみで判断が行われるというわけです。
では次に特権の方を見てみましょう。
Privilege Information
| Privilege |
昇格前 |
昇格後 |
| SeIncreaseQuotaPrivilege |
|
disabled |
| SeSecurityPrivilege |
|
disabled |
| SeTakeOwnershipPrivilege |
|
disabled |
| SeLoadDriverPrivilege |
|
disabled |
| SeSystemProfilePrivilege |
|
disabled |
| SeSystemtimePrivilege |
|
disabled |
| SeProfileSingleProcessPrivilege |
|
disabled |
| SeIncreaseBasePriorityPrivilege |
|
disabled |
| SeCreatePagefilePrivilege |
|
disabled |
| SeBackupPrivilege |
|
disabled |
| SeRestorePrivilege |
|
disabled |
| SeShutdownPrivilege |
disabled |
disabled |
| SeDebugPrivilege |
|
disabled |
| SeSystemEnvironmentPrivilege |
|
disabled |
| SeChangeNotifyPrivilege |
enabled |
enabled |
| SeRemoteShutdownPrivilege |
|
disabled |
| SeUndockPrivilege |
disabled |
disabled |
| SeManageVolumePrivilege |
|
disabled |
| SeImpersonatePrivilege |
|
enabled |
| SeCreateGlobalPrivilege |
|
enabled |
| SeIncreaseWorkingSetPrivilege |
disabled |
disabled |
| SeTimeZonePrivilege |
disabled |
disabled |
| SeCreateSymbolicLinkPrivilege |
|
disabled |
注意してほしいのは "disabled" があるのは特権が有効になっていないというだけで、特権そのものは存在しているということです。
特権自体が存在しない場合には空欄にしてあります。