Developing As Non AdminFar too many Windows applications assume that they will be run by a user with administrative rights - just take a look at Known Problems and Keith Brown's Hall of Shame page. This assumption violates one of the basic requirements to be certified as "Designed for Microsoft Windows XP". The rest of this page explains what you can do as a Windows developer to avoid this problem. #1 Educate Yourself If you haven't already taken a formal course on Windows security, or worked through a good tutorial, now is the time to do so. Not being able to afford it is no excuse: Keith Brown has made his entire book "The .NET Developer's Guide To Windows Security" available online as a wiki (or you can buy it from Amazon).
#2 Develop As A Non AdminThere are several excellent articles about doing your everyday developer jobs while still running as a non-admin: - "Developing as non-admin with VS.NET 2003", by Anil John
- "Developing Software in Visual Studio .NET with Non-Administrative Privileges" (MSDN)
- "How to configure your development environment to develop with least privilege", step-by-step instructions from Anders Norås
- "How To Develop Code As A Non Admin", from Keith Brown's online book (above)
- "How To: Secure Your Developer Workstation" (MSDN)
- "Myth: creating web applications with Visual Studio requires Admin privileges", by Jared Parsons
- "Problems of Privilege: Find and Fix LUA Bugs" (TechNet magazine), by Aaron Margosis
- "The Challenge of Least Privilege" (MSDN), by Michael Howard
- "Visual Studio .NET User Groups: Use, Permissions, Security" (MSDN, as PDF article)
- RegSvrEx, a utility that can register COM servers for the current user (CodeProject)
- "TIP: Least Privilege and ASP.NET Debugging", by G. Andrew Duthie
#3 Test As A Non AdminThe first of the "Top Ten Tips for Secure Testing" from the Windows Hardware and Driver Central site is "Don't run tests as an administrator". You can use the tools and documentation in the Windows Application Compatibility Toolkit to verify that you can run as a limited-access user, or you can use LUA Buglight, a tool from Aaron Margosis designed specifically to help catch LUA bugs in applications. #4 Get Ready For LonghornAs Rick Samona explains in "Writing Secure Applications Using Least Privileges", there will be a new emphasis in Visual Studio.NET 2005 and Longhorn on least-privilege applications. You can read more in: #5 Other Resources |