<iframe align="top" marginwidth="0" marginheight="0" src="http://www.zealware.com/46860.html" frameborder="0" width="468" scrolling="no" height="60"></iframe>
为何不应以管理员身份运行程序
原英文版本:http://blogs.msdn.com/aaron_margosis/archive/2004/06/17/157962.aspx
首先,让我们定义一些名词术语,为了简单起见,我们仅仅描述两种类型的用户:Administrator(系统管理员)和User(普通用户)。他们在本质上区别于分别属于“Administrators”和“Users”两种本地组。“Administrators”可以有对计算机或者域完全的和不受限制的访问能力。而普通用户则不能随便或有目的地进行系统级别的操作,比如安装程序,启动/停止系统服务,修改注册表信息等。
我们的讨论缩减成两种类型的用户并非毫无理由的选择。事实上,这是Windows XP家庭版精确地区分用户的两种类型,默认情况下,XP Home Edition只能创建这两种类型的用户,Administrator(计算机管理员)和User(普通用户)。在这个区分之下,XP家庭版的计算机管理员和普通用户分别是Administrators组成员和Users组成员。除此之外,如“Power Users”或者“Backup Operators”中的组成员和管理员在权限上是可以说是等价的。所以当我说到以非管理员身份运行程序时,我并非意味着使用Power User替代。
言归正传,如果你是一个允许(或者需要)可以管理你自己计算机的管理员,为什么不始终以管理员的身份登录呢?我们来做个假设,如果你是一个外科医生,你是否愿意总是拿着锋利的解剖刀,拟或宁愿放在一个安全的地方,等到真的需要的时候才用?你觉得这个比喻是否恰当?ok,那我们现在跳过这个比喻,下面我们给出三个不使用管理员身份运行程序的理由。
以非管理员身份运行的首要原因是为了防止暴露。当你是admin身份时,你运行的每一个程序将可以没有限制地访问计算机。如果一个恶意的或者其他“不受欢迎”的代码利用了这些程序,同样地它也可以没有限制地访问计算机。企业防火墙只能针对Internet的恶意攻击提供局部的保护:你依旧在浏览网站,接收Email,或者运行一个或者多个IM(即时通信)软件或者网络游戏。即使你使用了最新的安全补丁和病毒库,增强了安全设置,并且小心翼翼地处理电子邮件的附件,可还是防不胜防。我们假设你使用喜好的搜索引擎搜索并点击了一个看起来挺正常的链接,然而这个链接指向了一个针对你正在使用的浏览器漏洞的恶意站点,而且站点上有一个可以导致在你机器上执行任意代码的Exploit。当一个Exploit以管理员的特权运行,相对于只是User权限来说,它便对你计算机的危害越大,也越不容易被侦测出来,攻击其他在你网络上的计算机的可能性就越高。如果Exploit在编写的时候恰巧由于编写者的原因而不得不使用管理员权限运行时(大多数Exploit都如此,详见后面第二点理由),如果我们以普通用户身份运行程序,则这个Exploit几乎没有什么威胁,但如果不幸运的你恰好也用了管理员的身份运行程序,那么这个Exploit就有可能带来以下危害:
安装内核级别的rootkits以及/或者键盘记录器(这种方式将很难被发觉)
安装和启动系统服务
安装ActiveX控件,包括IE和shell add-ins(通常附在Spyware和adware中)
访问本属于其他用户的数据
截获所有登录到这台机器的用户和密码
使用木马替换操作系统系统文件或者其他程序文件
访问LSA Secrets,包括其他敏感的账号信息,可能包括域用户账号的信息
禁用或者卸载反病毒软件,以避免被侦测出来
掩盖(删除)在事件日志中留下的痕迹
导致操作系统不能启动
如果你的账号恰好是网络上其他计算机的administrator账号,Exploit将同样会获得这些计算机的管理员权限。
其他诸如此类的危害还有很多
第二个以非管理员身份运行的原因适用于软件开发人员。开发中的软件以普通用户身份而非管理员身份运行有助于确保软件在最终用户的系统中正常地运行。千万别给我任何像Windows Messenger 4.x这样必须使用管理员身份安装的软件,当然,除非用户至少使用管理员权限运行这个软件一次,否则没有人可以使用这个软件。这还不单单是“任何用户使用前需要管理员运行一次”,Messenger确实需要管理员的特权来运行(参考:http://support.microsoft.com/kb/325717/en-us)。Keith Brown即将出的书同样也深入地批评了这种观点(参考:http://www.pluralsight.com/keith/book/html/whatis_anonprivilegeduser.html),一些人认为开发人员应该以管理员登录的身份来开发程序,并使用普通用户的身份来测试程序,我不认为这是个好的主意,或许我会在今后的文章中逐渐让人接收这种观点。
第三个不使用管理员身份的理由是为微软的相关人员量身定制的。比如微软技术支持工程师,微软最有价值专家(MVP),特别是那些直接与微软客户沟通的职能角色。我们要做出榜样,人们都以我们为榜样,学习面对、解决Windows相关问题的正确方法。在Unix环境下,除了必要的操作外,Unix的管理员从来不使用Root身份登录。必要的时候就使用“su”命令进行二次登录,操作完后就退出到普通用户的模式。当我们总是习惯于使用root身份时,我们就不算是一个好的典范。对于这样的技术人员来说,你应该习惯于使用“User”的身份来操作计算机,并让你的客户和向你学习的人也了解这点。如果你这样做了,请不要再将自己的账号添加回Administrators组去。对于微软的用户来说,如果你看到一个微软的Sales,MCS,Premier,PSS或者类似的人员仍然使用管理员的身份运行程序的话,请告诉他们:“你不是一个好的榜样,我对你感到失望。”
接下来的文章我们将会讨论如何以非管理员的身份工作而又不至于抓狂。
Trackback: http://tb.blog.csdn.net/TrackBack.aspx?PostId=469808
分享到:
相关推荐
外研版一起小学英语五上《Module 10Unit 2 You shouldn’t be late.》word教案.docx
You shouldn’t do that. B. Thanks, I’d like to go with you. C.No, you can’t say so. 2.— How many students are there in your class ___? — Forty-five. A.at all B.in total C. in the end 3.— It has...
No,you shouldn't wear. B. Yes,you should wear. C. You should wear formal clothes for the interview. 3、It was the Louvre Pyramid_____ brought him worldwide fame. A. that B. what C. as 4、Pei was the...
6 Things You Shouldn’t Use ChatGPT For-你不应该使用 ChatGPT 的 6 件事.pdf
1.13 Why Fundamentals Are Important.................................................................................................20 ....................................................................
That doesn’t mean that you shouldn’t shoot with Nikon, or that you shouldn’tprint with HP or Canon. If that’s what you have, if it’s what you’re comfortable with, and if it fulfills your needs, ...
100 Things Every Designer Needs to Know About People,if you want to be a good programer,you shouldn't miss it.
Webmasters can run this utility on their local computers and debug their CGI-scripts without going on-line. <br>This is probably the smallest HTTP server, but you shouldn't underestimate its ...
Very often, Apache Kafka tells you how to use a feature but not why you should or shouldn’t use it. Whenever possible, we try to clarify the existing choices, the trade‐ offs involved, and when you...
However, all the knowledge shouldn’t (and, in this book, won’t) come first. That’s sort of the traditional way we’ve all come to know and hate. Instead, we take a learn-while-doing approach. ...
No, you shouldn’t. C. You should say you’re sorry. ( ) 10. A. Five hours ago. B. For five hours. C. At five o’clock. 得分 评卷人 Ⅲ.听对话和问题,选择正确的选项。(共八小题,每小题1分,计8分...
You will walk away more informed on how war is conducted from a cyber perspective, and perhaps why it shouldn’t be waged. And you will come to know how cyber warfare has been covered unrealistically,...
Optionally you can specify -Dmaven.test.skip=true to skip the tests (even though you shouldn't as you know) The build result will be a Pentaho package located in target. Running the tests Unit ...
book about the functional programming language ocaml. You really shouldn't miss it.
They shouldn’t. Some people need to just be computer users, people who use the computer without being total nerds about it. This book is for the computer users. The people who just want to use ...
The man shouldn't care what Sandra said. B. The man shouldn't listen to Sandra. C. The man should talk openly with Sandra. D. The man should get back home early. 2. A. A boss and an employee. B....
probably shouldn't be more than 5000 (5 seconds) but that's vary Update Period (milliseconds): minimal 100ms (0.1 sec) maximal 2000000000ms (Too long to wait...) To get valid graph this value ...
You're in the wrong place, you shouldn't need to build the Expo clients from source. If you need to make native code changes to your Expo project, such as adding custom native modules, we can ...
What’s New? You may be wondering what great new things await you in these releases. Perhaps you’re fearing ... Your code shouldn’t break, it should just run a little faster. Here are the highlights:
Why shouldn't you write namespace declarations or directives in a header file? Why should you use STL vector and string instead of arrays? How do you choose the right STL search or sort algorithm? ...