
DNCI는 윈도우의 비관리 프로세스에 .Net 코드(.exe 또는 .dll)를 원격으로 주입할 수 있습니다.
프로젝트는 다음과 같이 구성됩니다:
Classic .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"
Classic .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"
Classic .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"
주입 라이브러리는 모든 .Net 프로그램에서 사용할 수 있도록 설계되었습니다. 실제로 DNCI 명령줄 유틸리티는 DNCI 라이브러리 자체를 사용합니다.
Classic .Net 콘솔 애플리케이션을 원격 프로세스에 주입
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();
Classic .Net DLL 애플리케이션을 사용 가능한 모든 프로세스에 무차별 주입
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);
}