microsoft/perfview

PerfView should run the debugging application as a normal user and not as an elevated (admin) user

Open

#135 建立於 2016年11月1日

在 GitHub 查看
 (12 留言) (4 反應) (0 負責人)C# (3,819 star) (687 fork)batch import
enhancementhelp wanted

描述

Hello

When we run an application with PerfView (clicking on "Run a command", or by the menus "Collect" / "Run" (Alt-R), or by command line "run"), PerfView elevates itself then run the application as elevated too. That is a security threat, and it prevents debugging Window Store applications (they fail running, see https://social.msdn.microsoft.com/Forums/en-US/41170c0f-405c-45d8-abcd-b7a376c70c48/failure-starting-process-in-perview-with-windows-10-universal-application?forum=wpdevelop).

PerfView, even elevated, should run the application as the normal non-elevated user.

It is obviously feasible as said here: https://blogs.msdn.microsoft.com/winsdk/2013/06/17/launching-a-process-as-a-normal-user-from-an-elevated-user/ It is even easier in PerfView as when PerfView starts non-elevated, it knows who is the normal user and it can collect the non-elevated token and pass it to the elevated PerfView process.

Thank you.

Tested with PerfView 1.9.0.0

TEST:

  • Run PerView.
  • Alt-R
  • Type-in command to the application.
  • Click on run command.
  • Check in the task manager that the application as been launched with elevated privileges (admin user).

IMPACT:

  • Windows Store applications can not been profiled this way.
  • That is a security threat since the application has admin rights, and usuallly it was not designed for that.
  • The developper can not profile its application as a normal non-elevated user (the behavior of the application can be very different).

貢獻者指南