Running portable application located on external drive

Browser (Brave & Tor) were downloaded and extracted to a external folder which is mounted on /mnt. These tools are installed for portability as I do not use KickSecure only.

They work outside of KickSecure, which got me questioning…

What’s the catch ?

1 Like

What kind of catch?

Sharing programs with different operating systems? Then any malware infection could travel to each.

What I’m trying to achieve is to run brave browser & tor browser which I’ve downloaded from the official source. They’re both located in /mnt/brave and /mnt/tor respectively with permission code 0655.

I’ve tried running tor browser but got lots of permission denied error, fed up and deleted the whole partition. Well I think I’m calm enough to learn what have I done wrong. Yeah, just ignore me deleting the whole partition. Will download and set them up properly later

Is it possible for them to be infected if the directory itself only have read and execute permission ?

If the OS has malware that is running as root / administrator / SYSTEM / some other highly privileged user account depending on the particular OS you’re working with, then yes. Read-only flags are enforced in software only, and anything with high privileges on a system can turn off or even just ignore those flags. So if you’re going to do this, you should only share the drive between systems you trust to not have malware on them.

1 Like

The running operating system is KickSecure and the partition was created during one of the session, So I trust the files & operating system. The differences between the output of the specified software in different distribution is that KS basically output ‘permission denied’ while others runs them without any issue.

Recreating the issue can be rather simple. (# before line indicate it is to run with sudo)

# fdisk /dev/sdx; (input: 'n', 'enter'*2, '+4G', 'w')
# mkfs.ext4 /dev/sdx1;
# mount /dev/sdx1 /mnt;
# mkdir /mnt/{brave,tor};
# mv /path/to/brave /mnt/brave;
# mv /path/to/tor /mnt/tor;
/mnt/brave/brave;
/mnt/tor/firefox.real;

user needs write permission. If you want to have non-standard file system setup, things will be more difficult. No matter what file system. You need to learn Linux file permissions.

Any portable folder app requires write permission. Just set the correct owner.

sudo chown -R user:user /mnt

That shouldn’t be required. Applications should have correct permissions by default. Setting all to executable is wrong. Can only be restored with re-install of app.

chmod 700 or 770 if any but really shouldn’t be required manually.

Thank you very much for sharing these knowledge, but I wonder why the exact same applications works with the same permission on other main stream distributions. Do you know what’s the root of the problem ?

For your information, they do run / execute but got ‘permission denied’ all the time. It can be hard to describe it through words, so please try to replicate it.

Update: Changing permission code was what I did when I suspect that might be some kind of KickSecure hardening. Just an experiment.

required:

Impossible to say without above.

You should look into trying to create a persistence.conf for a Kicksecure USB, this might get you more towards what you want. It should work but I would like to get some others take on it.

Since it is debian based technically it should work I would think and has been an idea I would like to try.

Here is a guide from Kali linux but still applies:

Manpage for persistence.conf
https://manpages.debian.org/testing/live-boot-doc/persistence.conf.5.en.html

In most cases that’s true, in case of Kicksecure there is something important to point out about its initramfs generator. We have been replacing initramfs-tools with dracut - Development - Whonix Forum and persistence.conf is part of live-boot, which at time of writing only supports initramfs-tools. So the user would have to create a custom build with initramfs-tools or migrate an exiting image back to initramfs-tools.