Skip to content
KitploitKITPLOIT
工具博客
提交
工具博客
提交

黑客、渗透测试和网络安全工具,武装您的安全武器库!

Kitploit 是一个黑客、网络安全和渗透测试工具的目录。发现最新的项目更新,查找漏洞、分析系统、自动化测试并加强你的安全。

··订阅源·联系·隐私·© 2026 Kitploit

工具目录

分类

查看所有分类
Loading categories
DNCI — DNCI - .NET 代码注入器 | Kitploit
工具/GitHubGitHub/guibacellar/dnci
后渗透利用渗透测试红队
GitHubguibacellar/dnci

DNCI

DNCI - .NET 代码注入器

查看仓库
1492617年前Kitploit 审核通过

最受欢迎

查看全部 →

发现我们社区最常用的工具。

探索所有工具

浏览我们的工具集合

查看所有工具 →
分享

DNCI - Dot Net Code Injector

DNCI允许将.NET代码(.exe或.dll)远程注入到Windows的非托管进程中。

1. 项目结构

项目结构如下:

  • DNCI.Injector.Library - 注入库。包含所有注入组件和逻辑;
  • DNCI.Injector.Runner - 命令行注入工具;
  • DNCIClrLoader - 用于将.NET程序集加载到内存的C++微代码;
  • InjectDemo.Console.ClassicNet - 待注入的演示经典.NET控制台应用程序;
  • InjectDemo.Console.DotNetCore - 待注入的演示.NET Core控制台应用程序;
  • InjectDemo.Dll.ClassicNet - 待注入的演示经典.NET DLL;

2. 文档与使用说明:

2.1. 命令行工具文档

  • 参数:
    • --help 显示帮助信息
    • --assemblyFile <SOURCE_FILE_PATH> 目标.NET经典DLL文件
    • --className <TARGET_CLASS_NAME> 托管程序集的完全限定类型名称
    • --methodName <TARGET_CLASS_ENTRYPOINT_METHOD> 要执行的托管方法名称。例如:EntryPoint(该方法应为'public static int')
    • --argument <ENTRYPOINT_METHOD_ARGUMENT> 要传递给托管函数的可选参数
    • --targetMode <TARGET_MODE> 注入目标模式(BruteForce、PID、ProcessName)
    • --pid <TARGET_PROCESS_ID> 目标进程ID
    • --processName <TARGET_PROCESS_Name> 目标进程名称

示例

将经典.NET控制台应用程序注入到Notepad++

本示例使用了InjectDemo.Console.ClassicNet .exe文件。 DNCI.Injector.Runner.exe --assemblyFile "<PATH_TO_FILE>\InjectDemo.Console.ClassicNet.exe" --className InjectDemo.Console.ClassicNet.Program --methodName EntryPoint --targetMode=processName --processName notepad++ --argument "OK BOY"

将经典.NET控制台应用程序注入到进程ID为66的进程

本示例使用了InjectDemo.Console.ClassicNet .exe文件。 DNCI.Injector.Runner.exe --assemblyFile "<PATH_TO_FILE>\InjectDemo.Console.ClassicNet.exe" --className InjectDemo.Console.ClassicNet.Program --methodName EntryPoint --targetMode=PID --pid 66 --argument "OK BOY"

尝试将经典.NET控制台应用程序注入到任何正在运行的进程

本示例使用了InjectDemo.Console.ClassicNet .exe文件。 DNCI.Injector.Runner.exe --assemblyFile "<PATH_TO_FILE>\InjectDemo.Console.ClassicNet.exe" --className InjectDemo.Console.ClassicNet.Program --methodName EntryPoint --targetMode=BruteForce --argument "OK BOY"

2.2. 注入库文档

注入库设计供任何.NET程序使用。实际上,DNCI命令行工具本身就使用了DNCI库。

  • 类
    • Injector - 主注入组件;
    • InjectorConfiguration - 配置模型。旨在作为Injector与其使用者之间的抽象模型;
    • InjectorConfigurationBuilder - InjectionConfiguration模型的流式构建器;
    • InjectorResult - 结果模型。旨在作为Injector与其使用者之间的抽象模型;
    • InjectorResultStatus - 包含所有可能注入状态的枚举;

构建参数

将经典.NET控制台应用程序注入到远程进程

root@kitploit:~
Injector.Library.InjectorConfiguration config = Injector.Library.InjectorConfigurationBuilder
    .Instance()
    .InjectThisClrBinary(@"<PATH_TO_BINARY>\InjectDemo.Console.ClassicNet.exe")
    .ClrClassName("InjectDemo.Console.ClassicNet.Program")
    .ClrMethodName("EntryPoint")
    .WithArguments("OK - It Works Baby")
    .InjectOnProcess("cmd") // Try to Inject on cmd process
    .InjectOnProcess("chrome") // Try to Inject on chrome process
    .InjectOnProcess("cmd.exe") // Try to Inject on cmd.exe process
    .InjectOnProcess("calc") // Try to Inject on calc process
    .InjectOnProcess("notepad++")  // Try to Inject on notepad++ process
    .Build();

使用暴力模式将经典.NET DLL应用程序注入到任何可用进程

root@kitploit:~
Injector.Library.InjectorConfiguration config = Injector.Library.InjectorConfigurationBuilder
   .Instance()
   .InjectThisClrBinary(@"<PATH_TO_BINARY>\InjectDemo.Dll.ClassicNet.dll")
   .ClrClassName("InjectDemo.Dll.ClassicNet.Class1")
   .ClrMethodName("EntryPoint")
   .WithArguments("OK - It Works Baby")
   .InjectWithBruteForce()
   .Build();

运行注入器

root@kitploit:~
// Create Injector Instance
DNCI.Injector.Library.Injector injector = new Library.Injector(configBuilderconfig);

// Execute the Injection
List<InjectorResult> result = injector.Run();

// Print Injection Result on Console
foreach (InjectorResult res in result)
{
    Console.WriteLine(res);
}
下载工具