Microsoft build in a system called Windows Integrity Controls into Windows Vista which is basically a label for files that identifies their trustworthiness. What makes that interesting is the fact that the controls override the visible permissions of a file or folder.
Note: Chml was designed initially for Windows Vista, the operating system that Microsoft added the controls to. It works for the most part on new versions of Windows as well.
Six levels of trust can be assigned to files of the same or a lower permission level. Meaning that a normal user cannot change the integrity level of a file that he has no permissions for.
The six integrity levels are Trusted Installer, System (operating system processes), High (administrators), Medium, (non-administrators), Low (temporary Internet files) and Untrusted.
As you can see, even an administrator can't change the integrity level of files and folders that belong to Trusted Installers or System, at least not easily.
A command line tool is available that makes it quite easy to change the integrity level of files and folders. It is called CHML and available at a website that explains the process in detail.
The command "chml filename" displays the integrity level of that file. Modifying files and folders is only possible if changes are made in the Group Policy Editor:
The basic command to change the integrity level of files or folders in Windows Vista is chml -i:u, l, m, h, or s. Only one letter is obviously needed as they stand for Untrusted, Low, Medium, High, or System.
Three additional options are available. The -nr, -nw and -nx options deny read, write and execute rights.
I did find the reference to Windows Integrity Levels at the Donation Coder forum where Skrommel was kind enough to create an Autohotkey Script that would add the functionality to the right-click menu.
There are no comments on this post yet, be the first one to share your thoughts!
Please click on the following link to open the newsletter signup page: Ghacks Newsletter Sign up
Ghacks is a technology news blog that was founded in 2005 by Martin Brinkmann. It has since then become one of the most popular tech news sites on the Internet with five authors and regular contributions from freelance writers.
Leave a Reply