Skip to content

Latest commit

 

History

History
33 lines (19 loc) · 640 Bytes

readme.md

File metadata and controls

33 lines (19 loc) · 640 Bytes

This is some test code for a windows service to impersonate a logged user to access his certificate store.

Test

Follow this link.

psexec -i -s cmd.exe

Now run imcert.exe (it will be run as local system account),

e:\projects\imcert\x64\Debug>imcert.exe
Hello World!
Number of Entries: 128

The system store was opened successfully.
The desired certificate was found.

If we run it normally,

e:\projects\imcert\x64\Debug>imcert.exe
Hello World!
Number of Entries: 132

WTSQueryUserToken failed with error = 1314