View Single Post
  #12  
Old 01-13-2024, 12:31
cracki cracki is offline
Friend
 
Join Date: Oct 2003
Posts: 96
Rept. Given: 19
Rept. Rcvd 11 Times in 6 Posts
Thanks Given: 12
Thanks Rcvd at 11 Times in 5 Posts
cracki Reputation: 11
Quote:
Originally Posted by Levis View Post
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.
Thanks a lot for your guidance! The approach you suggested seems quite practical for my case

One other question:
How i can "resolve method using Method token" by HarmonyLib? is this possible?

Thanks again for the valuable insight!
Reply With Quote