為什么分析器需要管理權限(在Windows上)

[英]Why do profilers need administrative privs (on Windows)


I've been evaluating profilers and memory checking tools for native C++ programs on Windows and all of them want to be installed and run with administrator privileges. I rarely log in as admin on my machine. If I need to install something or do something that requires administrative privileges, I use runas and it works pretty well.

我一直在為Windows上的本機C ++程序評估分析器和內存檢查工具,所有這些工具都希望以管理員權限安裝和運行。我很少在我的機器上以管理員身份登錄。如果我需要安裝某些東西或做一些需要管理權限的東西,我會使用runas並且它運行良好。

Is it legitimate for a profiler to require admin privileges, or are the profiler developers just being lazy? Am I being unreasonable by rejecting all of these tools on this basis?

分析器是否合法需要管理員權限,或者探查器開發人員是否只是懶惰?在此基礎上拒絕所有這些工具,我是不合理的嗎?

I'm developing with VS 2005 on an XP Pro machine.

我正在使用XP 2005在XP Pro機器上進行開發。

5 个解决方案

#1


Because they have to look at other process' memory, which is normally taboo.

因為他們必須查看其他進程的內存,這通常是禁忌。

#2


some cpu profilers actually do a statistic averaging using OS interrupts... obviously they cannot do this without privileges for that :)

一些cpu剖析器實際上使用操作系統中斷進行統計平均...顯然,如果沒有特權,他們就無法做到這一點:)

#3


I've been reading about this and I'm slowly coming to the conclusion that profiler-like tools in general do not require administrative access, but stating that you require it is an easy way for the tool makers to avoid all problems related to insufficient privileges.

我一直在閱讀這篇文章,我正在慢慢得出結論,類似分析器的工具通常不需要管理訪問,但聲明你需要它是工具制造商避免所有與不足相關的問題的簡單方法特權。

So, I guess they are being lazy but also somewhat pragmatic.

所以,我猜他們是懶惰但也有點務實。

Correct me if I'm wrong (I'm no expert on the Windows security model), but I believe one way to handle this situation would be to require admin privileges only at install time. Then create a ProfilerUsers user group and grant any necessary privileges to that group, then ask which computer users should be added to that group.

如果我錯了,請糾正我(我不是Windows安全模型的專家),但我相信處理這種情況的一種方法是僅在安裝時要求管理員權限。然后創建ProfilerUsers用戶組並向該組授予任何必要的權限,然后詢問應將哪些計算機用戶添加到該組。

The most shocking thing I've discovered is that a lot of developers run all the time with administrative privileges.

我發現的最令人震驚的事情是許多開發人員一直以管理權限運行。

#4


Sounds like a design choice by the developers. They may have thought it was a good idea to request admin rights before probing around in memory or dynamically altering code in memory since this behaviour is to be expected from some types of malware.

聽起來像開發人員的設計選擇。他們可能認為在內存中探測或動態更改內存中的代碼之前請求管理員權限是個好主意,因為某些類型的惡意軟件會出現這種行為。

#5


The most likely explanation is that they are implemented as specialised debuggers, using the Win32 debugging APIs like DebugActiveProcess(). These functions need PROCESS_ALL_ACCESS (as detailed in the documentation) and I would expect that you will need admin rights for that.

最可能的解釋是它們是作為專用調試器實現的,使用Win32調試API,如DebugActiveProcess()。這些函數需要PROCESS_ALL_ACCESS(詳見文檔),我希望您需要管理員權限。

IIRC the Visual Studio debugger won't work (properly) either unless you have local admin rights on your system, at least for C++.

IIRC除非您的系統具有本地管理員權限,否則Visual Studio調試器將無法正常工作,至少對於C ++而言。


注意!

本站翻译的文章,版权归属于本站,未经许可禁止转摘,转摘请注明本文地址:https://www.itdaan.com/blog/2009/02/12/725752bdaa7d4aab91f0c0cdbd1a1098.html



 
粤ICP备14056181号  © 2014-2021 ITdaan.com