Personal computing discussed

Moderators: renee, Dposcorp

 
meerkt
Gerbil Jedi
Topic Author
Posts: 1754
Joined: Sun Aug 25, 2013 2:55 am

Encrypted volume in an .EXE that self-mounts?

Sat Feb 01, 2020 10:19 am

Anyone knows of something like VeraCrypt, but with a portable mounter exe that can use data appended to the exe?
Like an encrypted RAR/7z SFX, except that it mounts a volume instead of extracts.
 
Igor_Kavinski
Minister of Gerbil Affairs
Posts: 2077
Joined: Fri Dec 22, 2006 2:34 am

Re: Encrypted volume in an .EXE that self-mounts?

Sun Feb 02, 2020 6:14 am

meerkt wrote:
Anyone knows of something like VeraCrypt, but with a portable mounter exe that can use data appended to the exe?
Like an encrypted RAR/7z SFX, except that it mounts a volume instead of extracts.


You could use the SFX options in Winrar to cook up some script or command to run before and after extraction to do what you need.

For something a bit more hacker-y, you could embed both the encrypted volume and the EXE needed to mount it in your own EXE file written in C/C++. See the section "Embed Resources with CMake Resource Compiler (CMakeRC)" here: https://caiorss.github.io/C-Cpp-Notes/r ... table.html

You could program your EXE to extract both files out to some temp folder, run the command to mount the encrypted volume and unmount and delete the temp files on program exit. That means there needs to be a pause or input wait in your program while you are using the mounted volume.
 
meerkt
Gerbil Jedi
Topic Author
Posts: 1754
Joined: Sun Aug 25, 2013 2:55 am

Re: Encrypted volume in an .EXE that self-mounts?

Sun Feb 02, 2020 10:18 am

Looking for something existing, not to make it myself. :)

If it really doesn't exist, and I were to do it myself (cleanly), I think I'd modify VeraCrypt.
 
Igor_Kavinski
Minister of Gerbil Affairs
Posts: 2077
Joined: Fri Dec 22, 2006 2:34 am

Re: Encrypted volume in an .EXE that self-mounts?

Sun Feb 02, 2020 10:43 am

meerkt wrote:
Looking for something existing, not to make it myself. :)

If it really doesn't exist, and I were to do it myself (cleanly), I think I'd modify VeraCrypt.


That would be a fun, if somewhat "headache inducing" project, especially when you have to ensure your own data's integrity.
 
meerkt
Gerbil Jedi
Topic Author
Posts: 1754
Joined: Sun Aug 25, 2013 2:55 am

Re: Encrypted volume in an .EXE that self-mounts?

Sun Feb 02, 2020 12:36 pm

No integrity concerns. It would be the normal VeraCrypt I/O code, except that the data is in a file with an extra-large "header".
Read-only should be simple, read/write might require running a copy of the EXE.
 
Igor_Kavinski
Minister of Gerbil Affairs
Posts: 2077
Joined: Fri Dec 22, 2006 2:34 am

Re: Encrypted volume in an .EXE that self-mounts?

Sun Feb 02, 2020 1:08 pm

meerkt wrote:
No integrity concerns. It would be the normal VeraCrypt I/O code, except that the data is in a file with an extra-large "header".
Read-only should be simple, read/write might require running a copy of the EXE.


You sound pretty confident. Done anything like this in the past? Or are you the hotshot programmer of a well-known opensource/commercial software?
 
Redocbew
Minister of Gerbil Affairs
Posts: 2495
Joined: Sat Mar 15, 2014 11:44 am

Re: Encrypted volume in an .EXE that self-mounts?

Sun Feb 02, 2020 1:13 pm

meerkt wrote:
Anyone knows of something like VeraCrypt, but with a portable mounter exe that can use data appended to the exe?
Like an encrypted RAR/7z SFX, except that it mounts a volume instead of extracts.


Can I ask the obvious question of why this needs to be a packaged into single application? As much I like tinkering with esoterica there's a point where I'm ready to put the mad science aside and just get things done.
Do not meddle in the affairs of archers, for they are subtle and you won't hear them coming.
 
meerkt
Gerbil Jedi
Topic Author
Posts: 1754
Joined: Sun Aug 25, 2013 2:55 am

Re: Encrypted volume in an .EXE that self-mounts?

Sun Feb 02, 2020 1:59 pm

Intended use: sending stuff to non-techies.

Igor_Kavinski wrote:
You sound pretty confident.

Ultimately it's just adding an offset to your I/O.
 
Igor_Kavinski
Minister of Gerbil Affairs
Posts: 2077
Joined: Fri Dec 22, 2006 2:34 am

Re: Encrypted volume in an .EXE that self-mounts?

Sun Feb 02, 2020 3:15 pm

meerkt wrote:
Intended use: sending stuff to non-techies.

An unintended consequence might be a new generation of malware if one of your self mounting SFX packages finds its way into the hands of an intrepid hacker/cracker.

meerkt wrote:
Igor_Kavinski wrote:
You sound pretty confident.

Ultimately it's just adding an offset to your I/O.


Out of curiosity, how would you do that? Base64 of your encrypted volume added to the source file (but that would be kinda dumb) or using a resource hacker? Or linking the volume into the EXE using the linker (just guessing. No idea if that is possible)?
 
meerkt
Gerbil Jedi
Topic Author
Posts: 1754
Joined: Sun Aug 25, 2013 2:55 am

Re: Encrypted volume in an .EXE that self-mounts?

Sun Feb 02, 2020 4:31 pm

VeraCrypt is open source. Malware writers are more than capable (and familiar with encryption). But anyway it's basic.

Ignoring the code changes, if you mean how to add random data to EXEs, I'd just append: copy /b mounter.exe + vc-volume.bin
(I think that's also what RAR and 7zip SFXes do).
 
Igor_Kavinski
Minister of Gerbil Affairs
Posts: 2077
Joined: Fri Dec 22, 2006 2:34 am

Re: Encrypted volume in an .EXE that self-mounts?

Sun Feb 02, 2020 6:49 pm

meerkt wrote:
Ignoring the code changes, if you mean how to add random data to EXEs, I'd just append: copy /b mounter.exe + vc-volume.bin
(I think that's also what RAR and 7zip SFXes do).


Wow. That actually works. I learned something awesome and new. Thanks!

Who is online

Users browsing this forum: Google [Bot] and 1 guest
GZIP: On