SharkCagey / SharkCage

1 stars 3 forks source link

Check if there is an easy solution for checking desktop rights in C# #96

Open DonatJR opened 6 years ago

DonatJR commented 6 years ago

Or at least easier than currently done in CageConfigurator.cs - StartedInCage(). Maybe ask the service?

bencikpeter commented 6 years ago

I had a look at StartedInCage() function and I believe that it is a) hacky and b) not even doing the right thing. Let me explain:

My suggestion is to abandon the rights checking approach at all and focus on a desktop name instead. It´s (pseudo)random and never reused, therefore it should suffice in order to check if the application is in cage. The problem is, that only CageManager knows the "canonical" name... therefore some mean of communication between CageManager and CageConfigurator must be implemented so that CageConfigurator could ask for a canonical name of the desktop and comapre it with the name of the desktop that he is running on.

DonatJR commented 6 years ago

Agreed, it is hacky. But I think checking for the specific access rights constellation of the secure desktop is still better than nothing for now (even more so considering creating a desktop with these specific rights requires administrator privileges).