Windows IT Pro is the authoritative and independent resource for windows nt, windows 2000, windows 2003, windows xp. Features a collection of resources and magazines for windows IT professionals.
  
  
  Advanced Search 


July 2005

Set Your Sights on DropMyRights

Consider this helpful tool an upside-down RunAs
RSS
Subscribe to Windows IT Pro | See More Internet Articles Here | Reprints | Or get the Monthly Online Pass—only $5.95 a month!

We live in a world teeming with viruses, worms, Trojan horses, root kits, and malware. As a result, many people, including myself, have been strongly recommending that we all—even us techies!—spend our days logged on as regular users rather than as more vulnerable local or domain administrators. But a better solution is out there, and it proposes the exact opposite of those fervent recommendations. Have you heard of DropMyRights? No? Let me tell you about it.

The Anti-RunAs Gambit
The actual number of your daily tasks that require administrative rights is relatively small. Researching a problem on the Web and answering email are tasks that you can accomplish just fine from a non-administrative user account. In that scenario, if you accidentally run a malicious program while browsing or opening mail, it won't do too much damage. When you do need to run something as an administrator, you could utilize the RunAs function in Windows Server 2003, Windows XP Professional, or Windows 2000 Server to elevate your powers for just one command.

But many folks just can't live like that. RunAs doesn't work on everything, and some enterprises rely on homegrown applications that require administrative privileges to run properly. Microsoft security guru Michael Howard, coauthor of Writing Secure Code, has offered a different approach, which he details in his article "Browsing the Web and Reading E-mail Safely as an Administrator" (http://msdn.microsoft.com/security/securecode/columns/default.aspx?pull=/library/en-us/dncode/html/secure11152004.asp).

Howard reasons that most of our exposure to scary stuff occurs when we're connected to the Internet, such as when we're using Microsoft Internet Explorer (IE) to surf the Web or using Microsoft Outlook to read our email. His answer? Don't spend the bulk of your day using reduced privileges and raising them only occasionally. Instead, spend most of your time as an administrator, but lower your privileges when you're running the few programs that expose you to security risks. Think of his solution as the "anti-RunAs" gambit.

Simple as That
What's wrong with RunAs? Can't you use RunAs to start up IE or Outlook under any account for which you have a password? Yes, you can, but it's cumbersome to do so. By contrast, Howard's tool—called DropMyRights—is a super-simple command-line tool, as you can see:

dropmyrights <program path> n|c|u

(The aforementioned article contains a link for downloading DropMyRights. The Windows Installer—MSI—file delivers the program to the \My Documents\MSDN\DropMyRights folder.)

Typically, when you start up a program, it inherits your identification and privileges. When you start up Microsoft Word, for example, it "photocopies your driver's license," so to speak. Therefore, whenever you instruct Word to retrieve a file, and NTFS asks Word, "Who are you and why should I give this to you?"—Word is essentially you. DropMyRights starts up an application in your name, as usual, but it filters out some of your permissions according to whether you specify n, c, or u after the program's path, where n specifies a normal user (i.e., the application inherits your full powers and DropMyRights doesn't do anything), c specifies a constrained user, and u specifies an untrusted user.

What can c and u users do? If DropMyRights restricts your account to either c or u, you lose every right except Bypass Traverse Checking (essential in a Microsoft environment using IE), and your account loses membership in the local Administrators group. DropMyRights further restricts u users by yanking them from Domain Users and the local Authenticated Users group.

For example, to start up IE so that it has no more power than an untrusted user, you would type

dropmyrights "C:\program files  internet explorer\iexplore.exe" u

IE would then start up in the guise of an untrusted user. Clearly, you wouldn't want to have to type that line every time you need to surf the Web. Instead, simply create a s rget field.

Denied!
DropMyRights doesn't give you complete control over your security context, but it has the virtue of simplicity. Give it a try. You'll smile the first time you accidentally click on something evil—only to receive an Access Denied message

End of Article



Reader Comments
This is a great idea!!! But..... The only program I could get this to work with was IE and, at that, I had no more Favorites. I generally use Firefox for my browser, and for that and Outlook, a window briefly flashed on the screen but no program. Running WXP Pro SP2.

suttonjw July 05, 2005 (Article Rating: )


Great idea would be much better if it actually worked. All it does is generate this error
createprocessasuser failed (2).

tbarnett007 July 23, 2005 (Article Rating: )


I use it with Outlook 2003, IE 6 and Outlook Express - It works great !!

Wirk July 31, 2005 (Article Rating: )


The previous posts are obviously from retards. This works GREAT and I've used it many times with XP. No problems whatsoever!!!

fredsucks March 02, 2007 (Article Rating: )


neat... but cut out internet security risks outright by NOT-using ie and instead using firefox or seamonkey ;) Cut out the risk of malware in an admin context with IE with IE7pro and/or proxomitron

bullshit4 August 16, 2007 (Article Rating: )


You must log on before posting a comment.

If you don't have a username & password, please register now.




Interact! Managing Least Privilege

Top Viewed ArticlesView all articles
The Memory-Optimization Hoax

Don't believe the hype. At best, RAM optimizers have no effect. At worst, they seriously degrade performance. ...

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 24, 2008

An often irreverent look at some of the week's other news, including a Vista Capable dismissal request, Zune price reductions, Morrow musings, Novell and Microsoft sitting in a tree ... two years later, Yahoo!, IE 6 on Windows Mobile, and so much more ...


Security Whitepapers The Impact of Messaging and Web Threats

Why SaaS is the Right Solution for Log Management

Protecting (You and) Your Data with Exchange Server 2007

Related Events Top 10 Email Security Challenges and Solutions

Securely Extend SharePoint to the Extranet

Introduction to Identity Lifecycle Manager "2"

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 Become a VIP member of the Windows IT Pro community!
Get it all with the VIP CD and VIP access. A $500+ value for only $279!

Subscribe to Windows IT Pro!
Solve your toughest technical problems with our experts and access 10,000 + articles online. 30% off

Monthly Online Pass - Only $5.95!
Get instant access to 10,000+ articles from Windows IT Pro Magazine!

TechNet Virtual Labs
Evaluate and test Microsoft's newest products.


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 Windows Dev Pro IT Job Hound ITTV
IT Library Technology Resource Directory Connected Home Windows Excavator Windows SuperSite 
 
 Windows IT Pro is a Division of Penton Media Inc.
 Copyright © 2008 Penton Media, Inc., All rights reserved. Terms and Use | Privacy Statement | Reprints and Licensing