Windows IT Pro is the leading independent community for IT professionals deploying Microsoft Windows server and client applications and technologies.
  
  
  Advanced Search 


August 2006

The Power in Power Users


RSS
Subscribe to Windows IT Pro | See More Security Articles Here | Reprints | Or get the Monthly Online Pass—only $5.95 a month!
Main Article    Ask the Experts, August 2006

Placing Windows user accounts in the Power Users security group is a common approach that organizations take to get users into a least-privilege environment while avoiding the many pains of running as a truly limited user. The Power Users group can install software, manage power and time-zone settings, and install ActiveX controls—actions that limited users are denied. However, this power comes at the price of true limited-user security. Many articles point out that members of the Power Users group can elevate themselves to fully privileged administrators, but I was unable to find a detailed description of these elevation mechanisms. I therefore decided to investigate. You can see the details of my investigation at http://www.sysinternals.com/blog/2006/05/power-in-power-users.html.

To summarize, I discovered that although Power Users can create files underneath the Windows directory, Windows configures default security permissions so that only members of the Administrators group and the Local System account have write access to them. But there's one glaring exception: ntoskrnl.exe. That's right, the Power Users group can replace or modify Windows' core OS file. Five seconds after the file is modified, however, Windows File Protection (WFP) will replace it with a backup copy. But members of the Power Users group can circumvent WFP by writing a simple program that replaces the file, flushes the modified data to disk, then reboots the system before WFP takes action.

But how could someone use this vulnerability to elevate privilege? The answer is via SeSinglePrivilegeCheck, the function that Windows uses for privilege checks. A user simply patches the function's entry point in the ondisk image so that it always returns TRUE, which indicates that a user has the privilege being checked for. Once a user is running on a kernel modified in this manner, the user appears to have all privileges, including Load Driver, Take Ownership, and Create Token, which the user can easily leverage to take administrative control of a system.

Replacing ntoskrnl.exe isn't the only way to punch through to administrative privilege via the Windows directory. Default permissions for schedsvc.dll allow modification by members of the Power User group. Schedsvc.dll is the DLL that implements the Windows Task Scheduler service. A member of Power Users could replace the DLL with an arbitrary DLL, such as one that simply adds the user's account to the Local Administrators group.

Next, I looked at Power Users' access to the Program Files directory and discovered that Power Users can modify any file or directory created in Program Files subsequent to those created during the base Windows install. Replacing these service image files is a quick path to administrator privilege.

When I looked at Windows services, I found that users with SERVICE_CHANGE_CONFIG write permissions can configure an arbitrary executable to launch when a service starts, and given WRITE_DAC access, they can modify the permissions on a service to grant themselves SERVICE_CHANGE_CONFIG access. I discovered that Power Users have write access to DComLaunch, which provides launch services for DCOM services and executes in the powerful Local System account. Thus, Power Users can simply change the image path of DComLaunch to point at their own image, reboot the system, and enjoy administrative privileges. The default permissions Windows sets on services created by third-party applications don't allow Power Users write access, but some third-party applications might configure custom permissions to allow them to do so.

Microsoft's newest OS, Windows Vista, closes down all the vulnerabilities I've described by neutering the Power Users group so that it behaves like limited users. But Microsoft can't prevent third-party applications from introducing new vulnerabilities. The lesson is that, as an IT administrator, you shouldn't fool yourself into thinking that the Power Users group is a secure compromise on the way to running as limited user.

End of Article



Reader Comments

You must be a registered user or online subscriber to comment on this article. Please log on before posting a comment. Are you a new visitor? Register now




Top Viewed ArticlesView all articles
Command Prompt Tricks

One reader shares his tip for setting up the command prompt to reflect a remote path. ...

WinInfo Short Takes: Week of November 23, 2009

An often irreverent look at some of the week's other news, including some post-PDC some soul searching, a Google Chrome OS announcement and a Microsoft response, Windows 7 off to a supposedly strong start, the Jonas Brothers and Xbox 360, and so much more ...

2009 Windows IT Pro Editors' Best and Community Choice Awards

Picking a favorite product from an impressive crowd of competitive offerings is never an easy task, and such was the case with our Editors' Best and Community Choice awards this year. ...


Security Whitepapers Reducing the Costs and Risks of Branch Office Data Protection

Solving Desktop Management Challenges in Healthcare

Solving Desktop Management Challenges in Education

Related Events Deep Dive into Windows Server 2008 R2 presented by John Savill

Introduction to Identity Lifecycle Manager "2"

SQL Server Security: How to Secure, Monitor & Audit Your Databases

Check out our list of Free Email Newsletters!

Security eBooks Spam Fighting and Email Security for the 21st Century

Understanding and Leveraging Code Signing Technologies

A Guide to Windows Certification and Public Keys

Related Security Resources Introducing Left-Brain.com, the online IT bookstore
Looking for books, CDs, toolkits, eBooks? Prime your mind at Left-Brain.com

Discover Windows IT Pro eLearning Series!
Clear & detailed technical information and helpful how-to's, all in our trademark no-nonsense format


Windows IT Pro Home Register FAQ for Windows WinInfo News
Europe Edition About Us Contact Us/Customer Service Media Kit Affiliates / Licensing  
SQL Server Magazine Office & SharePoint Pro DevProConnections IT Job Hound
Left-Brain.com Technology Resource Directory asp.netPRO ITTV Windows SuperSite 
 
 Windows IT Pro is a Division of Penton Media Inc.
 © 2009 Penton Media, Inc. Terms of Use | Privacy Statement