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
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.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With