How does task manager elevate without UAC Prompt?

2019-03-27 05:01发布

This has been on my mind for sometime. I can open task manager by pressing Ctrl + Shift + Esc and on the second tab (Processes), I can easily press Alt + S -- Show processes from all users to elevate my task manager without any prompts whatsoever. And voila, I have a powerful tool to play with. I've been unable to find any documents explaining this and I'm very curious about how this feat is achieved; since the button should actually ask for a prompt but does not.

1条回答
何必那么认真
2楼-- · 2019-03-27 05:34

What you are describing is called Auto Elevation. It is done by a lot more than just task manager, but there is no way to make your program do it. To auto elevate the following requirements must be met.

  1. <autoElevate>true</autoElevate> must be in the assembly manifest.
  2. It must be located in one of a handful of "secure" directories. A secure directory is one that standard users can't modify and they include %SystemRoot%\System32 and most of its subdirectories, %SystemRoot%\Ehome, as well as a handful of directories under %ProgramFiles% that include Windows Defender and Windows Journal.
  3. It must be digitally signed by the Windows publisher, which is the certificate used to sign all code included with Windows (it's not sufficient to be signed by Microsoft, so Microsoft software that's not shipped in Windows isn't included)

You can do number 1 and 2 yourself, but there is no way you can fulfill requirement #3.

查看更多
登录 后发表回答