Build Release | x86 so the EXE is a 32-bit .NET Framework program.
Run it and note the PID it prints.
You can now attach to it with InjectorCli.
- Press
Min the target to show a message box. - Attach and trace:
FridaClrInjector.exe --pid <PID> --script hooks\hook_messagebox.js- Press
Fin the target to write a temp file. - Attach and trace:
FridaClrInjector.exe --pid <PID> --script hooks\hook_createfilew.js- Build
ManagedHookHostProjasRelease | x86. - Edit hook_managed.js:
helperDllPath: path toManagedHookHostProj.dlltargetAssemblyPath: path toTestTarget32.exetargetTypeName:TestTarget32.PotatoVerifiertargetMethodName:CheckIsPotatoparamSig:System.String(orSystem.String|System.Int32)
- Run the injector:
FridaClrInjector.exe --pid <PID> --script "C:\path\to\hook_managed.js"- Press
PorOin the target and you should see[script] ...messages for enter/leave.