Questions tagged [sid]

In the context of the Microsoft Windows NT line of operating systems, a SID (Security IDentifier) is a unique, immutable identifier of a user, user group, or other security principal.

Windows grants or denies access and privileges to resources based on access control lists (ACLs), which use SIDs to uniquely identify users and their group memberships.

When a user logs into a computer, an access token is generated that contains user and group SIDs and user privilege level. When a user requests access to a resource, the access token is checked against the ACL to permit or deny particular action on a particular object.

SIDs are useful for troubleshooting issues with security audits, Windows server and domain migrations.

197 questions
3
votes
0 answers

Get AdministratorsMembers SIDs in .NET CORE 2

I wrote this function to retrieve all Administrators Members SIDs: private IList GetAdministratorsMembersSIDs() { IList adminMembers = new List(); SecurityIdentifier id = new SecurityIdentifier(administratorsSid); …
3
votes
1 answer

get-adgroup -filter "SID -like '*-512'"

I have been wanting to figure out how to use -filter to get what I want. What I am trying to do is find the Domain Admins group by a -like statement of *-512 against the SID property using the following: get-adgroup -filter "SID -like '*-512'" It…
tony Unger
  • 33
  • 1
  • 3
3
votes
2 answers

Can I create a Windows mutex globally for those processes which know the password of the mutex?

I want to create a Windows mutex by using WinAPI, CreateMutex() and OpenMutex(). But for security concern, I want the mutex be opened by those processes who know the "password" or the hard-code magic code. I don't want the mutex be accessed by every…
Calvin Wu
  • 142
  • 10
3
votes
1 answer

Obtain logged on user SID rather than elevated user

How would I obtain the logged on user SID in an elevated .NET application? I have tried WindowsIdentity.GetCurrent() which of course returns the administrator that elevated the process. From what I can see I may need to use native methods to do…
Luke
  • 266
  • 2
  • 8
3
votes
1 answer

Get local Windows user name from a SID with C++

If I have a list of Windows account SIDs (strings like "S-1-5-21-16217043-3088031003-1644254475-1001") how can I get the name of Windows user accounts from them (stuff like "John Doe") using C++ and WinAPIs?
ahmd0
  • 14,832
  • 29
  • 117
  • 218
3
votes
1 answer

how to get PSID from TOKEN_INFORMATION_CLASS?

I try to use information from this post: https://stackoverflow.com/a/251267/393087 And the code I came up with is: HANDLE hToken; OpenProcessToken(GetCurrentProcess(),TOKEN_ADJUST_PRIVILEGES, &hToken); DWORD dwSize; TOKEN_INFORMATION_CLASS…
rsk82
  • 24,158
  • 43
  • 131
  • 223
2
votes
2 answers

Determine if SID is User or Group

Is it possible to determine if a given SID is User or Group using .NET? I have a list of SIDs which I need to edit in a listview, so for User and Group I want to use different icons
javros
  • 825
  • 9
  • 31
2
votes
1 answer

C# - Implementing Single Sign On in WinForms (as Outlook does)

I have created a server/client application. Both of them are written in C#. It uses TCP/IP communication with custom SSL implementation. Currently the login procedure requires a username/password pair for logging in. I was asked to implement the…
user927432
  • 89
  • 1
  • 6
2
votes
5 answers

How to convert the SID to String and vice versa in Java?

I'm writing a program in Java, using Spring-LDAP. I need to implement a method, which should search a user by SID. For this reason I use a filter like "&((objectClass=User)(objectSid="+sid+"))". The search doesn't work with sid in String format like…
mtm
  • 115
  • 2
  • 2
  • 6
2
votes
1 answer

Comparing 2 string format SIDs

Can I compare 2 string-format SIDs for equality? As per my understanding, a Group SID is a unique identifier in an Active Directory forest, so the string that I get by using ConvertSidToStringSid will also be unique and can thus be compared to any…
picrodevosio
  • 41
  • 1
  • 9
2
votes
2 answers

Why does ConvertStringSidToSid fail to convert a string SID?

I am trying to convert a SID to a string and back again using ConvertSidToStringSid and ConvertStringSidToSid, but the conversion back is failing with error code 1337. A test SID I created failed to make the round trip -- it caused…
ddulaney
  • 607
  • 3
  • 15
2
votes
2 answers

SID for Administrators group doesn't show in a member account

Now, before I start, I will let you in on a secret: this is on a Domain Controller.* *The above statement is stricken due to irrelevance as the only significant change that occurs to the Local Administrator account and the Local Administrator Group…
Rincewind
  • 352
  • 1
  • 9
  • 22
2
votes
0 answers

How to change the SID manually of an impersonation token

Is it possible to manually change the SID of an a thread's impersonation token? if (0 == ImpersonateSelf(SecurityDelegation)) { //FAILED return 1; } HANDLE tokenHandle = NULL; PTOKEN_USER pUserToken = NULL; PSID sid; DWORD dwRequiredLength…
Frank Palmasani
  • 125
  • 1
  • 10
2
votes
1 answer

Editing registry value for newly created user

I have a .NET application that creates a new local user like so: var principalContext = new PrincipalContext(ContextType.Machine); var userPrincipal = new UserPrincipal(principalContext); userPrincipal.Name =…
Bas
  • 1,786
  • 18
  • 34
2
votes
2 answers

Python ldap3 code to get username from SID

I have a SID string (e.g., "S-1-5-21-500000003-1000000000-1000000003-1001") of a user on a shared Windows server, and I need to get the related username. I suppose that this may be achieved by: Turning the SID string into byte array. Using a…
Ofer
  • 366
  • 5
  • 11
1 2
3
13 14