views:

137

answers:

1

Hi

I bought a book on Amazon which was meant to prepare me for 70-536 exam. I found there a handful of information which is a bit confusing for me. Let me quote it - I will place my questions inline.

To understand how security policies are used, consider an application developer who wants to play with an assembly she downloaded from the Internet. The developer has downloaded the assembly to her local computer so (?) it will run within the My Computer Zone.

Is that so? I think that the code group membership (My Computer Zone) depends on the evidence hardcoded in an assembly. How do we know that the assembly is using Zone: MyComputer evidence which is necessary in this case?

The developer’s computer is a member of an AD DS domain, and a domain administrator has created a code group in the Enterprise security policy that grants assemblies on the local computer the Everything permission set. This is more restrictive than the FullTrust permission set that the Machine security policy grants assemblies in the My Computer zone, so the Everything permission set takes precedence.

The developer isn’t sure that the assembly is safe to run, however, so she wants to apply the Internet permission set to prevent the assembly from writing to the disk or communicating across the network. She doesn’t log on to her computer as an Administrator, but she can still start the .NET Framework 2.0 Configuration tool and modify the User security policy. (Standard users aren’t allowed to modify the Machine security policy.) By modifying the User security policy, she can restrict assemblies in the My Computer zone to the Internet permission set. Assemblies that she runs will be restricted without affecting other users of the same computer.

Suppose I create nested code group 'test' in User policy level (with All__Code as parent) and assign it membership condition to Zone: MyComputer. Does it mean that I also need to change permission set of All__Code from Full Trust to Nothing?

Kind Regards PK

A: 

First Question:

The zone is applied based on where the assembly is run from. Because the assembly payload is executed on the local machines and lives on the local harddrive, not a network or internet location, the My Computer Zone security will apply to the assembly. At this point the evidence does not apply. However if I have explicuity coded my assembly to require for example administrator access, this will still be enforced.

Second Question:

No you do not need to change the All_Code setting. The two policies will be merged effectively and the most restrictive policy will apply.

Diago
I am almost sure you are wrong with the second answer. The most restrictive is applied but only when combining permission sets from multiple policy levels - I think permission sets are summed within a policy level itself.According to the first answer. What do you mean by "At this point the evidence does not apply" - the Zone itself is an evidence.
pkolodziej
Fair comment, however when summed the most restritive will always apply? I am recalling this from when I wrote the exam but it was a while back. I did however test this before replying and in both scenarios the most restrictive applied. I would suggest maybe doing the same?
Diago
I think we are not talking about the same thing: I am not asking about merging policies (the logic grouping of codegroups). Let's stay within a single policy level. From now on when I add nested child code group to All_Code in User policy level (which has Full Trust permission set) and set the permission of this child code group to more restrictive than Full Trust, the result would be sum of the two - which is Full Trust. And yes it will be later compared and merged with other policy levels. I think that is why All_Code group in Machine policy has 'Nothing' permission set.
pkolodziej
Anyways - conversation was helpful so I marked your post as answer.
pkolodziej
Thank you. For clarity the policies are UNION which I assume is what you refer to as sum and a matrix match is used to determine which policies to apply. It is actually a bit complex. Also a child policy will not be applied if the parents is not applicable to the particular execution.
Diago