<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>How do I convert a SID between binary and string forms?</title><link>http://blogs.msdn.com/oldnewthing/archive/2004/03/15/89753.aspx</link><description>More than you probably wanted to know about how SIDs are represented in memory.</description><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>re: How do I convert a SID between binary and string forms?</title><link>http://blogs.msdn.com/oldnewthing/archive/2004/03/15/89753.aspx#89786</link><pubDate>Mon, 15 Mar 2004 15:08:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:89786</guid><dc:creator>sd</dc:creator><description>huh?</description></item><item><title>re: How do I convert a SID between binary and string forms?</title><link>http://blogs.msdn.com/oldnewthing/archive/2004/03/15/89753.aspx#89810</link><pubDate>Mon, 15 Mar 2004 15:58:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:89810</guid><dc:creator>Andreas Magnusson</dc:creator><description>So what are the security issues with giving out ones SID?</description></item><item><title>re: How do I convert a SID between binary and string forms?</title><link>http://blogs.msdn.com/oldnewthing/archive/2004/03/15/89753.aspx#89811</link><pubDate>Mon, 15 Mar 2004 16:03:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:89811</guid><dc:creator>Larry Osterman</dc:creator><description>As far as I know, there aren't any issues with giving out the SID - except for one minor issue.&lt;br&gt;&lt;br&gt;The -...-...-...- actually identify the domain that issued the SID, and that means that it's possible to corrolate the domain on which a user account is created.  &lt;br&gt;&lt;br&gt;That means that if you know one account on a domain that has a weak security policy, you can know if other accounts are also created on the same domain.&lt;br&gt;&lt;br&gt;It's a small bit of information disclosure, but in the scheme of things...&lt;br&gt;&lt;br&gt;If you think about it, the SID of all the users in an ACL are included in the security descriptor for objects, and the security descriptor contents are semi-public information (you need READ_CONTROL access rights to the object).&lt;br&gt;&lt;br&gt;But I'm also not a security guy (although I've done a LOT of security work).&lt;br&gt;</description></item><item><title>re: How do I convert a SID between binary and string forms?</title><link>http://blogs.msdn.com/oldnewthing/archive/2004/03/15/89753.aspx#89862</link><pubDate>Mon, 15 Mar 2004 17:44:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:89862</guid><dc:creator>Adrian Oney</dc:creator><description>Same boat as Raymond - not a security guy, but I've done a good amount of security work.&lt;br&gt;&lt;br&gt;I personally found the information on SIDs in the SDK and even Howard &amp;amp; LeBlanc's excellent &amp;quot;Writing Secure Code&amp;quot; book somewhat lacking in organization. When I had to put things together for the DDK, I organized the list of SIDs this way (from wdmsec.h):&lt;br&gt;&lt;br&gt;Each SID is listed in the form EnglishName (&amp;quot;SDDL Abbreviation&amp;quot;, FullSID, Authority:SubAuthorities)&lt;br&gt;&lt;br&gt;  The following SIDs represent *accounts* on the local machine:&lt;br&gt;  -------------------------------------------------------------&lt;br&gt;&lt;br&gt;    System (&amp;quot;SY&amp;quot;, S-1-5-18, SECURITY_NT_AUTHORITY:SECURITY_LOCAL_SYSTEM_RID)&lt;br&gt;        The OS itself (including its user mode components.)&lt;br&gt;&lt;br&gt;    Local Service (&amp;quot;LS&amp;quot;, S-1-5-19, SECURITY_NT_AUTHORITY:SECURITY_LOCAL_SERVICE_RID)&lt;br&gt;        A predefined account for services that presents user credentials for local&lt;br&gt;        resources and annonymous credentials for network access.&lt;br&gt;        Available on XP and later.&lt;br&gt;&lt;br&gt;    Network Service (&amp;quot;NS&amp;quot;, S-1-5-20, SECURITY_NT_AUTHORITY:SECURITY_NETWORK_SERVICE_RID)&lt;br&gt;        A predefined account for services that presents user credentials for local&lt;br&gt;        resources and the machine ID for network access.&lt;br&gt;        Available on XP and later.&lt;br&gt;&lt;br&gt;    (A local *account* for a guest and a default administrator also exist, but&lt;br&gt;     the corresponding SDDL abbreviations are not supported by this library.&lt;br&gt;     Use the corresponding group SIDs instead.)&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;  The following SIDs represent *groups* on the local machine:&lt;br&gt;  -----------------------------------------------------------&lt;br&gt;&lt;br&gt;    Administrators (&amp;quot;BA&amp;quot;, S-1-5-32-544, SECURITY_NT_AUTHORITY:SECURITY_BUILTIN_DOMAIN_RID:DOMAIN_ALIAS_RID_ADMINS)&lt;br&gt;        The builtin administrators group on the machine. This is not the same&lt;br&gt;        as the builtin Administrator *account*.&lt;br&gt;&lt;br&gt;    Builtin users group (&amp;quot;BU&amp;quot;, S-1-5-32-545, SECURITY_NT_AUTHORITY:SECURITY_BUILTIN_DOMAIN_RID:DOMAIN_ALIAS_RID_USERS)&lt;br&gt;        Group covering all local user accounts, and users on the domain. &lt;br&gt;&lt;br&gt;    Builtin guests group (&amp;quot;BG&amp;quot;, S-1-5-32-546, SECURITY_NT_AUTHORITY:SECURITY_BUILTIN_DOMAIN_RID:DOMAIN_ALIAS_RID_GUESTS)&lt;br&gt;        Group covering users logging in using the local or domain guest account.&lt;br&gt;        This is not the same as the builtin Guest *account*.&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;  The below SIDs describe the authenticity of the user's identity:&lt;br&gt;  ----------------------------------------------------------------&lt;br&gt;&lt;br&gt;    Authenticated Users (&amp;quot;AU&amp;quot;, S-1-5-11, SECURITY_NT_AUTHORITY:SECURITY_AUTHENTICATED_USER_RID)&lt;br&gt;        Any user recognized by the local machine or by a domain. Note that&lt;br&gt;        users logged in using the Builtin Guest account are not authenticated.&lt;br&gt;        However, members of the Guests group with individual accounts on the&lt;br&gt;        machine or domain are authenticated.&lt;br&gt;&lt;br&gt;    Anonymous Logged-on User (&amp;quot;AN&amp;quot;, S-1-5-7, SECURITY_NT_AUTHORITY:SECURITY_ANONYMOUS_LOGON_RID)&lt;br&gt;        Any user logged on without an identity, for instance via an anonymous&lt;br&gt;        network session. Note that users logged in using the Builtin Guest&lt;br&gt;        account are neither authenticated nor anonymous. Available on XP and&lt;br&gt;        later.&lt;br&gt;&lt;br&gt;    World (&amp;quot;WD&amp;quot;, S-1-1-0, SECURITY_WORLD_SID_AUTHORITY:SECURITY_WORLD_RID)&lt;br&gt;        Prior to Windows XP, this SID covers every session: authenticated,&lt;br&gt;        anonymous, and the Builtin Guest account.&lt;br&gt;&lt;br&gt;        For Windows XP and later, this SID does not cover anonymous logon&lt;br&gt;        sessions - only authenticated and the Builtin Guest account.&lt;br&gt;&lt;br&gt;        Note that untrusted or &amp;quot;restricted&amp;quot; code is also not covered by the&lt;br&gt;        World SID. See the Restricted Code SID description for more&lt;br&gt;        information.&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;  The below SIDs describe how the user logged into the machine:&lt;br&gt;  -------------------------------------------------------------&lt;br&gt;&lt;br&gt;    Interactive Users (&amp;quot;IU&amp;quot;, S-1-5-4, SECURITY_NT_AUTHORITY:SECURITY_INTERACTIVE_RID)&lt;br&gt;        Users who initally logged onto the machine &amp;quot;interactively&amp;quot;, such as&lt;br&gt;        local logons and Remote Desktops logons.&lt;br&gt;&lt;br&gt;    Network Logon User (&amp;quot;NU&amp;quot;, S-1-5-2, SECURITY_NT_AUTHORITY:SECURITY_NETWORK_RID)&lt;br&gt;        Users accessing the machine remotely, without interactive desktop&lt;br&gt;        access (ie, file sharing or RPC calls).&lt;br&gt;&lt;br&gt;    Terminal Server Users (---, S-1-5-14, SECURITY_NT_AUTHORITY:SECURITY_TERMINAL_SERVER_RID)&lt;br&gt;        Interactive Users who *initially* logged onto the machine specifically&lt;br&gt;        via Terminal Services or Remote Desktop.&lt;br&gt;        (NOTE: There is currently no SDDL token for this SID. Furthermore, the&lt;br&gt;        presence of the SID doesn't take into account fast user switching&lt;br&gt;        either.)&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;  The below SID deserves special mention:&lt;br&gt;  ---------------------------------------&lt;br&gt;&lt;br&gt;    Restricted Code (&amp;quot;RC&amp;quot;, S-1-5-12, SECURITY_NT_AUTHORITY:SECURITY_RESTRICTED_CODE_RID)&lt;br&gt;        This SID is used to control access by untrusted code.&lt;br&gt;&lt;br&gt;        ACL validation against tokens with RC go through *two* checks, one&lt;br&gt;        against the token's normal list of SIDs (containing WD for instance),&lt;br&gt;        and one against a second list (typically containing RC and a subset of&lt;br&gt;        the original token SIDs). Only if both tests pass is access granted.&lt;br&gt;        As such, RC actually works in *combination* with other SIDs.&lt;br&gt;&lt;br&gt;        When RC is paired with WD in an ACL, a *superset* of Everyone&lt;br&gt;        _including_ untrusted code is described. RC is thus rarely seen in&lt;br&gt;        ACL's without the WD token.&lt;br&gt;</description></item><item><title>re: How do I convert a SID between binary and string forms?</title><link>http://blogs.msdn.com/oldnewthing/archive/2004/03/15/89753.aspx#90274</link><pubDate>Tue, 16 Mar 2004 06:20:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:90274</guid><dc:creator>Pavel Lebedinsky</dc:creator><description>If you're looking at a memory dump then you can also use !sid debugger extension:&lt;br&gt;&lt;br&gt;c:\debuggers&amp;gt; cdb notepad&lt;br&gt;&lt;br&gt;0:000&amp;gt; dc RPCRT4!AnonymousSid&lt;br&gt;78073fc8  00000101 05000000 00000007&lt;br&gt;&lt;br&gt;0:000&amp;gt; !sid RPCRT4!AnonymousSid 1&lt;br&gt;SID is: S-1-5-7 (Well Known Group: NT AUTHORITY\ANONYMOUS LOGON)</description></item><item><title>Reference to nowhere</title><link>http://blogs.msdn.com/oldnewthing/archive/2004/03/15/89753.aspx#90316</link><pubDate>Tue, 16 Mar 2004 07:37:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:90316</guid><dc:creator>Florian W.</dc:creator><description>My greatest highlight inside the security-API-documentation on MSDN is the article: &amp;quot;Windows NT Security in Theory and Practice&amp;quot;. This article has a nice line: 'First, you should definitely read Robert Reichel's two-part article &amp;quot;Inside Windows NT Security,&amp;quot; which appeared in the April 1993 and May 1993 issues of the Windows/DOS Developer's Journal'.&lt;br&gt;&lt;br&gt;Unfortunatly, that article is *not* part of MSDN:-(</description></item><item><title>re: How do I convert a SID between binary and string forms?</title><link>http://blogs.msdn.com/oldnewthing/archive/2004/03/15/89753.aspx#91708</link><pubDate>Thu, 18 Mar 2004 05:17:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:91708</guid><dc:creator>Norman Diamond</dc:creator><description>I found one article by Robert Reichel on windows security.  He's a real estate agent, and he recommended that windows on and near the ground floor should be locked.&lt;br&gt;&lt;br&gt;As for that other Robert Reichel, it seems his articles would likely be included in a CD that was made by the original publisher, but the CD is sold out.  CMP has more recent archives posted on their web site.  Anyone know if they could be persuaded to do the same with older ones?</description></item><item><title>Commenting on this entry has been closed.</title><link>http://blogs.msdn.com/oldnewthing/archive/2004/03/15/89753.aspx#206167</link><pubDate>Mon, 02 Aug 2004 21:20:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:206167</guid><dc:creator>Raymond Chen</dc:creator><description>Commenting closes after two weeks.&lt;br&gt;&lt;br&gt;&lt;a target="_new" href="http://weblogs.asp.net/oldnewthing/archive/2004/02/21/77681.aspx"&gt;http://weblogs.asp.net/oldnewthing/archive/2004/02/21/77681.aspx&lt;/a&gt;</description></item><item><title>Hex SID to Decimal SID Translation &amp;laquo; Scripting. Stuff. (By Froosh)</title><link>http://blogs.msdn.com/oldnewthing/archive/2004/03/15/89753.aspx#4732979</link><pubDate>Tue, 04 Sep 2007 05:32:09 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:4732979</guid><dc:creator>Hex SID to Decimal SID Translation « Scripting. Stuff. (By Froosh)</dc:creator><description>&lt;p&gt;PingBack from &lt;a rel="nofollow" target="_new" href="http://froosh.wordpress.com/2005/10/21/hex-sid-to-decimal-sid-translation/"&gt;http://froosh.wordpress.com/2005/10/21/hex-sid-to-decimal-sid-translation/&lt;/a&gt;&lt;/p&gt;
</description></item></channel></rss>