1. Computer problem? Tech Support Guy is completely free -- paid for by advertisers and donations. Click here to join today! If you're new to Tech Support Guy, we highly recommend that you visit our Guide for New Members.

Need Platform SDK utility build help

Discussion in 'Software Development' started by lotuseclat79, Jul 29, 2006.

Thread Status:
Not open for further replies.
Advertisement
  1. lotuseclat79

    lotuseclat79 Thread Starter

    Joined:
    Sep 12, 2003
    Messages:
    20,583
    I run WinXP Pro SP2 and am currently recoverying from a Registry File Failure via the BSOD.

    I need to recover part of the Registry yet, but need a little help from someone with the Platform SDK installed to build and upload a useful little utility for me.

    Please refer to the WinXP forum thread:
    http://forums.techguy.org/windows-nt-2000-xp/487294-need-sidtobinary-i-e-textual.html

    Essentially, the utility will help me findout the Binary SID string for the part of the registry user profile I need to reconstruct.

    Tia,

    -- Tom
     
  2. lotuseclat79

    lotuseclat79 Thread Starter

    Joined:
    Sep 12, 2003
    Messages:
    20,583
    Sids (Administrator and Users) are located in the Registry at:
    HKLM\Software\Microsoft\WindowsNT\CurrentVersion\ProfileList

    They have the following format:
    S-R-I-SA(wk)-XXXX-XXXX-XXXX-SA(ua)
    where XXXX-XXXX-XXXX is the 96-bit unique machine identifier and
    S: indicates security identifier
    R: revision level of SID binary format; currently 1
    I: 48-bit value defining agent/authority that issued SID - NT Security Authority on the local system/domain. value in hex is: 00 00 00 00 00 05
    SA(wk): Sub-authority value; value is: (dec) 21 or (hex) 15
    Machine ID: 96-bit unique identifier expressed in three parts 32-bits each
    SA(ua): Relative identifier starting at 1000 for users. 500 is Administrator
    also known as RID.

    The key thing to note is that the machine identifier component parts are each expressed in little endian binary format as is the RID.

    For example:
    Look in your Registry for the Administrator account at the above location.
    S-1-5-21-XXXX-XXXX-XXXX-500 where the machine identifier is unique to your WinNT/XP/2000/2003 computer. This is the textual format SID.

    If you plug-in each of the three parts of the machine identifier into a calculator in decimal, then display in hexadecimal you then need to reverse the order of the bytes to obtain the little endian format expressed in your Binary SID. Do the same for the RID of 500 which in hex is 01f4, but reversing the bytes gives the RID as: f4 01 00 00 for the last part of the Binary SID.

    -- Tom

    P.S. This should make a nice little project for those with the compilers to compile the code attached on a Windows compatible platform.
     

    Attached Files:

    • sid.zip
      File size:
      3.1 KB
      Views:
      5
  3. brendandonhu

    brendandonhu

    Joined:
    Jul 8, 2002
    Messages:
    14,681
    There's a possibility that I might be able to get to a box to do this within the next couple days, I'm not sure if it has what you need though.
     
  4. lotuseclat79

    lotuseclat79 Thread Starter

    Joined:
    Sep 12, 2003
    Messages:
    20,583
    Hi Brendan,

    Thanks for trying! All it should take is a Win32 API compatible development environment to compile the win executable for a small main program that reads the SidText string as a parameter (or conversely, a Sid env variable) to call the Sid functions (not forgetting to call the FreeSid routine at the end)!

    -- Tom
     
As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 733,556 other people just like you!

Loading...
Thread Status:
Not open for further replies.

Short URL to this thread: https://techguy.org/487489

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice