Go Back   FileForums > Game Backup > PC Games > PC Games - CD/DVD Conversions > Conversion Tutorials

Reply
 
Thread Tools Display Modes
  #1  
Old 12-05-2024, 03:29
BLACKFIRE69's Avatar
BLACKFIRE69 BLACKFIRE69 is offline
Registered User
 
Join Date: Mar 2019
Location: In the Hell
Posts: 670
Thanks: 471
Thanked 2,400 Times in 544 Posts
BLACKFIRE69 is on a distinguished road
Arrow How to Protect InnoSetup from Unpacking

How to Protect InnoSetup from Unpacking



* I was searching for a method to prevent InnoSetup from being unpacked by unpacking tools such as Innounp, InnoExtractor, innoextract, etc. I found some interesting things, such as modified versions of InnoSetup, old versions of InnoSetup, etc., and some utilities like InnoSProtect. However, I was unable to find a proper way to prevent unpacking with the latest vanilla version of InnoSetup. That's why I came up with this idea.

* I slightly modified FXPcker.exe, which can now store InnoSetup's encryption password, and we can also retrieve it using FXPckerAPI.dll whenever we want.


* So, what are FXPcker.exe and FXPckrAPI.dll?
  • Well, FXPacker is a data/resources protection tool created by me for the FMXInno project. It creates a password-protected and encrypted data file (often called 'Setup.dat') from the files that we need to hide from others to prevent theft. We place this Setup.dat file along with the Setup.exe, and using FXPckrAPI.dll, we can extract those files as local files or a stream.

  • If FXPckrAPI.dll allows extraction of data from the Setup.dat at any time, then anyone with the password can extract files from the Setup.dat file, right?

  • No, it works differently. Before creating a data file (Setup.dat), FXPckr.exe asks the client app (Setup.exe) from which we intend to extract encrypted files using FXPckrAPI.dll. Once we define this client app (Setup.exe), we have to use the same client app (Setup.exe) to extract the files from the Setup.dat.

  • You can create any custom client app using FXPckrAPI.dll, but you cannot extract any file from the Setup.dat, and it throws an error message "Unauthorized File Access." if you try.


That's basically how FXPckr protects data from theft.


* There's one thing: FXPckr.exe has an option called 'Debug Mode', which means if you enable it, the 'FXUnPckrInit' won't validate the client app anymore; it will only validate the password. During the testing stage of our script, we have to compile the script numerous times. This 'Debug Mode' helps us here because if it's off, then each time we compile the script, we have to create a new data file.
  • So, remember to disable the 'Debug Mode' and create a new Setup.dat file without Debug Mode enabled before you ship your Setup.exe.


------------------------------------------------------------------------------------------------------------------------------------------------------

* In the current case, I've modified FXPckr a little bit so we can store InnoSetup's encrypted password inside the Setup.dat and use it as follows to prevent unpacking:
  • Remember to use the 'noencryption' flag for 'FXPckrAPI.dll'. Here, I've used the InnoSetup's encryption password as 'krinkels.org', but you can use anything you want instead.

* First 'FXUnPckrInit' verifies the correct client app (as defined in FXPckr.exe ) and the encrypted password. If successful, we can use the 'FXUnPckrGetInnoEncryptedPasscode' function to retrieve InnoSetup's encrypted password.
  • In case 'FXUnPckrInit' fails, 'FXUnPckrGetInnoEncryptedPasscode' will output a string like 'FXPckr_Invalid_Str: 0x4B7C', meaning 'FXUnPckrInit' has failed.

* Please read the attached Readme files first; they provide step-by-step instructions on how to use this.



.
Attached Images
File Type: png 1.png (16.8 KB, 90 views)
File Type: png 2.png (16.2 KB, 89 views)
File Type: png 3.png (12.7 KB, 86 views)
File Type: png a.png (31.0 KB, 89 views)
File Type: png x.png (85.0 KB, 83 views)
File Type: png y.png (26.4 KB, 89 views)
File Type: png z.png (19.7 KB, 85 views)
Attached Files
File Type: rar FXPacker v2.0_Example.rar (1.62 MB, 25 views)
Reply With Quote
The Following 6 Users Say Thank You to BLACKFIRE69 For This Useful Post:
audiofeel (12-05-2024), Behnam2018 (12-05-2024), Cesar82 (12-05-2024), kenzo34 (12-05-2024), mausschieber (12-05-2024), ScOOt3r (12-05-2024)
Sponsored Links
  #2  
Old 12-05-2024, 04:43
Cesar82's Avatar
Cesar82 Cesar82 is offline
Registered User
 
Join Date: May 2011
Location: Brazil
Posts: 1,027
Thanks: 1,738
Thanked 2,197 Times in 751 Posts
Cesar82 is on a distinguished road
Good idea. Thanks!
The only problem is having to generate an external file to store the information (in this case Setup.dat).

Is the Setup.exe authenticity check when accessing the Setup.dat file done by checking the Setup.exe checksum?
Reply With Quote
The Following User Says Thank You to Cesar82 For This Useful Post:
Behnam2018 (12-05-2024)
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
InnoSetup Web Browsing - ISWebViewDll.dll : Embedding web content in InnoSetup BLACKFIRE69 Conversion Tutorials 0 05-02-2024 07:12
Windows Fluent Effects Standalone API - InnoSetup / VCL / FXM BLACKFIRE69 Conversion Tutorials 0 15-11-2023 18:35
protect inno setup against unpacking torax Conversion Tutorials 2 28-07-2023 08:04
DVD2VCD with CD Protect ?? lovables DVD Backup Forum 4 17-02-2004 15:58
make a reading protect file zanna86 CD/DVD Software & Utilities 0 24-02-2002 10:16



All times are GMT -7. The time now is 23:30.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Copyright 2000-2020, FileForums @ https://fileforums.com