Refactoring the Managed StrongName Project

Looking over the Managed StrongName code for today’s post, I’ve become dissatisfied with several things in the current code base, and I think that a bit of refactoring is in store for this project before its next addition.  One of the major things is the way that the code is split between the StrongNames.Native.dll and…

1

Extracting Public Key Blobs

(Updated 12/3/04 for code refactoring) Before letting another two months pass, its time to once again update the managed sn.exe port.  Today’s update adds three modes, each of which allow extraction of a public key blob from various sources: Flag Description StrongName API -e Extract the public key from an assembly StrongNameTokenFromAssemblyEx -p Extract the…

2

Next Generation Hardware Speculation

Yesterday there were a couple of announcements that seem to impact the next generation of video game consoles.  First, IBM, Sony and Toshiba announced that they will be making an announcement about the details of the Cell chip early next year.  Not too long after that, Paramount, Universal, and Warner Brothers announced that they will…

0

Managed Hosting API Take 3: the Host SecurityManager

Now that we’ve examined how to customize the AppDomain creation process, lets go back to our EchoAppDomainManager and look at some other places the CLR lets a managed host customize its behavior.  Looking back at the output of running HelloWorld with the EchoAppDomainManager setup, we see: D:\>set APPDOMAIN_MANAGER_ASM=AppDomainManagers, Version=1.0.0.0, Culture=neutral, PublicKeyToken=2674e92927c46c9e, processorArchitecture=MSILD:\>set APPDOMAIN_MANAGER_TYPE=AppDomainManagers.EchoAppDomainManager D:\>HelloWorld.exeAppDomain: DefaultDomain,…

4

An Interesting Take On Two-Factor Authentication

(via Bruce Schneier)  Two banks in New Zealand are introducing an interesting form of two-factor authentication.  Looks like anyone who tries to transfer $2,500 or more to a third party bank account via the website will be required to use their new technology.  The system will text message the customer’s cell phone an eight-digit passcode,…

6

What’s the FullTrust List For Anyway?

Time for a quick break from managed hosting.  I’ve been asked several times on this blog and in the newsgroups about the FullTrust list that the CLR keeps.  What is it, and why does it exist? The reason for the list is due to a problem that exists when evaluating policy.  Since all security policy…

0

Customizing the AppDomain Creation Process

Last week, I posted about AppDomainManagers.  Today, I’m going to look a little more closely at how the AppDomainManager allows you to customize the domain creation process.  Specifically there are two methods that, when overridden, allow you to modify how an AppDomain is created: CreateDomain – called whenever the CLR needs to create a new AppDomain…

8

ZoneSandboxAppDomainManager.cs

1  using System; 2  using System.Reflection; 3  using System.Security; 4  using System.Security.Policy; 5 6  namespace AppDomainManagers 7  { 8      public sealed class ZoneSandboxAppDomainManager : AppDomainManager 9      { 10          private AppDomain internetDomain = null; 11          private AppDomain localIntranetDomain = null; 12          private AppDomain myComputerDomain = null; 13 14          /// <summary> 15          ///     Create a new AppDomain 16          /// </summary> 17          /// <remarks> 18          ///     Provides a new AppDomain using the following algorithm:…

4

The Managed Hosting API

With v1.0 and v1.1 of the CLR, if you wanted to have much control over how the CLR was working under the covers, you needed to write an unmanaged host.  The unmanaged hosting API still exists with Whidbey (in fact, its gotten quite a few improvements of its own — Dino’s blog is a good…

12

Peter Torr Provides More Details on Sandboxing AppDomains

Peter Torr from the Visual Studio Tools for Office team recently expanded on my sandboxed AppDomain set of posts.  Peter adds some aditional code to change the code base of the AppDomain, which prevents untrusted addin types from sneaking into the FullTrust domain the original domain executes in.  He also adds my suggestion from the first…

3