Re:Any sufficiently advanced uninstaller is indistinguishabl...
by cornel_io on Wednesday September 13, 2023 @02:25AM
(#37492900)
For those of us who don't Windows, can you explain what a detour is?
[ Parent
| on HN ]
Re:Any sufficiently advanced uninstaller is indistinguishabl...
by coldtea on Wednesday September 13, 2023 @02:49AM
(#37493067)
Detours is a library for instrumenting arbitrary Win32 functions Windows-compatible processors. Detours intercepts Win32 functions by re-writing the in-memory code for target functions. The Detours package also contains utilities to attach arbitrary DLLs and data segments (called payloads) to any Win32 binary.
Detours preserves the un-instrumented target function (callable through a trampoline) as a subroutine for use by the instrumentation. Our trampoline design enables a large class of innovative extensions to existing binary software.
Re:Any sufficiently advanced uninstaller is indistinguishabl...
by IshKebab on Wednesday September 13, 2023 @04:16AM
(#37493705)
Interesting. Has anyone done the same thing on Linux?
Re:Any sufficiently advanced uninstaller is indistinguishabl...
by alaxapta7 on Wednesday September 13, 2023 @04:54AM
(#37494050)
I use and recommend subhook[0].
Re:Any sufficiently advanced uninstaller is indistinguishabl...
by jaclaz on Wednesday September 13, 2023 @04:43AM
(#37493946)
Only for the record, there is also easyhook:
Re:Any sufficiently advanced uninstaller is indistinguishabl...
by stevemk14ebr on Friday September 15, 2023 @02:36AM
(#37519302)
And my more sophisticated library, https://github.com/stevemk14ebr/PolyHook_2_0
Re:Any sufficiently advanced uninstaller is indistinguishabl...
by jborean93 on Wednesday September 13, 2023 @02:51AM
(#37493084)
You essentially replace a function with your own. The project is at https://github.com/microsoft/Detours.
I’ve created a PowerShell module that wraps this library to make it easier to hook functions on the fly for testing https://github.com/jborean93/PSDetour. For example I used it to capture TLS session data for decryption https://gist.github.com/jborean93/6c1f1b3130f2675f1618da5663... as well as create an strace like functionality for various Win32 APIs (still expanding as I find more use cases) https://github.com/jborean93/PSDetour-Hooks
Re:Any sufficiently advanced uninstaller is indistinguishabl...
by grepfru_it on Wednesday September 13, 2023 @03:42AM
(#37493449)
> as well as create an strace like functionality for various Win32 APIs
Yes please. Thank you for this