Binary patching is something you just have to do sometimes. Done this now twice for actual production purposes. Sometimes you can't compile without excessive amount of work even if you have the source code!
A lot more when I was younger for some other purposes, like making some (non-multiplayer) games behave differently, like never losing lives.
I've had to do it once in production for an old application without source, but the changes were substantial enough that I opted to write a wrapper dll for one of the dependencies. Once in it's easy to hook whatever else is needed and add major modifications.
This has some potential to be similar in philosophy to the ‘strangling a service’ process. Use a wrapper and slowly move the functionality away, until one day you can turn off the old service.
6 comments
[ 2.9 ms ] story [ 23.1 ms ] threadA lot more when I was younger for some other purposes, like making some (non-multiplayer) games behave differently, like never losing lives.
I've had to do this a couple of times (usually due to fraudulent transitive dependecies[0]). Eg:
0: eg, libfoo build-depends on X in libbar, and Y in libbar depends on something evil like systemdHowever, the patched DLL is still be missing ASLR/DEP, which is suboptimal.