Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Protection against Resource Hacker

Is there any way to protect Delphi program from Resource hacker . I don't want to use some sophisticated protection , I just don't want kids with resource hacker changing something in tool . I used exe compressors , UPX , Petite and mpress but after virus total scan I get 9/42 and if I saw that detection ratio on some other tool I wouldn't download it. Thanks

like image 368
Hijerarhija Uzasa Avatar asked Dec 20 '22 23:12

Hijerarhija Uzasa


2 Answers

The resources of a PE File are part of the internal structure (header) of the executable. so you can't hide them or make read-only. only you can check if the resources was modified, so to protect you resources against modifications you can

1.) Store a resource or a extenal file (encrypted) with the hash of the resources of your exe and when your app is initializated compare the stored hash with the current.

2.) You can store your resource encrypted, this can be done using a post build event or executing an external tool to encrypt your resources after of compile your exe and then when the App is initializated you can decrypt the resources in memory.

like image 113
RRUZ Avatar answered Dec 24 '22 01:12

RRUZ


If you don't want to use code signing, you could embed a MD5 sum (outside the resource, or use the cancel-out trick) somewhere and then check the resources for tampering by comparing to the MD5.

like image 22
Chris Thornton Avatar answered Dec 24 '22 02:12

Chris Thornton