repositories

daemon-sec-cheatsheet

The cheatsheet vault for operators: AD, enumeration, exploitation, priv-esc, web, DFIR

clonegit clone https://git.daemon-sec.xyz/daemon-sec-cheatsheet.git
wts-impersonator.mdMarkdown65 lines2.7 KiBsource raw download

title: "WTS Impersonator" section: "Windows" sectionSlug: "windows-hardening" sourcePath: "src/windows-hardening/stealing-credentials/wts-impersonator.md" sourceUrl: "https://github.com/HackTricks-wiki/hacktricks/blob/188de82beb54e70956b2952367a0af91d26758b8/src/windows-hardening/stealing-credentials/wts-impersonator.md" sha: "188de82beb54e70956b2952367a0af91d26758b8" isIndex: false modified: true license: "CC-BY-NC-4.0"#

WTS Impersonator#

WTSImpersonator, by Omri Baso, uses Windows Terminal Services APIs exposed through the \\pipe\LSM_API_service RPC named pipe to enumerate logged-on sessions and start a process with a selected user's token. It supports local enumeration and execution as well as remote service-based workflows.[1]

Core functionality#

Its local execution flow uses the following API sequence:[1][2]

WTSEnumerateSessionsA → WTSQuerySessionInformationA → WTSQueryUserToken → CreateProcessAsUserW

Modules and usage#

References#