This is a minimal console injector for frida-clr (Frida .NET bindings), designed for automation and repeatability providing CLI arguments.
For a 32-bit target process, you need an x86 Frida.dll.
This project expects the following path by default:
dist-x86\bin\Frida.dll
If your Frida.dll lives somewhere else, edit the <HintPath> in:
Your injector process must match the target process bitness:
- 32-bit target -> build/run injector as x86
- 64-bit target -> build/run injector as x64
If the target process is elevated / high integrity, run the injector elevated too.
-
Open InjectorCli.sln in Visual Studio and build.
-
Or from a Developer Command Prompt, run the command:
msbuild InjectorCli.sln /p:Configuration=Release /p:Platform=x86
- Attach by PID:
FridaClrInjector.exe --pid 1234 --script hooks\hook_messagebox.js
- Attach by process name (first match):
FridaClrInjector.exe --name notepad.exe --script hooks\hook_createfilew.js
- Spawn suspended, inject, then resume:
FridaClrInjector.exe --spawn "C:\Windows\SysWOW64\notepad.exe" --script hooks\hook_createfilew.js
- Spawn with args (args are parsed using Windows
CommandLineToArgvWrules):
FridaClrInjector.exe --spawn "C:\Path\to\app.exe" --args "--flag \"value with spaces\"" --script hooks\hook_createfilew.js
frida-clrdelivers callbacks (e.g.script.Message) on a WPFDispatcher.- WPF apps already have a dispatcher loop, but console apps do not.
- This injector creates a dedicated STA thread and runs
Dispatcher.Run()so Frida events can be marshalled correctly.
See additional docs: