
DNCI - Injecteur de code .NET
DNCI permet l'injection de code .Net (.exe ou .dll) à distance dans des processus non gérés sous Windows.
Le projet est structuré en :
Injecter une application console Classic .Net dans Notepad++
Cet exemple utilise le fichier 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"
Injecter une application console Classic .Net dans le processus avec l'ID 66
Cet exemple utilise le fichier 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"
Essayer d'injecter une application console Classic .Net dans n'importe quel processus en cours
Cet exemple utilise le fichier 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"
La bibliothèque d'injection a été conçue pour être utilisée par n'importe quel programme .Net. En fait, l'utilitaire en ligne de commande DNCI utilise lui-même la bibliothèque DNCI.
Injecter une application console Classic .Net dans un processus distant
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();
Force brute pour injecter une application DLL Classic .Net dans n'importe quel processus disponible
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();
// 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);
}