Get access to AppDomain in another app?

2019-07-28 23:39发布

问题:

I'm trying to extend a freeware, proprietary piece of .Net 2.0 software, and it's been giving me grief. I successfully managed to inject a Win32 dll and get it to successfully load in the .Net dll into the primary app domain, but doing so caused their custom GUI system to lock up completely.

Is it possible to get a reference to a remote AppDomain (running in another app) and perform operations on it (e.g. load an assembly, create a class)?

The reason I'm asking is that I'm sure I saw something when I was poking around with the Win32 hosting API, but I can't find it again...

回答1:

What they say about security is totally true, however, there are some tools that can let you do what you want to (modify the app on runtime?)

Have a look at:

Cecil http://www.mono-project.com/Cecil

In simple English, with Cecil, you can load existing managed assemblies, browse all the contained types, modify them on the fly and save back to the disk the modified assembly.

Crack.NET http://cracknetproject.codeplex.com/

Once you find an object or type that you're interested in, you can manipulate it, and others, by writing and executing an IronPython script.

Cheers



回答2:

No, you won't get a reference to another AppDomain. AppDomains are isolated. Otherwise all the .NET code would be completely unsecured.