NtImpersonateAnonymousToken - NtDoc

Native API online documentation, based on the System Informer (formerly Process Hacker) phnt headers
#ifndef _NTSEAPI_H

NTSYSCALLAPI
NTSTATUS
NTAPI
NtImpersonateAnonymousToken(
    _In_ HANDLE ThreadHandle
    );

#endif

View code on GitHub
#ifndef _NTZWAPI_H

NTSYSCALLAPI
NTSTATUS
NTAPI
ZwImpersonateAnonymousToken(
    _In_ HANDLE ThreadHandle
    );

#endif

View code on GitHub

Impersonates the anonymous logon token on the specified thread.

Parameters

Remarks

Depending on the EveryoneIncludesAnonymous LSA setting, the anonymous logon token either has untrusted integrity with no group membership or low integrity with Everyone membership.

To reset impersonation, use NtSetInformationThread with ThreadImpersonationToken info class and a NULL token handle.

Related Win32 API

See also