View Single Post
  #2  
Old 01-11-2024, 15:09
Levis Levis is offline
Family
 
Join Date: Mar 2012
Location: The Earth
Posts: 44
Rept. Given: 76
Rept. Rcvd 42 Times in 13 Posts
Thanks Given: 31
Thanks Rcvd at 51 Times in 23 Posts
Levis Reputation: 42
Quote:
Originally Posted by cracki View Post
Thanks a bunch for the tip!

My target is a .NET Core app without plugin support. What's the best way to inject LibHarmony Patcher?
One of examples in the docs that works on my case, involve npm, which seems odd for my case. Any other methods you know of?
Yes, all you need is to find a DLL or something that being called right before your target method, from the main executable, or any 3rd parties DLL,... then inject some small pieces of code to Reflective load your DLL into AppDomain, then you can do whatever you want, in this case, you're able to perform IL patch before the target method being called.
Remember that if your target is .NET Core, your hooking DLL must be .NET Core, too. Exact Runtime and exact version. For e.g, Target is .NET 6, then your code must be .NET 6, and so on.

If using function name is hard (when it's obfuscated), then you can try to resolve method using Method token. There is no big difference.
__________________
My Personal Blog:http://ltops9.wordpress.com
Reply With Quote
The Following User Says Thank You to Levis For This Useful Post:
niculaita (01-13-2024)