SharkCagey / SharkCage

1 stars 3 forks source link

102 - Desktop access rights modified to comply with paper #105

Closed bencikpeter closed 6 years ago

bencikpeter commented 6 years ago

Access rights are now identical to those described in paper (table 3)

@DonatJR could you have a look at StartedInCage() function in CageChooser? It will not work with new access rights and C# is not my friend... so I guess I need your help ๐Ÿ˜… And maybe we could fix #96 at the same time (since this might not be the last rewrite, if rights ever change)

DonatJR commented 6 years ago

@bencikpeter @SailReal

Alright, some points to discuss / think about:

SailReal commented 6 years ago

If the {EXPLICIT_ACCESS-struct}.Trustee.ptstrName isn't null the current solution works like a charm ๐Ÿ˜. But as you discussed @DonatJR, randomly it is null but in my opinion, it is the right way to go. Will now have a look into the code in more detail, maybe I'll find out what's causing it.

Later we should enhance the dialog with more content that the user knows, it is more or less the same dialog like the UAC prompt with the same impact.

SailReal commented 6 years ago

Hmm, thought maybe one of these functions already fails, unfortunately not ๐Ÿคจ

DonatJR commented 6 years ago

Found the problem and will push a fix later today

DonatJR commented 6 years ago

Alright, this should fix the previous issue. The problem was that the ACL parameter retrieved by GetSecurityInfo apparently shares some data with the security_descriptor (last param of GetSecurityInfo). When freeing the security_descriptor (was previously done right after the call to GetSecurityInfo) param the ACL param got corrupted / invalid.

Should have read the documentation more carefully:

If the ppsidOwner, ppsidGroup, ppDacl, and ppSacl parameters are non-NULL, and the SecurityInfo parameter specifies that they be retrieved from the object, those parameters will point to the corresponding parameters in the security descriptor returned in ppSecurityDescriptor.

๐Ÿ™ˆ

After testing the release-mode check should be put back in.

SailReal commented 6 years ago

I have started the configurator a hundred times, with success and the explanation sounds reasonable. Thanks for the awesome fix ๐Ÿ˜!!!

Will now look over the code again...

SailReal commented 6 years ago

@DonatJR should I put the release-mode check back in?

DonatJR commented 6 years ago

@bencikpeter the PR should now be ready to merge, I removed the WIP from the title. feel free to proceed ;)