<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-6545079344377061068</id><updated>2011-11-28T00:38:39.340+01:00</updated><category term='Azure SDK'/><category term='CreateRestrictedToken'/><category term='Vista'/><category term='developing without administrative privileges'/><category term='UAC'/><category term='Least Privilege'/><category term='regedit'/><category term='Applying the principle of Least Privilege to Systems Administrators'/><category term='Restricted'/><category term='Token'/><category term='SID'/><category term='SQL Server'/><category term='privilege manager'/><category term='security bulletin august'/><category term='Security'/><category term='RSA'/><category term='Windows 7'/><title type='text'>Least Privilege</title><subtitle type='html'>Thoughts about Least Privilege &amp;amp; Windows</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://leastprivilege.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6545079344377061068/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://leastprivilege.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Marco Peretti</name><uri>http://www.blogger.com/profile/14697132326094396006</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>13</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-6545079344377061068.post-7328475586099611482</id><published>2008-11-13T10:51:00.002+01:00</published><updated>2008-11-13T11:00:59.623+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Azure SDK'/><category scheme='http://www.blogger.com/atom/ns#' term='SQL Server'/><title type='text'>Creating the Azure SDK sample database on SQL Server</title><content type='html'>The default installation of the &lt;a href="http://www.microsoft.com/azure/sdk.mspx"&gt;Microsoft Azure SDK&lt;/a&gt; comes with a few samples that require SQL Server Express 2005 or 2008. If you have SQL Server installed you need to edit a file named &lt;strong&gt;Microsoft.Samples.ServiceHosting.targets&lt;/strong&gt; and add /server:localhost to tell &lt;strong&gt;DevTableGen.exe&lt;/strong&gt; to use the default SQL Server instance rather than localhost\SQLExpress.&lt;br /&gt;&lt;br /&gt;The Microsoft.Samples.ServiceHosting.targets file is located in the C:\Program Files\Windows Azure SDK\v1.0\samples\MSBuild folder. I edited the file, searched for /database and added /server:localhosts and I was then able to create the sample database with RunDevStore.cmd batch file.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6545079344377061068-7328475586099611482?l=leastprivilege.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://leastprivilege.blogspot.com/feeds/7328475586099611482/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6545079344377061068&amp;postID=7328475586099611482' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6545079344377061068/posts/default/7328475586099611482'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6545079344377061068/posts/default/7328475586099611482'/><link rel='alternate' type='text/html' href='http://leastprivilege.blogspot.com/2008/11/creating-azure-sdk-sample-database-on.html' title='Creating the Azure SDK sample database on SQL Server'/><author><name>Marco Peretti</name><uri>http://www.blogger.com/profile/14697132326094396006</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6545079344377061068.post-5528093807575469101</id><published>2008-11-05T16:21:00.012+01:00</published><updated>2008-11-07T18:21:33.607+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Windows 7'/><category scheme='http://www.blogger.com/atom/ns#' term='UAC'/><title type='text'>Windows 7 UAC: prompt for consent for non-Windows binaries</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_W0xoSnsZS4Y/SRR5ALz5n0I/AAAAAAAAAOk/ZyfwtGPzmVk/s1600-h/uac7.1.jpg"&gt;&lt;img style="float:right; margin:0 0 10px 10px;cursor:pointer; cursor:hand;width: 270px; height: 320px;" src="http://4.bp.blogspot.com/_W0xoSnsZS4Y/SRR5ALz5n0I/AAAAAAAAAOk/ZyfwtGPzmVk/s320/uac7.1.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5265966908380389186" /&gt;&lt;/a&gt;&lt;br /&gt;Windows 7 brings a few changes to User Account Control (UAC).&lt;br /&gt;&lt;br /&gt;Build 6801 shows three new options for the “Behavior of the elevation prompt for administrators in Admin Approval Mode” policy. The options are “prompt for credentials on the secure desktop”, “prompt for consent on the secure desktop” and “prompt for consent for non-Windows binaries”. Of the three, the latter looked interesting and so I decided to test its behavior with three Microsoft executables with different file manifest.&lt;br /&gt;&lt;br /&gt;As expected, this option turns out to be useful when logged in as an administrator (in admin approval mode) for applications that have the highestAvailable and asAdministrator requested execution level in their file manifest. These applications, such as mmc.exe and SystemsPropertiesperformance.exe for example, are silently elevated.&lt;br /&gt;&lt;br /&gt;On the other hand, applications with a requested execution level of asinvoker such as Process Explorer v11.21, are not elevated by default. This, for an application like Process Explorer, may seem strange at first but, asInvoker, is indeed correct as the application can operate even as a standard user – although most interesting features do require administrative privileges. To execute with administrative privileges you would have to right-click on the executable and select “Run as administrator” from the context menu.&lt;br /&gt;&lt;br /&gt;While this option is only valid for applications digitally signed by Microsoft it could help reduce a few of the popups that systems administrators have to deal with.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6545079344377061068-5528093807575469101?l=leastprivilege.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://leastprivilege.blogspot.com/feeds/5528093807575469101/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6545079344377061068&amp;postID=5528093807575469101' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6545079344377061068/posts/default/5528093807575469101'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6545079344377061068/posts/default/5528093807575469101'/><link rel='alternate' type='text/html' href='http://leastprivilege.blogspot.com/2008/11/windows-7-uac-prompt-for-consent-for.html' title='Windows 7 UAC: prompt for consent for non-Windows binaries'/><author><name>Marco Peretti</name><uri>http://www.blogger.com/profile/14697132326094396006</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_W0xoSnsZS4Y/SRR5ALz5n0I/AAAAAAAAAOk/ZyfwtGPzmVk/s72-c/uac7.1.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6545079344377061068.post-7115465759283545675</id><published>2008-10-31T15:00:00.016+01:00</published><updated>2008-11-01T18:33:12.592+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Security'/><category scheme='http://www.blogger.com/atom/ns#' term='Token'/><category scheme='http://www.blogger.com/atom/ns#' term='SID'/><category scheme='http://www.blogger.com/atom/ns#' term='Restricted'/><category scheme='http://www.blogger.com/atom/ns#' term='CreateRestrictedToken'/><title type='text'>SE_GROUP_USE_FOR_DENY_ONLY Vs Restricted SIDs</title><content type='html'>There seem to be some confusion between SIDs with the SE_GROUP_USE_FOR_DENY_ONLY attribute set, Restricted SIDs and when to use one or the other.&lt;br /&gt;&lt;br /&gt;The documentation is fairly clear about it … as long as one fully understands the relationship between &lt;a href="http://technet.microsoft.com/en-us/library/cc759267.aspx"&gt;Access tokens and Access Control Lists (ACLs).  &lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Both deny-only SIDs and restricted SIDs are used when creating a &lt;a href="http://msdn.microsoft.com/en-us/library/aa379316(VS.85).aspx"&gt;Restricted Token&lt;/a&gt;. Such token is useful when you want to spawn a child process that has fewer privileges and groups than the original.&lt;br /&gt;&lt;br /&gt;To explain the difference between the two it is important to briefly review the basics of Access Control Entries (ACEs) and Access Control Lists (ACLs). An ACE determines the access level for a given SID and whether it allows or denies access. An ACL is a list of ACEs. For a given securable object, you will find a Discretionary ACL (DACL) that controls access to the resource and a System ACL (SACL) that control auditing.&lt;br /&gt;&lt;br /&gt;Unless one is explicitily granted a permission access is denied. The only exception is a NULL DACL where everyone is granted access. On the other hand, an empty DACL denies access.&lt;br /&gt;&lt;br /&gt;It seems hence intuitive to conclude that one only has to omit a given SID from a process token in order to deny access to a given resource. That will work most of the times, but not always. The reason is that access may still be granted depending on the groups the user is member of and the object DACL. The only 100% sure, and therefore secure, way is to explicitely deny access.&lt;br /&gt;&lt;br /&gt;Example: consider a folder where the system administrator has added to the DACL an access-denied entry for members of the group Marketing. If the Marketing group SID is not present in the process token then the process may still have access to the folder if any other ACE in the DACL allowed access to the token.&lt;br /&gt;&lt;br /&gt;When calling &lt;a href="http://msdn.microsoft.com/en-us/library/aa446583(VS.85).aspx"&gt;CreateRestrictedToken&lt;/a&gt; one should therefore specify in the SidToDisable list the SIDs that one wishes to deny access to secureble objects. A common example is stripping down an Administrative token by setting the Administrators group SID to SE_GROUP_USE_FOR_DENY_ONLY by including it in the SidsToDisable list.&lt;br /&gt;&lt;br /&gt;The Administrators group will be checked against access-denied ACEs in the DACL and access will be denied in case of a match.&lt;br /&gt;&lt;br /&gt;Restricted SIDs are a bit more complicated to grasp ... mainly because of their name. Restricted SIDs should be intended as the "list of of SIDs you wish your token to use to gain access to a securable object". &lt;br /&gt;&lt;br /&gt;The Access Check performed for a restricted token against an object consists hence of two phases. The 1st phase consists of checking the list of "regular" SIDS contained in the token against the DACL and, if access has not been denied, the restricted SIDs against the access-allowed SIDs of the DACL. The access granted will consists of the most restrictive of the two.&lt;br /&gt;&lt;br /&gt;Next: CreateRestrictedToken sample code&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6545079344377061068-7115465759283545675?l=leastprivilege.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://leastprivilege.blogspot.com/feeds/7115465759283545675/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6545079344377061068&amp;postID=7115465759283545675' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6545079344377061068/posts/default/7115465759283545675'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6545079344377061068/posts/default/7115465759283545675'/><link rel='alternate' type='text/html' href='http://leastprivilege.blogspot.com/2008/10/segroupusefordenyonly-vs-restricted.html' title='SE_GROUP_USE_FOR_DENY_ONLY Vs Restricted SIDs'/><author><name>Marco Peretti</name><uri>http://www.blogger.com/profile/14697132326094396006</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6545079344377061068.post-7037121494918314935</id><published>2007-09-10T11:03:00.000+01:00</published><updated>2007-09-10T13:56:04.710+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='developing without administrative privileges'/><title type='text'>Developing without Administrative Privileges</title><content type='html'>Contributed by Davide D'Aprile&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Introduction&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;In the present post we’ll investigate on what developing software without administrative privileges really means, keeping well in mind that the principle of least privilege doesn't say that no user can have permissions beyond those granted to a standard one, but rather that a user should have exactly the privileges needed to do the job. Developers are not an exception: they may need a few more permissions, but only a few.&lt;br /&gt;&lt;br /&gt;This last assertion is in opposition to a conventional wisdom, asserting that a developer should have administrative privileges, given that he performs a lot of critical activities, like debugging, interacting with IIS, writing into registry’s protected regions, and so on.&lt;br /&gt;&lt;br /&gt;However, this is the just one of the different reasons, implying that a developer has to work with a Least Privilege User Account (LUA), due to the potentially dangerous and malicious operations he could be a victim of by using an administrative account. &lt;a href="http://www.microsoft.com/technet/security/bulletin/ms07-sep.mspx"&gt;Visual Studio&lt;/a&gt; and its components are becoming a popular target for hackers and it is time that measures are taken to secure development workstations.&lt;br /&gt;&lt;br /&gt;In addition, the right practice of using a LUA account facilitates the development of so-called LUA Bug-free code. Remember that a &lt;a href="http://www.microsoft.com/technet/technetmag/issues/2006/08/LUABugs/"&gt;LUA Bug&lt;/a&gt; “occurs when an application—or a feature of an application—works correctly when run with elevated privileges but fails to work for a LUA user when there is no technical or business reason for requiring elevated privileges”.&lt;br /&gt;&lt;br /&gt;In the two following sections we’ll stress firstly which classes of privileges are needed to productively work in a LUA environment during some typical phases occurring in the software development process; finally, we’ll concentrate on the widely-used VISUAL STUDIO .NET.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;The Software Development Cycle in a LUA Environment&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;This section takes into account the software development process within the .NET environment, as discussed in &lt;a href="http://msdn2.microsoft.com/en-us/library/aa289173(VS.71).aspx"&gt;Developing Software in Visual Studio .NET with Non-Administrative Privileges&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Development and Debugging&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;Consider the two local groups that Visual Studio provides during the installation phase, to face at the potential problems could occur when developing without administrative permissions, i.e. Debugger Users and VS Developers, might not be really necessary. In fact, whereas the former is for web developers having to interact with Internet Information Server, the latter is useful only to debug server applications. Given the dangerous powers deriving from to belong to these privileged groups should be evaluated very carefully.&lt;br /&gt;The following table summarize the different scenarios to be managed during the Debugging phase, performed in a local machine.&lt;br /&gt;&lt;br /&gt;&lt;table border=1&gt;&lt;br /&gt;&lt;tbody&gt;&lt;br /&gt;&lt;tr&gt;&lt;br /&gt;&lt;td&gt;&lt;STRONG&gt;Account Type&lt;/STRONG&gt;&lt;/td&gt;&lt;br /&gt;&lt;td&gt;&lt;STRONG&gt;Application ownership&lt;/STRONG&gt;&lt;/td&gt;&lt;br /&gt;&lt;/tr&gt;&lt;br /&gt;&lt;tr&gt;&lt;br /&gt;&lt;td&gt;Normal User&lt;/td&gt;&lt;br /&gt;&lt;td&gt;Owned, within the same security context&lt;/td&gt;&lt;br /&gt;&lt;/tr&gt;&lt;br /&gt;&lt;tr&gt;&lt;br /&gt;&lt;td&gt;Normal User + SeDebugPrivilege (WIN) Administrator Group (.NET framework)&lt;/td&gt;&lt;br /&gt;&lt;td&gt;Other's, within the same security context&lt;/td&gt;&lt;br /&gt;&lt;/tr&gt;&lt;br /&gt;&lt;tr&gt;&lt;br /&gt;&lt;td&gt;Administrator Group&lt;/td&gt;&lt;br /&gt;&lt;td&gt;Owned or Other's, with different security context&lt;/td&gt;&lt;br /&gt;&lt;/tr&gt;&lt;br /&gt;&lt;tr&gt;&lt;br /&gt;&lt;td&gt;Debugger Users Group&lt;/td&gt;&lt;br /&gt;&lt;td&gt;Owned native or managed application&lt;/td&gt;&lt;br /&gt;&lt;/tr&gt;&lt;br /&gt;&lt;/tbody&gt;&lt;br /&gt;&lt;/table&gt;&lt;br /&gt;&lt;br /&gt;At BeyondTrust, for example, we do not debug locally if privileges beyond the ones of the basic user are required. Our build process copies files to a network share and then we debug remotely onto a test virtual machine. The virtual machine does not contain any data and would pose little problems if compromised.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Registering COM components&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;One of the most common complaints about developing under a LUA account is that one cannot register COM components. That is only partially true: the problem is not the COM registration process but rather how the various components are registered. COM components, with the exception of services can, and should be, registered under HKCU. The real issue are the default settings that, for example, Visual Studio uses when creating ATL/COM components which &lt;a href="http://blogs.msdn.com/jaredpar/archive/2005/05/17/418780.aspx"&gt;default to HKLM&lt;/a&gt;. By taking the time to edit the RGS files one can register and utilize COM components under a LUA account.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Developing LUA Bugs-free Software Products&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;In order to develop LUA Bugs-free software products, a developer should:&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;br /&gt;&lt;li&gt;use per-user registry keys whenever possible;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;e.g. write to HKEY_CURRENT_USER, rather than HKEY_CURRENT_USER;&lt;br /&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;use file system regions accessible to Standard Users;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;span style="font-size:85%;"&gt;e.g. write into My Documents folder;&lt;/span&gt;&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;li&gt;Using Program Files only to store static, read-only program and data files;&lt;br /&gt;&lt;li&gt;be prepared to deal with the Code Access security (CAS), a .NET Common Language Runtime feature that assign permissions to code, rather than relying on the security context of the user under which the code is running.&lt;/li&gt;&lt;ul&gt;&lt;br /&gt;&lt;li&gt;&lt;span style="font-size:85%;"&gt;Avoid developing applications that require Full Trust; on the contrary, Partially Trusted Application (PTA) with the lowest level of permissions should be considered.&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;li&gt;&lt;span style="font-size:85%;"&gt;The code calling the PTA has to acquire permission to access the protected resources the code uses.&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ul&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6545079344377061068-7037121494918314935?l=leastprivilege.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://leastprivilege.blogspot.com/feeds/7037121494918314935/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6545079344377061068&amp;postID=7037121494918314935' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6545079344377061068/posts/default/7037121494918314935'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6545079344377061068/posts/default/7037121494918314935'/><link rel='alternate' type='text/html' href='http://leastprivilege.blogspot.com/2007/09/developing-without-administrative.html' title='Developing without Administrative Privileges'/><author><name>Marco Peretti</name><uri>http://www.blogger.com/profile/14697132326094396006</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6545079344377061068.post-833461696681666941</id><published>2007-08-31T13:28:00.000+01:00</published><updated>2007-08-31T13:47:15.079+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='privilege manager'/><category scheme='http://www.blogger.com/atom/ns#' term='Least Privilege'/><title type='text'>Privilege Manager Tips: controlling access to securable resources</title><content type='html'>One my favorite things you can do with Privilege Manager is to restrict access to a securable object to a given application. &lt;br /&gt;&lt;br /&gt;In general, Access Control Lists ( ACL ) apply to users and/or groups, not applications. When you log on you are assigned a Token that contains, among other attributes, the list of groups you belong to. When you start a process ( that is, the instance of an application in memory ) a copy of the token gets associated with the process. When the process tries to access a securable resource the process-token is compared against the ACL of the object to determine what permission should be granted, if any.&lt;br /&gt;&lt;br /&gt;Privilege Manager allows you to extend the Windows Security model by adding a new dimension: applications. &lt;br /&gt;&lt;br /&gt;Let’s say that for example you want to restrict read/write access to a given folder to the members of the TopSecret group but only when running notepad.exe. Let’s call this folder c:\restricted. With Privilege Manager all you need to do is to create a rule for notepad.exe and add the TopSecret group to the Permissions tab as shown below.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://1.bp.blogspot.com/_W0xoSnsZS4Y/RtgJ_n3AUoI/AAAAAAAAAAs/K_VnhwkbDyA/s1600-h/TopSecret.jpg"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;" src="http://1.bp.blogspot.com/_W0xoSnsZS4Y/RtgJ_n3AUoI/AAAAAAAAAAs/K_VnhwkbDyA/s320/TopSecret.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5104841166260556418" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;That’s all! Now only authorized users running notepad will be allowed to read/write to the c:\restricted folder. This is because Privilege Manager replaces the default token with the one containing the Permissions and Privileges you have set. In our case, only the TopSecret group.&lt;br /&gt;&lt;br /&gt;This principle can also be used, for example, with I/O Device control solution like SecureWave’s Sanctuary Device Control to allow an authorized user to utilize an I/O device, but only when running a given application(s). This is because Sanctuary uses ACLs to control access to I/O devices and trust me, I know how it works as I have founded the company and developed the first version of the product ;-)&lt;br /&gt;&lt;br /&gt;NOTE: this rule can only be applied to local securable resources. This is because when you access a remote resource you authenticate to the remote server via the domain controller and hence you end up with your default token.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6545079344377061068-833461696681666941?l=leastprivilege.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://leastprivilege.blogspot.com/feeds/833461696681666941/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6545079344377061068&amp;postID=833461696681666941' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6545079344377061068/posts/default/833461696681666941'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6545079344377061068/posts/default/833461696681666941'/><link rel='alternate' type='text/html' href='http://leastprivilege.blogspot.com/2007/08/privilege-manager-tips-controlling.html' title='Privilege Manager Tips: controlling access to securable resources'/><author><name>Marco Peretti</name><uri>http://www.blogger.com/profile/14697132326094396006</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_W0xoSnsZS4Y/RtgJ_n3AUoI/AAAAAAAAAAs/K_VnhwkbDyA/s72-c/TopSecret.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6545079344377061068.post-7504184343620834821</id><published>2007-08-31T12:32:00.000+01:00</published><updated>2007-08-31T13:48:04.686+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Applying the principle of Least Privilege to Systems Administrators'/><title type='text'>Applying the principle of Least Privilege to Systems Administrators</title><content type='html'>&lt;strong&gt;Introduction&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;Given the complexity and variety of tasks that Systems Administrators carry out they are often the last one to adopt the principle of Least Privilege. Most other users execute only a handful of applications and have little or no need for administrative privileges on their computer.&lt;br /&gt;&lt;br /&gt;Because of the information and assets that Systems Administrators have access to however they are a very valuable pray for malware authors and steps should be taken to improve the security of their working environment. However, not all users that have been granted administrative privileges to accomplish administrative tasks are alike.&lt;br /&gt;&lt;br /&gt;Categories of Systems Administrators&lt;br /&gt;&lt;br /&gt;To better illustrate the point we will categorize Systems Administrators as follows:&lt;br /&gt;&lt;br /&gt;Basic System Administrator ( BSA )&lt;br /&gt;Server System Administrators ( SSA )&lt;br /&gt;Domain System Administrator ( DSA )&lt;br /&gt;&lt;br /&gt;A BSA will typically have been granted privileges because:&lt;br /&gt;&lt;br /&gt;Needs to start/stop a given service&lt;br /&gt;Needs access to IIS&lt;br /&gt;Needs to check logs, etc.&lt;br /&gt;&lt;br /&gt;SSA:&lt;br /&gt;&lt;br /&gt;Needs to manage a database instance on a given server&lt;br /&gt;Needs the ability to log in locally onto a server for basic maintenance&lt;br /&gt;Install applications, printers, etc.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;DSA:&lt;br /&gt;&lt;br /&gt;Needs the ability to create domain user/machine accounts&lt;br /&gt;Needs to manage users’ mailboxes&lt;br /&gt;Needs to manage global users’ policies&lt;br /&gt;&lt;br /&gt;In general, BSA is granted, for example, to a developer or an external consultant that needs such privileges, often on a single computer, to accomplish a specific activity. SSA is the more common case where one needs to Administer a given machine while DSA is one that has access to Domain Controllers, Exchange servers etc.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Guidelines&lt;br /&gt;&lt;/strong&gt;&lt;br /&gt;1) Internet facing applications such as Web Browsers, Email clients, Instant Messaging, etc. should never, never be executed with Administrative Privileges as they represent the preferred vector of infection.&lt;br /&gt;&lt;br /&gt;2) Users who have been made BSA should be removed from the Administrative group and granted just the necessary privileges to accomplish the task. Quite often Administrative Privileges are granted for laziness and/or simplicity because the person charged to grant them does not have the bandwidth to research how to accomplish the given task w/o granting full Administrative Privileges.&lt;br /&gt;&lt;br /&gt;3) Users who have been made DSA should use two accounts: their day to day account on their desktop and log onto a remote desktop when they need to operate at the domain level. The remote desktop should be setup so that only the required applications can be executed.&lt;br /&gt;&lt;br /&gt;The rationale for the above guidelines is simple: once malware can execute in the context of the logged on user it can access all the information he/she has access to. The greater the user privileges are the greater the potential damage.&lt;br /&gt;&lt;br /&gt;The optimal solution would be to have all Systems Administrators running as basic users and elevate their privileges when required. This is the approach chosen by Vista UAC and our own Privilege Manager.&lt;br /&gt;&lt;br /&gt;With Privilege Manager you can also select exactly which privilege, if any, you want the user to have when launching a given application ( the privileges are assigned to the process ).&lt;br /&gt;&lt;br /&gt;You can also assign given privileges to a user and/or group via the Local Security Settings editor ( secpol.msc ) -- just beware that the privileges will be accessible by all applications started by the user, hence malware included.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Privileges&lt;br /&gt;&lt;/strong&gt;&lt;br /&gt;Useful privileges include:&lt;br /&gt;&lt;p&gt;&lt;/p&gt;&lt;ul&gt;&lt;li&gt;Add log on locally&lt;/li&gt;&lt;li&gt;Allow log on through Terminal Services&lt;/li&gt;&lt;li&gt;Back up / Restore files and directories&lt;/li&gt;&lt;li&gt;Change the System time&lt;/li&gt;&lt;li&gt;Create global objects&lt;/li&gt;&lt;li&gt;Create permanent Shared Objects&lt;/li&gt;&lt;li&gt;Debug programs&lt;/li&gt;&lt;li&gt;Force shutdown of a remote system&lt;/li&gt;&lt;li&gt;Increase scheduling priority&lt;/li&gt;&lt;li&gt;Load and Unload decide drivers&lt;/li&gt;&lt;li&gt;Manage auditing and Security log&lt;/li&gt;&lt;li&gt;Perform volume maintenance tasks&lt;/li&gt;&lt;li&gt;Take ownership&lt;/li&gt;&lt;li&gt;Etc.&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;See the following &lt;a href="http://technet.microsoft.com/en-us/library/bb457125.aspx"&gt;Microsoft TechNet article&lt;/a&gt; for a description of each privilege.&lt;br /&gt;&lt;br /&gt;Many common administrative tasks are carried out from Control panel Applets and/or Microsoft SnapIns.&lt;br /&gt;&lt;br /&gt;Control Panel Applets and Microsoft Management Console ( MMC ) &lt;br /&gt;&lt;br /&gt;&lt;strong&gt;SnapIns&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;Here is a list that we have compiled for Vista for our own Privilege Manager.&lt;br /&gt;&lt;br /&gt;· &lt;strong&gt;Add Hardware&lt;/strong&gt;&lt;br /&gt;path="%"%SystemRoot%\system32\hdwwiz.exe"&lt;br /&gt;&lt;br /&gt;· &lt;strong&gt;Back up files&lt;/strong&gt;&lt;br /&gt;path="%%SystemRoot%\system32\sdclt.exe"&lt;br /&gt;&lt;br /&gt;· &lt;strong&gt;Back up computer&lt;/strong&gt;&lt;br /&gt;path="%%SystemRoot%\system32\sdclt.exe&lt;br /&gt;&lt;br /&gt;· &lt;strong&gt;Date and Time (Control Panel)&lt;/strong&gt;&lt;br /&gt;path="%%SystemRoot%\system32\rundll32.exe”&lt;br /&gt;args="%SystemRoot%\system32\shell32.dll,Control_RunDLL %SystemRoot%\system32\timedate.cpl,Date and Time”&lt;br /&gt;&lt;br /&gt;· &lt;strong&gt;Date and Time (Control Panel: Set the Date and Time)&lt;/strong&gt;&lt;br /&gt;path="%%SystemRoot%\system32\rundll32.exe” args="Shell32.dll,Control_RunDLL timedate.cpl”&lt;br /&gt;&lt;br /&gt;· &lt;strong&gt;Date and Time (Taskbar)&lt;/strong&gt;&lt;br /&gt;path="%%SystemRoot%\system32\rundll32.exe” args="Shell32.dll,Control_RunDLL %SystemRoot%\System32\timedate.cpl”&lt;br /&gt;&lt;br /&gt;· &lt;strong&gt;Defrag&lt;/strong&gt;&lt;br /&gt;path="%%SystemRoot%\system32\dfrgui.exe”&lt;br /&gt;&lt;br /&gt;· &lt;strong&gt;Device Manager&lt;/strong&gt;&lt;br /&gt;path="%%SystemRoot%\system32\mmc.exe”&lt;br /&gt;args="%SystemRoot%\system32\devmgmt.msc”&lt;br /&gt;&lt;br /&gt;· &lt;strong&gt;Disk Management&lt;/strong&gt;&lt;br /&gt;path="%%SystemRoot%\system32\mmc.exe”&lt;br /&gt;args="%SystemRoot%\system32\diskmgmt.msc”&lt;br /&gt;&lt;br /&gt;· &lt;strong&gt;Font Size and DPI&lt;/strong&gt;&lt;br /&gt;path="%%SystemRoot%\system32\DpiScaling.exe”&lt;br /&gt;&lt;br /&gt;· &lt;strong&gt;Indexing Options: File Types&lt;/strong&gt;&lt;br /&gt;path="%%SystemRoot%\system32\rundll32.exe”&lt;br /&gt;args="%SystemRoot%\system32\shell32.dll,Control_RunDLL %SystemRoot%\system32\srchadmin.dll,Indexing Options”&lt;br /&gt;&lt;br /&gt;· &lt;strong&gt;Indexing Options: File Types (Change How Windows Searches)&lt;/strong&gt;&lt;br /&gt;path="%%SystemRoot%\system32\rundll32.exe”&lt;br /&gt;args="Shell32.dll,Control_RunDLL srchadmin.dll,,2"&lt;br /&gt;&lt;br /&gt;· &lt;strong&gt;iSCSI Initiator&lt;/strong&gt;&lt;br /&gt;path="%SystemRoot%\system32\iscsicpl.exe"&lt;br /&gt;&lt;br /&gt;· &lt;strong&gt;Offline Files&lt;br /&gt;&lt;/strong&gt;path="%SystemRoot%\system32\rundll32.exe" args="%SystemRoot%\system32\shell32.dll,Control_RunDLL %SystemRoot%\system32\cscui.dll,Offline Files"&lt;br /&gt;&lt;br /&gt;· &lt;strong&gt;Programs and Features - Windows features&lt;/strong&gt;&lt;br /&gt;path="%SystemRoot%\system32\OptionalFeatures.exe"&lt;br /&gt;&lt;br /&gt;· &lt;strong&gt;Regional and Language Options – Administrative&lt;/strong&gt;&lt;br /&gt;path="%SystemRoot%\system32\rundll32.exe" args="%SystemRoot%\system32\shell32.dll,Control_RunDLL %SystemRoot%\system32\intl.cpl,Regional and Language Options"&lt;br /&gt;&lt;br /&gt;· &lt;strong&gt;Restore files&lt;/strong&gt;&lt;br /&gt;path="%SystemRoot%\system32\sdclt.exe"&lt;br /&gt;args="/restorewizard"&lt;br /&gt;&lt;br /&gt;· &lt;strong&gt;System Properties - Advanced System Properties&lt;/strong&gt; &lt;br /&gt;path="%SystemRoot%\system32\SystemPropertiesAdvanced.exe"&lt;br /&gt;&lt;br /&gt;· &lt;strong&gt;System Properties - Computer Name&lt;/strong&gt;&lt;br /&gt;path="%SystemRoot%\system32\SystemPropertiesComputerName.exe"&lt;br /&gt;&lt;br /&gt;· &lt;strong&gt;System Properties – Performance&lt;/strong&gt;&lt;br /&gt;path="%SystemRoot%\system32\SystemPropertiesPerformance.exe"&lt;br /&gt;&lt;br /&gt;· &lt;strong&gt;System Properties - Remote Access&lt;/strong&gt;&lt;br /&gt;path="%SystemRoot%\system32\SystemPropertiesRemote.exe"&lt;br /&gt;&lt;br /&gt;· &lt;strong&gt;System Properties - System Protection&lt;/strong&gt;&lt;br /&gt;path="%SystemRoot%\system32\SystemPropertiesProtection.exe"&lt;br /&gt;&lt;br /&gt;· &lt;strong&gt;Windows Firewall&lt;br /&gt;&lt;/strong&gt;path="%SystemRoot%\system32\rundll32.exe" args="firewall.cpl,ShowControlPanel"&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;If what your BSA or SSA needs to accomplish falls under one of the above you should hence consider upgrading to Windows Vista/UAC, using our own Privilege Manager or some of the alternatives described in the &lt;a href="http://technet.microsoft.com/en-us/library/bb456992.aspx"&gt;Applying the Principle of Least Privilege to User Accounts on Windows XP&lt;/a&gt; paper.&lt;br /&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6545079344377061068-7504184343620834821?l=leastprivilege.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://leastprivilege.blogspot.com/feeds/7504184343620834821/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6545079344377061068&amp;postID=7504184343620834821' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6545079344377061068/posts/default/7504184343620834821'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6545079344377061068/posts/default/7504184343620834821'/><link rel='alternate' type='text/html' href='http://leastprivilege.blogspot.com/2007/08/applying-principle-of-least-privilege.html' title='Applying the principle of Least Privilege to Systems Administrators'/><author><name>Marco Peretti</name><uri>http://www.blogger.com/profile/14697132326094396006</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6545079344377061068.post-5264876750672600387</id><published>2007-08-16T14:04:00.000+01:00</published><updated>2007-08-16T14:06:59.703+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='security bulletin august'/><title type='text'>Microsoft Security Bulletin Summary for August 2007 – running as basic user pays off big time!</title><content type='html'>Reviewing the Microsoft Security Bulletins for August shows that all 12 of them would be mitigated by users running without Administrative privileges.&lt;br /&gt;&lt;br /&gt;The full security bulletin can be found here: &lt;a href="http://www.microsoft.com/technet/security/bulletin/ms07-aug.mspx"&gt;http://www.microsoft.com/technet/security/bulletin/ms07-aug.mspx&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;You will see that they all allow remote code execution and the code will execute in the context of the logged on user. If logged on with Administrative privileges the code will be able to, for example, install and execute a kernel rootkit, a keylogger etc. while when logged on as a user it will be restricted to the data the user has access to as well as potentially spawning a user mode process.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6545079344377061068-5264876750672600387?l=leastprivilege.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://leastprivilege.blogspot.com/feeds/5264876750672600387/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6545079344377061068&amp;postID=5264876750672600387' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6545079344377061068/posts/default/5264876750672600387'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6545079344377061068/posts/default/5264876750672600387'/><link rel='alternate' type='text/html' href='http://leastprivilege.blogspot.com/2007/08/microsoft-security-bulletin-summary-for.html' title='Microsoft Security Bulletin Summary for August 2007 – running as basic user pays off big time!'/><author><name>Marco Peretti</name><uri>http://www.blogger.com/profile/14697132326094396006</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6545079344377061068.post-2084253460227059273</id><published>2007-01-18T09:56:00.000+01:00</published><updated>2007-01-18T10:10:40.031+01:00</updated><title type='text'>The forgotten Folder Option ...</title><content type='html'>In a previous blog &lt;a href="http://leastprivilege.blogspot.com/2007/01/uac-unc.html"&gt;entry&lt;/a&gt;, I have run into an interesting error message that lead me to believe I run into a bug, or at least a poorly written error message. It turned out that I made a mistake as I always set the "Launch folder window in a separate process" folder option as it allows me to run  explorer.exe elevated when I need it. As I was setting up a new Vista test box I forgot to check that check box and hence run my test without the required privileges.&lt;br /&gt;&lt;br /&gt;That said, the error message you get when you try to write to a protected folder depends on how you copy the files. If you start from a regular explorer.exe process ( no privs) and elevate when prompted you get the strange error message I reported earlier ( location unavailable ). When you try to copy the same files to the same location from an elevated explorer.exe then you get a message that you don't have the required permission to perform that action, which is the correct error message. I still hold that the first error message &lt;a href="http://leastprivilege.blogspot.com/2007/01/uac-unc.html"&gt;shown &lt;/a&gt;is not correct.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6545079344377061068-2084253460227059273?l=leastprivilege.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://leastprivilege.blogspot.com/feeds/2084253460227059273/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6545079344377061068&amp;postID=2084253460227059273' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6545079344377061068/posts/default/2084253460227059273'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6545079344377061068/posts/default/2084253460227059273'/><link rel='alternate' type='text/html' href='http://leastprivilege.blogspot.com/2007/01/forgotten-folder-option.html' title='The forgotten Folder Option ...'/><author><name>Marco Peretti</name><uri>http://www.blogger.com/profile/14697132326094396006</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6545079344377061068.post-6597631378679685055</id><published>2007-01-16T18:14:00.000+01:00</published><updated>2007-01-16T18:25:09.133+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='RSA'/><category scheme='http://www.blogger.com/atom/ns#' term='Least Privilege'/><title type='text'>RSA 2007 Peer to Peer sessions</title><content type='html'>I have been accepted as a Peer to Peer facilitator at RSA 2007. I'll moderate a discussion on how to implement the Least Privilege principle in a Windows environment. The session will take place on 02/07/2007 from 1:40 PM to 2:30 PM. The session code is P2P-205B.&lt;br /&gt;&lt;br /&gt;I'll report here on the session and hence, if you have any issue that you feel it should be discussed, or simply want to meet me then send me an email ( marco.peretti &lt;&gt; gmail.com ).&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6545079344377061068-6597631378679685055?l=leastprivilege.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://leastprivilege.blogspot.com/feeds/6597631378679685055/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6545079344377061068&amp;postID=6597631378679685055' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6545079344377061068/posts/default/6597631378679685055'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6545079344377061068/posts/default/6597631378679685055'/><link rel='alternate' type='text/html' href='http://leastprivilege.blogspot.com/2007/01/rsa-2007-peer-to-peer-sessions.html' title='RSA 2007 Peer to Peer sessions'/><author><name>Marco Peretti</name><uri>http://www.blogger.com/profile/14697132326094396006</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6545079344377061068.post-8110195008617362761</id><published>2007-01-16T17:09:00.000+01:00</published><updated>2007-01-17T08:31:12.359+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Least Privilege'/><category scheme='http://www.blogger.com/atom/ns#' term='Vista'/><category scheme='http://www.blogger.com/atom/ns#' term='UAC'/><title type='text'>UAC &amp; UNC</title><content type='html'>Have you ever tried to copy files from a network location to a protected one? I was setting up a new Vista box for remote debugging and needed to copy a few files from our test server to c:\windows\system32. The UAC reminded me that this operation required elevation only to fail right after with this error message:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;img id="BLOGGER_PHOTO_ID_5020662489946691506" style="DISPLAY: block; MARGIN: 0px auto 10px; CURSOR: hand; TEXT-ALIGN: center" alt="" src="http://4.bp.blogspot.com/_W0xoSnsZS4Y/Raz57xpml7I/AAAAAAAAAAM/62-bOVebCo8/s320/uacunc.jpg" border="0" /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;This is odd, because with Explorer.exe elevated I had access to the share, even the mapped drive, however, when I tried to copy the files to the protected location it still failed. I have checked with a kernel debugger and dllhost.exe, the program that carried out the elevated file copy, run in the same logon session as all my other applications. It turned out that the write operation was caused by the ACL on the target directory. Microsoft, to protect critical resources, has restricted write access to only the TrustedInstaller user, and denied write permissions to everybody else, including SYSTEM and Administrators as show here below.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;img id="BLOGGER_PHOTO_ID_5020675598186878914" style="DISPLAY: block; MARGIN: 0px auto 10px; CURSOR: hand; TEXT-ALIGN: center" alt="" src="http://1.bp.blogspot.com/_W0xoSnsZS4Y/Ra0F2xpml8I/AAAAAAAAAAU/J5RCHAzpUuc/s320/winsxs_perms.jpg" border="0" /&gt; &lt;/p&gt;&lt;p&gt;The error message I was shown was misleading to say the least. Yet another Vista/UAC bug?&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;You can find more information on the TrustedInstaller and Windows Resource Protection &lt;a href="http://blogs.msdn.com/cjacks/archive/2006/11/04/why-does-my-software-keep-prompting-me-for-a-reboot-on-windows-vista.aspx"&gt;here&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6545079344377061068-8110195008617362761?l=leastprivilege.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://leastprivilege.blogspot.com/feeds/8110195008617362761/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6545079344377061068&amp;postID=8110195008617362761' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6545079344377061068/posts/default/8110195008617362761'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6545079344377061068/posts/default/8110195008617362761'/><link rel='alternate' type='text/html' href='http://leastprivilege.blogspot.com/2007/01/uac-unc.html' title='UAC &amp; UNC'/><author><name>Marco Peretti</name><uri>http://www.blogger.com/profile/14697132326094396006</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_W0xoSnsZS4Y/Raz57xpml7I/AAAAAAAAAAM/62-bOVebCo8/s72-c/uacunc.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6545079344377061068.post-1284436448156754489</id><published>2007-01-12T15:40:00.000+01:00</published><updated>2007-01-12T15:44:49.059+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Least Privilege'/><category scheme='http://www.blogger.com/atom/ns#' term='UAC'/><title type='text'>More of the same ...</title><content type='html'>Microsoft yesterday has released a number of security bulletins (&lt;br /&gt;&lt;a href="http://www.microsoft.com/technet/security/Bulletin/MS07-002.mspx"&gt;http://www.microsoft.com/technet/security/Bulletin/MS07-002.mspx&lt;/a&gt; ) for a number of bugs that would allow remote code execution and are rated as critical.&lt;br /&gt;&lt;br /&gt;Most bugs affect Office 2000 and hackers could exploit these bugs simply having the user open a malformed document.&lt;br /&gt;&lt;br /&gt;In Microsoft words: "If a user is logged on with administrative user rights, an attacker who successfully exploited this vulnerability could take com plete control of an affected system. An attacker could then install programs; view, change, or delete data; or create new accounts with full user rights. Users whose accounts are configured to have fewer user rights on the system could be less affected than users who operate with administrative user rights."&lt;br /&gt;&lt;br /&gt;This is why it is important that an organizations runs all or most of its applications in a least privilege environment. Least privilege is a complimentary solution to the various security solutions on the market ( AV, anti-spyware, etc) as it allows to contain, and often neutralize, undetected and zero-day threats. &lt;br /&gt;&lt;br /&gt;The challenge for an organization is how to move to a Least Privilege environment. Windows provides, out of the box, only basic mechanisms such as Runas and User Account Control (UAC) which are more suitable to sys-admins and home users but cannot be used by an organization as they often, if not always, require the user to have an administrative account. Besides the obvious difficulty in managing an additional user name and password users often abuse such privileges to make&lt;br /&gt;un-authorized system changes and install un-authorized applications.&lt;br /&gt;&lt;br /&gt;There is clearly a need for a centrally managed solution that allow the organization sys-admin to define policies that elevate the privileges on a per application basis and don't require a second user account.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6545079344377061068-1284436448156754489?l=leastprivilege.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://leastprivilege.blogspot.com/feeds/1284436448156754489/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6545079344377061068&amp;postID=1284436448156754489' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6545079344377061068/posts/default/1284436448156754489'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6545079344377061068/posts/default/1284436448156754489'/><link rel='alternate' type='text/html' href='http://leastprivilege.blogspot.com/2007/01/more-of-same.html' title='More of the same ...'/><author><name>Marco Peretti</name><uri>http://www.blogger.com/profile/14697132326094396006</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6545079344377061068.post-2874895896848731183</id><published>2007-01-02T13:51:00.000+01:00</published><updated>2007-01-02T14:59:51.741+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='regedit'/><category scheme='http://www.blogger.com/atom/ns#' term='Vista'/><category scheme='http://www.blogger.com/atom/ns#' term='UAC'/><title type='text'>Regedit.exe and UAC</title><content type='html'>In my previous entry I have written about how it was not possible to have two instances of the same application running under different credentials. While driving home for lunch I remembered that I have actually run two instances of cmd.exe countless times, while today, I was testing with regedit.exe. It turns out that it appears that regedit.exe is actually the only application for which you cannot run more than an instance at the time -- UAC or not. &lt;br /&gt;&lt;br /&gt;This is by design, and probably due to link between regedit.exe and regedt32.exe. Try running regedt32.exe and look at Task Manager process' list and you will see regedit.exe. A long time ago there used to be two registry editors. Under XP, I think, there were brought together but kept the original file names for backward compatibility.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6545079344377061068-2874895896848731183?l=leastprivilege.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://leastprivilege.blogspot.com/feeds/2874895896848731183/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6545079344377061068&amp;postID=2874895896848731183' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6545079344377061068/posts/default/2874895896848731183'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6545079344377061068/posts/default/2874895896848731183'/><link rel='alternate' type='text/html' href='http://leastprivilege.blogspot.com/2007/01/regeditexe-and-uac.html' title='Regedit.exe and UAC'/><author><name>Marco Peretti</name><uri>http://www.blogger.com/profile/14697132326094396006</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6545079344377061068.post-7433280960114695613</id><published>2007-01-02T10:39:00.000+01:00</published><updated>2007-01-02T12:10:08.331+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Vista'/><category scheme='http://www.blogger.com/atom/ns#' term='UAC'/><title type='text'>Difference between a Standard User &amp; Protected Administrator tokens</title><content type='html'>If you are evaluating Windows Vista you may need to decide whether your users will be Standard Users or Protected Administrators. With UAC enabled, users will be shown the consent UI but the resulting token will differ. The token generated for a Protected Administrator depends on the "Behavior of the elevation prompt for administrators in Admin Approval Mode" policy. The default policy is set to "prompt for consent" and generates a full admin token. When set to "prompt for credentials" it generates again a full admin token, but for another user account -- pretty much like RunAs. Standard Users always get prompted for the credentials. The latter implies also, for example, different HKCU and so on.&lt;br /&gt;&lt;br /&gt;Before we begin, let me clarify that a Protected Administrator is nothing but a member of the Administrators group with UAC enabled. When a Protected Administrator logs in his original token gets saved (the linked token) and his original one replaced by one that looks like:&lt;br /&gt;&lt;br /&gt;TS Session ID: 0x1&lt;br /&gt;&lt;strong&gt;User: S-1-5-21-2196860067-979979976-148335941-1000&lt;/strong&gt;&lt;br /&gt;Groups: &lt;br /&gt; 00 S-1-5-21-2196860067-979979976-148335941-513&lt;br /&gt;    Attributes - Mandatory Default Enabled &lt;br /&gt; 01 S-1-1-0&lt;br /&gt;    Attributes - Mandatory Default Enabled &lt;br /&gt;&lt;strong&gt; 02 S-1-5-32-544&lt;br /&gt;    Attributes - DenyOnly &lt;/strong&gt;&lt;br /&gt; 03 S-1-5-32-545&lt;br /&gt;    Attributes - Mandatory Default Enabled &lt;br /&gt; 04 S-1-5-4&lt;br /&gt;    Attributes - Mandatory Default Enabled &lt;br /&gt; 05 S-1-5-11&lt;br /&gt;    Attributes - Mandatory Default Enabled &lt;br /&gt; 06 S-1-5-15&lt;br /&gt;    Attributes - Mandatory Default Enabled &lt;br /&gt; 07 S-1-5-5-0-833662&lt;br /&gt;    Attributes - Mandatory Default Enabled LogonId &lt;br /&gt; 08 S-1-2-0&lt;br /&gt;    Attributes - Mandatory Default Enabled &lt;br /&gt; 09 S-1-5-64-10&lt;br /&gt;    Attributes - Mandatory Default Enabled &lt;br /&gt; 10 S-1-16-8192&lt;br /&gt;    Attributes - GroupIntegrity GroupIntegrityEnabled&lt;br /&gt;Primary Group: S-1-5-21-2196860067-979979976-148335941-513&lt;br /&gt;&lt;br /&gt;Privs: &lt;br /&gt; 19 0x000000013 SeShutdownPrivilege               Attributes - &lt;br /&gt; 23 0x000000017 SeChangeNotifyPrivilege           Attributes - Enabled Default &lt;br /&gt; 25 0x000000019 SeUndockPrivilege                 Attributes - &lt;br /&gt; 33 0x000000021 SeIncreaseWorkingSetPrivilege     Attributes - &lt;br /&gt; 34 0x000000022 SeTimeZonePrivilege               Attributes - &lt;br /&gt;Authentication ID:         (0,cb8ba)&lt;br /&gt;Impersonation Level:       Anonymous&lt;br /&gt;TokenType:                 Primary&lt;br /&gt;Source: User32             TokenFlags: 0xa00 ( Token in use )&lt;br /&gt;Token ID: e864d            &lt;strong&gt;ParentToken ID: cb8bd&lt;/strong&gt;&lt;br /&gt;Modified ID:               (0, dfce2)&lt;br /&gt;RestrictedSidCount: 0      RestrictedSids: 00000000&lt;br /&gt;OriginatingLogonSession:   3e7&lt;br /&gt;&lt;br /&gt;ParentToken ID points to the linked token.&lt;br /&gt;&lt;br /&gt;Which gets changed to a full admin token:&lt;br /&gt;&lt;br /&gt;TS Session ID: 0x1&lt;br /&gt;&lt;strong&gt;User: S-1-5-21-2196860067-979979976-148335941-1000&lt;/strong&gt;&lt;br /&gt;Groups: &lt;br /&gt; 00 S-1-5-21-2196860067-979979976-148335941-513&lt;br /&gt;    Attributes - Mandatory Default Enabled &lt;br /&gt; 01 S-1-1-0&lt;br /&gt;    Attributes - Mandatory Default Enabled &lt;br /&gt; 02 S-1-5-32-544&lt;br /&gt;    Attributes - Mandatory Default Enabled Owner &lt;br /&gt; 03 S-1-5-32-545&lt;br /&gt;    Attributes - Mandatory Default Enabled &lt;br /&gt; 04 S-1-5-4&lt;br /&gt;    Attributes - Mandatory Default Enabled &lt;br /&gt; 05 S-1-5-11&lt;br /&gt;    Attributes - Mandatory Default Enabled &lt;br /&gt; 06 S-1-5-15&lt;br /&gt;    Attributes - Mandatory Default Enabled &lt;br /&gt; 07 S-1-5-5-0-1244696&lt;br /&gt;    Attributes - Mandatory Default Enabled LogonId &lt;br /&gt; 08 S-1-2-0&lt;br /&gt;    Attributes - Mandatory Default Enabled &lt;br /&gt; 09 S-1-5-64-10&lt;br /&gt;    Attributes - Mandatory Default Enabled &lt;br /&gt; 10 S-1-16-12288&lt;br /&gt;    Attributes - GroupIntegrity GroupIntegrityEnabled &lt;br /&gt;Primary Group: S-1-5-21-2196860067-979979976-148335941-513&lt;br /&gt;Privs: &lt;br /&gt; 05 0x000000005 SeIncreaseQuotaPrivilege          Attributes - &lt;br /&gt; 08 0x000000008 SeSecurityPrivilege               Attributes - &lt;br /&gt; 09 0x000000009 SeTakeOwnershipPrivilege          Attributes - &lt;br /&gt; 10 0x00000000a SeLoadDriverPrivilege             Attributes - &lt;br /&gt; 11 0x00000000b SeSystemProfilePrivilege          Attributes - &lt;br /&gt; 12 0x00000000c SeSystemtimePrivilege             Attributes - &lt;br /&gt; 13 0x00000000d SeProfileSingleProcessPrivilege   Attributes - &lt;br /&gt; 14 0x00000000e SeIncreaseBasePriorityPrivilege   Attributes - &lt;br /&gt; 15 0x00000000f SeCreatePagefilePrivilege         Attributes - &lt;br /&gt; 17 0x000000011 SeBackupPrivilege                 Attributes - &lt;br /&gt; 18 0x000000012 SeRestorePrivilege                Attributes - &lt;br /&gt; 19 0x000000013 SeShutdownPrivilege               Attributes - &lt;br /&gt; 20 0x000000014 SeDebugPrivilege                  Attributes - &lt;br /&gt; 22 0x000000016 SeSystemEnvironmentPrivilege      Attributes - &lt;br /&gt; 23 0x000000017 SeChangeNotifyPrivilege           Attributes - Enabled Default &lt;br /&gt; 24 0x000000018 SeRemoteShutdownPrivilege         Attributes - &lt;br /&gt; 25 0x000000019 SeUndockPrivilege                 Attributes - &lt;br /&gt; 28 0x00000001c SeManageVolumePrivilege           Attributes - &lt;br /&gt; 29 0x00000001d SeImpersonatePrivilege            Attributes - Enabled Default &lt;br /&gt; 30 0x00000001e SeCreateGlobalPrivilege           Attributes - Enabled Default &lt;br /&gt; 33 0x000000021 SeIncreaseWorkingSetPrivilege     Attributes - &lt;br /&gt; 34 0x000000022 SeTimeZonePrivilege               Attributes - &lt;br /&gt; 35 0x000000023 SeCreateSymbolicLinkPrivilege     Attributes - &lt;br /&gt;Authentication ID:         (0,12fe47)&lt;br /&gt;Impersonation Level:       Identification&lt;br /&gt;TokenType:                 Primary&lt;br /&gt;Source: User32             TokenFlags: 0x0 ( Token in use )&lt;br /&gt;Token ID: 147808           ParentToken ID: 0&lt;br /&gt;Modified ID:               (0, 147813)&lt;br /&gt;RestrictedSidCount: 0      RestrictedSids: 00000000&lt;br /&gt;OriginatingLogonSession: 3e7&lt;br /&gt;&lt;br /&gt;Notice that the User SID above has not been changed.&lt;br /&gt;&lt;br /&gt;Let's now look at a standard user token:&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;TS Session ID: 0x1&lt;br /&gt;User: S-1-5-21-2196860067-979979976-148335941-1001&lt;/strong&gt;&lt;br /&gt;Groups: &lt;br /&gt; 00 S-1-5-21-2196860067-979979976-148335941-513&lt;br /&gt;    Attributes - Mandatory Default Enabled &lt;br /&gt; 01 S-1-1-0&lt;br /&gt;    Attributes - Mandatory Default Enabled &lt;br /&gt; 02 S-1-5-32-545&lt;br /&gt;    Attributes - Mandatory Default Enabled &lt;br /&gt; 03 S-1-5-4&lt;br /&gt;    Attributes - Mandatory Default Enabled &lt;br /&gt; 04 S-1-5-11&lt;br /&gt;    Attributes - Mandatory Default Enabled &lt;br /&gt; 05 S-1-5-15&lt;br /&gt;    Attributes - Mandatory Default Enabled &lt;br /&gt; 06 S-1-5-5-0-1377206&lt;br /&gt;    Attributes - Mandatory Default Enabled LogonId &lt;br /&gt; 07 S-1-2-0&lt;br /&gt;    Attributes - Mandatory Default Enabled &lt;br /&gt; 08 S-1-5-64-10&lt;br /&gt;    Attributes - Mandatory Default Enabled &lt;br /&gt; 09 S-1-16-8192&lt;br /&gt;    Attributes - GroupIntegrity GroupIntegrityEnabled &lt;br /&gt;Primary Group: S-1-5-21-2196860067-979979976-148335941-513&lt;br /&gt;Privs: &lt;br /&gt; 19 0x000000013 SeShutdownPrivilege               Attributes - &lt;br /&gt; 23 0x000000017 SeChangeNotifyPrivilege           Attributes - Enabled Default &lt;br /&gt; 25 0x000000019 SeUndockPrivilege                 Attributes - &lt;br /&gt; 33 0x000000021 SeIncreaseWorkingSetPrivilege     Attributes - &lt;br /&gt; 34 0x000000022 SeTimeZonePrivilege               Attributes - &lt;br /&gt;Authentication ID:         (0,1503e5)&lt;br /&gt;Impersonation Level:       Anonymous&lt;br /&gt;TokenType:                 Primary&lt;br /&gt;Source: User32             TokenFlags: 0x200 ( Token in use )&lt;br /&gt;Token ID: 1649c0           ParentToken ID: 0&lt;br /&gt;Modified ID:               (0, 1601f0)&lt;br /&gt;RestrictedSidCount: 0      RestrictedSids: 00000000&lt;br /&gt;OriginatingLogonSession: 3e7&lt;br /&gt;&lt;br /&gt;Trying, for example, to edit the firewall settings brings up the Consent UI which prompts us for different credentials and results in a token like the one here below:&lt;br /&gt;&lt;br /&gt;TS Session ID: 0x1&lt;br /&gt;&lt;strong&gt;User: S-1-5-21-2196860067-979979976-148335941-1000&lt;/strong&gt;&lt;br /&gt;Groups: &lt;br /&gt; 00 S-1-5-21-2196860067-979979976-148335941-513&lt;br /&gt;    Attributes - Mandatory Default Enabled &lt;br /&gt; 01 S-1-1-0&lt;br /&gt;    Attributes - Mandatory Default Enabled &lt;br /&gt; 02 S-1-5-32-544&lt;br /&gt;    Attributes - Mandatory Default Enabled Owner &lt;br /&gt; 03 S-1-5-32-545&lt;br /&gt;    Attributes - Mandatory Default Enabled &lt;br /&gt; 04 S-1-5-4&lt;br /&gt;    Attributes - Mandatory Default Enabled &lt;br /&gt; 05 S-1-5-11&lt;br /&gt;    Attributes - Mandatory Default Enabled &lt;br /&gt; 06 S-1-5-15&lt;br /&gt;    Attributes - Mandatory Default Enabled &lt;br /&gt; 07 S-1-5-5-0-1377206&lt;br /&gt;    Attributes - Mandatory Default Enabled LogonId &lt;br /&gt; 08 S-1-2-0&lt;br /&gt;    Attributes - Mandatory Default Enabled &lt;br /&gt; 09 S-1-5-64-10&lt;br /&gt;    Attributes - Mandatory Default Enabled &lt;br /&gt; 10 S-1-16-12288&lt;br /&gt;    Attributes - GroupIntegrity GroupIntegrityEnabled &lt;br /&gt;Primary Group: S-1-5-21-2196860067-979979976-148335941-513&lt;br /&gt;Privs: &lt;br /&gt; 05 0x000000005 SeIncreaseQuotaPrivilege          Attributes - &lt;br /&gt; 08 0x000000008 SeSecurityPrivilege               Attributes - &lt;br /&gt; 09 0x000000009 SeTakeOwnershipPrivilege          Attributes - &lt;br /&gt; 10 0x00000000a SeLoadDriverPrivilege             Attributes - &lt;br /&gt; 11 0x00000000b SeSystemProfilePrivilege          Attributes - &lt;br /&gt; 12 0x00000000c SeSystemtimePrivilege             Attributes - &lt;br /&gt; 13 0x00000000d SeProfileSingleProcessPrivilege   Attributes - &lt;br /&gt; 14 0x00000000e SeIncreaseBasePriorityPrivilege   Attributes - &lt;br /&gt; 15 0x00000000f SeCreatePagefilePrivilege         Attributes - &lt;br /&gt; 17 0x000000011 SeBackupPrivilege                 Attributes - &lt;br /&gt; 18 0x000000012 SeRestorePrivilege                Attributes - &lt;br /&gt; 19 0x000000013 SeShutdownPrivilege               Attributes - &lt;br /&gt; 20 0x000000014 SeDebugPrivilege                  Attributes - &lt;br /&gt; 22 0x000000016 SeSystemEnvironmentPrivilege      Attributes - &lt;br /&gt; 23 0x000000017 SeChangeNotifyPrivilege           Attributes - Enabled Default &lt;br /&gt; 24 0x000000018 SeRemoteShutdownPrivilege         Attributes - &lt;br /&gt; 25 0x000000019 SeUndockPrivilege                 Attributes - &lt;br /&gt; 28 0x00000001c SeManageVolumePrivilege           Attributes - &lt;br /&gt; 29 0x00000001d SeImpersonatePrivilege            Attributes - Enabled Default &lt;br /&gt; 30 0x00000001e SeCreateGlobalPrivilege           Attributes - Enabled Default &lt;br /&gt; 33 0x000000021 SeIncreaseWorkingSetPrivilege     Attributes - &lt;br /&gt; 34 0x000000022 SeTimeZonePrivilege               Attributes - &lt;br /&gt; 35 0x000000023 SeCreateSymbolicLinkPrivilege     Attributes - &lt;br /&gt;Authentication ID:         (0,16b095)&lt;br /&gt;Impersonation Level:       Anonymous&lt;br /&gt;TokenType:                 Primary&lt;br /&gt;Source: CredPro            TokenFlags: 0x0 ( Token in use )&lt;br /&gt;Token ID: 16bc6b           ParentToken ID: 0&lt;br /&gt;Modified ID:               (0, 16b73a)&lt;br /&gt;RestrictedSidCount: 0      RestrictedSids: 00000000&lt;br /&gt;OriginatingLogonSession: 3e7&lt;br /&gt;&lt;br /&gt;The user SID has changed from S-1-5-21-2196860067-979979976-148335941-1001 to S-1-5-21-2196860067-979979976-148335941-1000 -- which basically means another user account. There are some subtle consequences to this. One that comes to mind is what happens when an application tries to write to HKCU? In my tests, the application always writes to the correct HKCU, that is, according to the user account. This however, may or may not be what you need if all you are trying to do is to run a legacy application.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Bug alert:&lt;/strong&gt; one annoying feature (bug?) that I have noticed is that, while logged in as a regular user, you cannot start a second instance of an application using different credentials. Start an instance of regedit.exe as a standard user, then right-click on regedit.exe and right-click on it to start it as Administrator. After you'll enter the credentials you'll notice that the focus will switch back to the first instance. The reverse is also true: Vista will prevent you from having two instances of the same application under different credentials. Go figure ...&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6545079344377061068-7433280960114695613?l=leastprivilege.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://leastprivilege.blogspot.com/feeds/7433280960114695613/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6545079344377061068&amp;postID=7433280960114695613' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6545079344377061068/posts/default/7433280960114695613'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6545079344377061068/posts/default/7433280960114695613'/><link rel='alternate' type='text/html' href='http://leastprivilege.blogspot.com/2007/01/difference-between-standard-user.html' title='Difference between a Standard User &amp; Protected Administrator tokens'/><author><name>Marco Peretti</name><uri>http://www.blogger.com/profile/14697132326094396006</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>
