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

Reply
 
Thread Tools Display Modes
  #1  
Old 28-03-2024, 05:36
Cuttlas's Avatar
Cuttlas Cuttlas is offline
Registered User
 
Join Date: Aug 2020
Location: Near You :)
Posts: 62
Thanks: 19
Thanked 8 Times in 4 Posts
Cuttlas is on a distinguished road
Password protected Files while Extracting

I tried to extract this setup (which is created by Inno setup) using Inno Extractor 7.3:

https://dl2.soft98.ir/soft/j-k-l/K-L...rar?1711629087

but when I try to extract a file, It will prompt me for a password!!!

The setup files such as the wizard images and iss file can be extracted but the files that should be installed can not be extracted and need a password!!!

I do not need to retrieve the password.

I just need to know how to make such an inner password-protected setup.

thank you brothers.
Attached Images
File Type: png sshot-1ddff.png (55.8 KB, 116 views)
Reply With Quote
Sponsored Links
  #2  
Old 28-03-2024, 06:32
KaktoR's Avatar
KaktoR KaktoR is offline
Lame User
 
Join Date: Jan 2012
Location: From outer space
Posts: 4,419
Thanks: 1,078
Thanked 7,034 Times in 2,663 Posts
KaktoR is on a distinguished road
Try this
Code:
[Setup]: Password
Description:
Specifies a password you want to prompt the user for at the beginning of the installation.

When using a password, you might consider setting Encryption to yes as well, otherwise files will be stored as plain text and it would not be exceedingly difficult for someone to gain access to them through reverse engineering.

The password itself is not stored as clear text; it's stored as a 160-bit SHA-1 hash, salted with a 64-bit random number. (Note: When encryption is enabled, this stored hash is not used for the encryption key; a different hash with a different salt is generated for that.)
__________________
Haters gonna hate
Reply With Quote
  #3  
Old 28-03-2024, 07:14
Cuttlas's Avatar
Cuttlas Cuttlas is offline
Registered User
 
Join Date: Aug 2020
Location: Near You :)
Posts: 62
Thanks: 19
Thanked 8 Times in 4 Posts
Cuttlas is on a distinguished road
Quote:
Originally Posted by KaktoR View Post
Try this
Code:
[Setup]: Password
Description:
Specifies a password you want to prompt the user for at the beginning of the installation.

When using a password, you might consider setting Encryption to yes as well, otherwise files will be stored as plain text and it would not be exceedingly difficult for someone to gain access to them through reverse engineering.

The password itself is not stored as clear text; it's stored as a 160-bit SHA-1 hash, salted with a 64-bit random number. (Note: When encryption is enabled, this stored hash is not used for the encryption key; a different hash with a different salt is generated for that.)
thank you bro, but it will ask for the password while installing, I need to encrypt files with the password just to avoid extracting via extra tools. I do not need to ask password from the user during normal installation. how to bypass it?
Reply With Quote
  #4  
Old 28-03-2024, 09:24
shazzla shazzla is offline
Registered User
 
Join Date: Nov 2010
Location: Hunnia
Posts: 273
Thanks: 503
Thanked 95 Times in 72 Posts
shazzla is on a distinguished road
Imho innosetup cant do this.
Instead of it,create an .arc archive with pw and extract it via innosetup. Just like a game-repack...
Reply With Quote
  #5  
Old 28-03-2024, 09:43
Cuttlas's Avatar
Cuttlas Cuttlas is offline
Registered User
 
Join Date: Aug 2020
Location: Near You :)
Posts: 62
Thanks: 19
Thanked 8 Times in 4 Posts
Cuttlas is on a distinguished road
Quote:
Originally Posted by shazzla View Post
Imho innosetup cant do this.
Instead of it,create an .arc archive with pw and extract it via innosetup. Just like a game-repack...
it seems K-Lite Codec Pack Mega have done it using inno setup without .arc
Reply With Quote
  #6  
Old 28-03-2024, 13:52
Cesar82's Avatar
Cesar82 Cesar82 is online now
Registered User
 
Join Date: May 2011
Location: Brazil
Posts: 1,035
Thanks: 1,743
Thanked 2,220 Times in 759 Posts
Cesar82 is on a distinguished road
Quote:
Originally Posted by Cuttlas View Post
it seems K-Lite Codec Pack Mega have done it using inno setup without .arc
The installer uses Inno Setup's own encryption using the ISCrypt.dll library (Just add it to the Inno Setup folder and define "Encryption=yes" in the [Setup] section of the script
"Password=123").
I don't know if it is possible to unpack an installer that uses this encryption library, however the K-kite Codec Pack installer does not ask the user to enter the password.
The Password is internally in the executable code and is inserted into WizardForm.PasswordEdit when calling the "CurPageChanged" function.

I tested the installer executable "K-Lite_Codec_Pack_1820_Mega.exe" here and discovered that its password is:
Code:
fJYYzCYYSj2VWssUVrWW5oskvCs1Yzzf2zzSWWWVs5IvzYI2IWnsnzzI0nC052vd
I tested other older versions such as 17.25 Mega, 17.66 Mega and the same password works.

Last edited by Cesar82; 28-03-2024 at 13:55.
Reply With Quote
  #7  
Old 28-03-2024, 18:54
Cuttlas's Avatar
Cuttlas Cuttlas is offline
Registered User
 
Join Date: Aug 2020
Location: Near You :)
Posts: 62
Thanks: 19
Thanked 8 Times in 4 Posts
Cuttlas is on a distinguished road
could you please tell me how did you test and how did you retrieve the password?
Reply With Quote
  #8  
