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 


June 2007

Icacls Shows Integrity

See how Icacls handles Vista's new trustworthiness levels
RSS
Subscribe to Windows IT Pro | See More Permissions Articles Here | Reprints | Or get the Monthly Online Pass—only $5.95 a month!

Last month, in "Icacls: The New and Improved Cacls?" (InstantDoc ID 95346), I introduced you to Icacls, Windows Vista's eventual replacement of Cacls, the command-line tool that lets you set NTFS file and folder permissions. This month, I drill down into one of Icacls's new capabilities—setting integrity levels for files and folders.

Integrity Levels
Vista has introduced the notion of integrity levels, which is a completely new concept for Windows. An integrity level is a label that the OS applies to objects (e.g., files, folders, registry keys), user sessions, and running processes. Think of this label as a mark that indicates the trustworthiness of that object, user, or process. This trustworthiness becomes useful through another new concept: integrity policy. The default integrity policy for Vista is known as no write up—a shorthand way of saying that processes of lower integrity can't modify objects of higher integrity, no matter what NTFS permissions the processes have on the objects.

How about an example? Suppose you're running the command prompt at a medium integrity level. (I'll define all the integrity levels shortly.) You want to examine a text file named test.txt, which has a high integrity level, by typing

type test.txt 

Suppose you also have an NTFS permission of Full Control on test.txt. You would find that using the Type command to merely read test.txt works just fine. However, if you try to delete the file by typing

erase text.txt 

you'll get an Access Denied error, despite your Full Control permission. It's called a no write up policy because although lower-integrity-level processes can read higher-integrity files just fine, any attempts at writing make the integrity mechanism kick in. And as you've surmised by now, integrity levels take precedence over standard NTFS permissions. Again, the no write up policy is Vista's default behavior, but you can also create no read up and no execute up policies. (I'll leave discussions of those for another day.)

Vista defines five levels of integrity: untrusted, low, medium, high, and system. Microsoft Internet Explorer (IE) in Protected Mode—an IE 7.0 feature only in Vista—caches items as low integrity; Vista sets non-administrative users and most objects on the computer to medium integrity; administrative user accounts run as high integrity; and items that the OS itself owns operate at system integrity. Vista assigns the untrusted level to objects created by people who have the Anonymous Logon group associated with their tokens. However, I've never actually seen the untrusted level in Vista, except when I explicitly create untrusted objects.

Try It Out
To see integrity levels at work, you'll need an administrative account with the new-to-Vista user privilege Modify an object label. Give yourself that privilege in your local Group Policy Editor, reboot, and you'll be ready to play around with integrity levels. (By default, only the System account has this privilege, but any member of the Administrators group can grant it.)

Open an elevated command prompt (in Vista, elevated means to right-click the Command Prompt icon and choose Run as administrator), and create a folder to work in:

md C:\stuff 

Press Enter, then make the \stuff directory your current directory by typing

cd C:\stuff 

Press Enter. Now, create a file named test.txt by typing

echo We're testing integrity levels>test.txt 

Press Enter. Finally, set the file test.txt to high integrity:

icacls test.txt /setintegritylevel h 

Icacls will respond that it has processed the file successfully. Next, open an unelevated command prompt and type

erase c:\stuff\test.txt 

You'll get an Access Denied response, despite the fact that your NTFS permissions are quite sufficient to delete the file. Interesting, huh? As it turns out, Microsoft originally had big plans for integrity levels, but the company backed off from using them in the final days of Vista's creation. To get the most out of integrity levels, though, you'll need a different tool—which I'll introduce you to next month.

End of Article



Reader Comments

You must log on before posting a comment.

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




Top Viewed ArticlesView all articles
No Jobs, No Excitement at Apple's Last Macworld Keynote

Apple CEO Steve Jobs made the right move in skipping out on his company's last appearance at Macworld: In a Tuesday keynote address at the conference, Apple had no interesting new products to sell, opting instead to spend mind-numbing amounts of time on ...

Where is Microsoft NetMeeting in Windows XP?

...

Command Prompt Tricks

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


Windows OSs Whitepapers Why SaaS is the Right Solution for Log Management

Related Events Virtualization Forum: Optimizing Storage, Networks, Desktops, and Security

Cloud Computing Forum: Integrating Software, Server and Storage as a Service into Your Enterprise IT Delivery Model

Virtualization Forum: Optimizing Storage, Networks, Desktops, and Security

Check out our list of Free Email Newsletters!

Windows OSs eBooks Understanding and Leveraging Code Signing Technologies

A Guide to Windows Certification and Public Keys

SQL Server Administration for Oracle DBAs

Related Windows OSs 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 © 2009 Penton Media, Inc., All rights reserved. Terms and Use | Privacy Statement | Reprints and Licensing