The lessons of this PDF are twofold:
1) You get a great extension to .NET role-based security APIs via Dan's code writings and 2) In the teach-you-how-to-do-it-but-at-your-own-risk! tradition of Dan Appleman, you learn how to introspect the .NET Framework class libraries and work with their internals. Or more to the point, with the internals of *any* reflectable .NET assembly.
Bottom line: If you like knowing internals and haven't tackled the Reflection namespaces in .NET yet, this is a good start. (You'll probably need reflection skills at some point anyway).
It's a great read!
I had to read this - touted as the first volume in a series that could be for .NET what Appleman's books were for the Win32 API. But a fair bit of the ebook is just a guided tour of windows role based security, well written though.The core of the 'hijacking' part could be boiled down to a couple of pages. Essentially it's this:
Marking a class or method as private in .NET impacts its visibility, but not its security boundary - i.e. it is possible to invoke private methods.
And vs.net provides all the means necessary to do so:
Step One - navigate to the library/class you want with ildasm and have a peek at the IL. From that its pretty straightforward to grok the private objects/methods you might be interested in.
Step Two - use the InvokeMember method of the Type class to make use of private class/method.
That's it. Classic Win32 API Appleman this is not, how useful the technique is - I'm not sure (not so much in in commercial work i suspect), but it's still well worth a read.