Old 29-03-2024, 02:51
BLACKFIRE69's Avatar
BLACKFIRE69 BLACKFIRE69 is offline
Registered User
 
Join Date: Mar 2019
Location: In the Hell
Posts: 673
Thanks: 479
Thanked 2,421 Times in 547 Posts
BLACKFIRE69 is on a distinguished road
Quote:
Originally Posted by Cuttlas View Post
could you please tell me how did you test and how did you retrieve the password?

here,

.
Attached Images
File Type: jpg 00.jpg (23.6 KB, 94 views)
Attached Files
File Type: rar KLiteDecryptKey.iss.rar (2.2 KB, 27 views)
Reply With Quote
  #9  
Old 29-03-2024, 04:41
Cuttlas's Avatar
Cuttlas Cuttlas is offline
Registered User
 
Join Date: Aug 2020
Location: Near You :)
Posts: 62
Thanks: 19
Thanked 8 Times in 4 Posts
Cuttlas is on a distinguished road
@BLACKFIRE69, thank you bro for your script. Nice job,

but how to get: CIR = '2vdJwYqCkY5jWVGs5UerJW3oqk5CM1GznfrzESjWtVm5evLY0 2RWYsvzUIPnP0mm'?

how did you obtain [CompiledCode.bin]? I'm currently using Inno Extarctor and it does not provide me a code bin, it is empty!
Reply With Quote
  #10  
Old 29-03-2024, 07:25
Cesar82's Avatar
Cesar82 Cesar82 is online now
Registered User
 
Join Date: May 2011
Location: Brazil
Posts: 1,035
Thanks: 1,743
Thanked 2,220 Times in 759 Posts
Cesar82 is on a distinguished road
I arrived at code like this:
Code:
function CX(lpKey: String): String;
var
  I, Y: Integer;
  S1, S2: String;
begin
  S1 := lpKey;
  for I := 0 to 17 do
  begin
    for Y := 16 to 47 do
    begin
      S2 := S2 + S1[(I + Y) mod 63 + 1] + lpKey[(I + Y) * 2 mod 63 + 1];
    end;
    S1 := S2;
    S2 := '';
  end;
  Result := S1;
end;

function InitializeSetup(): Boolean;
begin
  SaveStringToFile('Password.txt', CX('2vdJwYqCkY5jWVGs5UerJW3oqk5CM1GznfrzESjWtVm5evLY02RWYsvzUIPnP0mm'), False);
  Result := False;
end;
To obtain the code from CompiledCode.bin, "Inno Setup Decompiler 1.5" was used

P.S: "Inno Setup Decompiler 1.5" is also included in the Inno Setup repack that I shared in the DiskSpan GUI thread.

@BLACKFIRE69, could you tell us which software you used to extract the code from CompiledCode.bin?
Reply With Quote
The Following 2 Users Say Thank You to Cesar82 For This Useful Post:
Behnam2018 (29-03-2024), shazzla (29-03-2024)
  #11  
Old 29-03-2024, 10:02
Behnam2018 Behnam2018 is offline
Registered User
 
Join Date: Jun 2018
Location: IRAN
Posts: 58
Thanks: 955
Thanked 24 Times in 20 Posts
Behnam2018 is on a distinguished road
Wink find the password

Hello, I want to find the password of this file
Attached Images
File Type: jpg Capture.JPG (39.2 KB, 83 views)
File Type: jpg Capture2.JPG (14.9 KB, 79 views)
Reply With Quote
  #12  
Old 30-03-2024, 08:43
Joe Forster/STA's Avatar
Joe Forster/STA Joe Forster/STA is offline
Senior forum member
 
Join Date: Nov 2000
Location: Hungary
Posts: 9,800
Thanks: 16
Thanked 329 Times in 214 Posts
Joe Forster/STA is on a distinguished road
Quote:
Originally Posted by Cuttlas View Post
how did you obtain [CompiledCode.bin]? I'm currently using Inno Extarctor and it does not provide me a code bin, it is empty!
You can extract it with the following command line:

Code:
innounp -x -m K-Lite_Codec_Pack_1820_Mega.exe embedded\CompiledCode.bin
Open this in Inno Setup Decompiler and export the disassembled code into Pascal source. You will find the "CIR" variable (unscrambled password, the installer is not protected by it, you need to scramble it first) as the result of the "BX()" function and the password scrambler function is called "CX()".

(This is fun! )
__________________
Joe Forster/STA
For more information, see the FileForums forum rules and the PC Games forum FAQ!
Don't contact me via E-mail or PM to ask for help with anything other than patches (or software in general) done by me, otherwise your request may be deleted without any reply!
Homepage: http://sta.c64.org, E-mail: [email protected]; for attachments, send compressed (ZIP or RAR) files only, otherwise your E-mail will bounce back!
Reply With Quote
The Following 2 Users Say Thank You to Joe Forster/STA For This Useful Post:
Behnam2018 (30-03-2024), shazzla (30-03-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
Question about extracting, encoding and rebuilding ".usm" files. L33THAK0R Conversion Tutorials 5 22-04-2021 23:41
Inno Setup + ISDone Extracting files buttignol PC Games - CD/DVD Conversions 11 28-02-2013 17:31
How to Edit CAB files Grumpy PC Games 12 24-02-2013 10:47
Having problems extracting .001-.0?? files... Tamahome_ DC Games 2 03-09-2003 20:16
HOW CAN I CORRECT CRC ERRORS ON .ZIPS & SELF EXTRACTING FILES? thetamal PC Games 1 05-11-2001 18:23



All times are GMT -7. The time now is 21:01.


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