microsoft / microsoft/perfview
PerfView should run the debugging application as a normal user and not as an elevated (admin) user
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 4.7k
- Forks
- 775
- Avg merge
- 5d 11h
- Merged PRs (30d)
- 9
Description
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).
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the PerfView paths described in the issue: Run a command, Collect > Run (Alt-R), and the command-line run command, then trace how elevation and the launched process are handled. Done means the profiled application runs as the normal non-elevated user when PerfView is elevated, including the reported Windows Store application scenario.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- operating-systems, security
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100