microsoft/perfview

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

Open

#135 aperta il 1 nov 2016

Vedi su GitHub
 (12 commenti) (4 reazioni) (0 assegnatari)C# (687 fork)batch import
enhancementhelp wanted

Metriche repository

Star
 (3819 star)
Metriche merge PR
 (Merge medio 1h 51m) (2 PR mergiate in 30 g)

Descrizione

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).

Guida contributor