• python
  • javascript
  • reactjs
  • sql
  • c#
  • java
Facebook Twitter Instagram
Devs Fixed
  • python
  • javascript
  • reactjs
  • sql
  • c#
  • java
Devs Fixed
Home ยป Resolved: C# Get pSID,string SID from SidStart ACCESS_ALLOWED_ACE

Resolved: C# Get pSID,string SID from SidStart ACCESS_ALLOWED_ACE

0
By Isaac Tonny on 17/06/2022 Issue
Share
Facebook Twitter LinkedIn

Question:

I was trying to get pSID from SidStart value of ACCESS_ALLOWED_ACE structure and could not get it for some time.
I found PInvoke for DWORD-aligned handles to memory, but unfortunately I cannot add comments just yet.
The person gets the pSid from ACE pointer offset by 8 as follows (don’t mind the “deniedAceIntPtr”)
My question is, where does the 8 come from?
Is it because SidStart in ACCESS_ALLOWED_ACE comes after ACE_HEADER and ACCESS_MASK which are both of 4 bytes? So 4+4=8 and SidStart starts after those two at the IntPtr address of the ACE?
Getting the pSid and later SidString using ConvertSidToStringSidW works for me.

Answer:

According to ACCESS_DENIED_ACE structure, You can refer to SidStart directly And Yes, sizeof(ACE_HEADER)+sizeof(ACCESS_MASK)=8BYTE.

If you have better answer, please add a comment about this, thank you!

c# winapi
Share. Facebook Twitter LinkedIn

Related Posts

Resolved: Modify entity using Action in C#

24/03/2023

Resolved: How to give rank on datetime column group by another column with userid in it

24/03/2023

Resolved: Passing 2 functions in onChange in react

24/03/2023

Leave A Reply

© 2023 DEVSFIX.COM

Type above and press Enter to search. Press Esc to cancel.