Exetools

Exetools (https://forum.exetools.com/index.php)
-   General Discussion (https://forum.exetools.com/forumdisplay.php?f=2)
-   -   .NET dll hooking (https://forum.exetools.com/showthread.php?t=20639)

Avi_RE 09-26-2023 19:04

.NET dll hooking
 
Hello Mate
Anyone know how to hook x64 .Net dlls. I tried several github projects but no luck

https://i.ibb.co/bQ3XWVL/ee.jpg

Thanks:)

Kurapica 09-26-2023 19:17

you should try to unpack/deobfuscate it.

Avi_RE 09-26-2023 20:40

There are some CRC checks in the file so I need to create a hook DLL

NON 09-26-2023 21:50

Quote:

Originally Posted by Avi_RE (Post 128486)
There are some CRC checks in the file so I need to create a hook DLL

Just create a loader, or, better yet, try and patch the CRC checks.
DnSpy will take you far in your venture.
Dnlib will be useful for your actual patching. It is worth learning all about this library.

Kurapica 09-27-2023 01:25

.NET dlls don't have EXPORTS like native DLLs, what do you want to hook exactly ?

Avi_RE 09-27-2023 02:45

Yes, you are right.
I made some changes in .net DLL but when I run application with modified Files it's not working properly.
If i make changes is runtime via dnspy it's working fine
That's why I need to create a Hook for .net DLLs

zerotimer 09-27-2023 04:03

Do you only have .NET dll or do you also have an executable which loads DLL?

Avi_RE 09-27-2023 11:29

Yes executable loads DLL files .
This is a software and i need to patch the DLL to bypass the license check.
The launcher is .NET but most of the code is in C++ libraries. I'm not sure if .NET tries to load version.dll like a typical binary would.

sendersu 09-27-2023 16:55

if you want to hook .net managed functions - consider using a library named Harmony2

blue_devil 09-27-2023 19:34

Harmony is a library for patching, replacing and decorating .NET methods during runtime.

Code:

https://harmony.pardeike.net/
https://github.com/pardeike/Harmony


Especialista 09-28-2023 07:09

Sometimes the software checks to see if Harmony is used, so this does not always work. This is more common for games and modules which have license checks. It's best to do a little custom patching or hooking instead of relying on external libraries.


All times are GMT +8. The time now is 20:32.

Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2026, vBulletin Solutions, Inc.
Always Your Best Friend: Aaron, JMI, ahmadmansoor, ZeNiX