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. ...

How can I uninstall the Microsoft Java Virtual Machine (JVM) from Windows XP?

...

What service packs and fixes are available?

...


Security Whitepapers Anti-Virus Is Dead: The Advent of the Graylist Approach to Computer Protection

Getting the Job Done: Comparing Approaches for Desktop Software Lockdown

Instant Messaging, VoIP, P2P, and games in the workplace: How to take back control

Related Events 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.


ADS BY GOOGLE SPONSORED LINKS FEATURED LINKS

Critical Challenges of ESI & Email Retention
Are you storing too much electronic information? Get expert legal advice and better understanding of what you are required to do as an IT professional.

Become a fan of Windows IT Pro on Facebook!
Join us on Facebook and be a fan of Windows IT Pro!

Sustainable Compliance: Are You Having a Resource Crisis?
Read this white paper to examine trends in compliance and security management and review approaches to reducing the cost and operational burden of compliance.

Rev Up Your IT Know-How with Our Recharged Magazine!
The improved Windows IT Pro provides trusted IT content with an enhanced new look and functionality! Get comprehensive coverage of industry topics, expert advice, and real-world solutions—PLUS access to over 10,000 articles online. Order today!

Get It All with Windows IT Pro VIP
Stock your IT toolbox with every solution ever printed in Windows IT Pro and SQL Server Magazine plus bonus Web-exclusive content on hot topics. Subscribe to receive the VIP CD and a subscription to your choice of Windows IT Pro or SQL Server Magazine!



Order Your Fundamentals CD Today!
Gain an introduction to Exchange, learn server security requirements, and understand how unified communications can play a role in your messaging strategies with this free Exchange CD.
Windows IT Pro Home Register About Us Affiliates / Licensing Media Kit Contact Us/Customer Service  
SQL Connected Home IT Library SuperSite FAQ Wininfo News
Europe Edition Office & SharePoint Pro Windows Dev Pro Windows Excavator 
 
 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