Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Preventing Resource DLLs from being hacked

I develop in C++/MFC and have placed all the resources in a separate DLL.

I have seen cases where the resource DLL is modified and the product is sold illegally with different name, graphics etc.

How do I prevent the resource DLL from being modified/hacked?

like image 266
Gautam Jain Avatar asked Nov 27 '25 22:11

Gautam Jain


2 Answers

Sign it and then check thef signature is valid and there. I would use some sort of official certificate for the company but a self-signed will do.

A quick google turned up:

Digital Code Signing Step-by-Step Guide (altho it looks like it's for Office XP)

Prevent DLL Tampering on Windows Apps

UPDATE:

It also pays to sign the EXE as well.

As pointed out in the comment, there is no way you can stop someone with enough skill from tampering with your application. It's all about risk management. How much to you want to 'risk' someone tampering with your application. Is it worth the time and effort to rise the bar so that you need a more highly skilled person to temper with your application? That's up to you.

I would at least sign all your code files that you release anyway. It verifies that those files come from you and have not been tampered with.

like image 154
Shane Powell Avatar answered Nov 29 '25 11:11

Shane Powell


If you trust your app you could just calculate a hash on your resource dll before shipping and reject dll:s with other hashes.

like image 38
Alexander Torstling Avatar answered Nov 29 '25 11:11

Alexander Torstling



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!