Export files from Whonix to host without enabling an import-channel

Hi after having read the: File Transfer - Whonix and https://www.whonix.org/wiki/VirtualBox_Guest_Additions#Mount_Shared_Folder I could not find an option listed that explicitly allows for the exportation of files from whonix to host without enabling/allowing a way of importing files back into whonix.

My XYproblem is: I wish to export a certain amount files in the following manner:.

  1. By putting them into a certain folder /…/folderA
  2. Processing/transforming the files if necessary in order to get them across the boundary
    3a. Sending the files to a place that is reachable by the host.
  3. Having the host copy the files to a different folder inside the host /…/folderB

But I want to minimize the compromise to my security by not allowing a channel from host into Whonix.

So far the option:
a-“added usb device to virtualbox” is not a 1 way ticket.
b-Shared folder as suggested only contains an option to make it “read-only” for the guest, and not for the host

Perhaps I do not see the full possiblities of either option a, or b. If so please explain how I could make a mutual folder read only for the host and “write” for the guest.

Or delight me with a different option that allows the exportation of files from whonix to host without allowing the host inside whonix :slight_smile:

Good day,

This is possible using the “Guest Additions”, which are by default installed on Whonix, see: https://www.whonix.org/wiki/VirtualBox_Guest_Additions You may simply activate drag and drop/shared clipboard with the setting Guest to Host for accomplishing this.

Have a nice day,

Ego

Whonix - Overview applies. So this is a virtualizer / virtualization / host operating system specific question. Unspecific to Whonix.

Also look into Qubes. It doesn’t have shared folders but yet files can be securely copied from one VM to another.

But I want to minimize the compromise to my security by not allowing a channel from host into Whonix.
You do know, that once the host is compromised, so is every VM? (https://www.whonix.org/wiki/Pre_Install_Advice#Host_Security)
I could not find an option listed that explicitly allows for the exportation of files from whonix to host without enabling/allowing a way of importing files back into whonix.
Once you sent them to the host, just move them out of the shared folder. Then then VM has no more access.
b-Shared folder as suggested only contains an option to make it "read-only" for the guest, and not for the host
Consider a host operating system user name that lacks the required access rights for the folder for what you want to accomplish. (root will always be able to read it, but forbidden that makes little sense, since host compromise would compromise everything anyway.)

Thanks, it indeed appears to be one! ::slight_smile:

I’m currently first testing the manual drag and drop, which seems to be taking it’s time, however patience is a virtue.
That does not stop me from wondering where/if there is a specific folder located within Whonix in which I can copy the files so that I can either read them with windows from a folder or have them in the clipboard.

To find this folder I have searched:
A. “share” in Dolphin yielding:
-/usr/local/share
-/usr/share
-/mnt/shared

As potential hopefuls to be the actual shared folder or, how unlikely it may appear to be; the folder which will paste its contents to the clipboard of whonix and hence the host’s clipboard.

B. “share” in the kickoff application launcher yielding:
-no results perceived as potential.

C. “clip” in the kickoff application launcher yielding:
-klipper

An application which I hope allows for a folder to be pasted into the clipboard without mouse-manouvres.

So your answer already helped me a lot Ego, thanks. On top of your given option I am trying to look for an option that does not require any mouse-movements, for I wish to export the files periodically, and have a python script ready that can either move all the files to the required folder. (Or, if necessary, I’m sure I will be able to program it so that I can tell it to put the files/folder within the clipboard)

Currently text is transferred under the clipboard without a problem, the drag and drop does not seem to be functioning*. Nor does windows get anything in it’s clipboard after I explicitly copy a random file within dolphin within Whonix {concluded because the “paste” button after rmb in a folder in windows is still greyed out}. *That might be because it is still transferring the large initial file.
Despite the fact that I have both “shared clipboard” and “drag & drop” set to “Guest to host” for the running Whonix workstation.

I’ll try turning it on-and-off-again see if the drag and drop function does work after that. And work towards the goal of automated export from there. Thanks for the help!

-Edit thanks Patrick!
Qubes was actually indeed on the agenda for further improvement of the systems security, however for the xyproblem, it would be required to then export the files again out of qubes. That seems at the moment an unnecessary work-around for this issue.

However your take on "if your host’s system is compromised, so is your guest, regardless of whether I allow the host to write inside the guest or not was a very clever point of which I was not fully aware.
I guess my idea was to increase/not decrease the required effort to compromise the system if it’s not necessary by not letting any doors intentionally left open, whilst acknowledging that if an hypothetical would wish to enter it eventually could. Rendering the compromise inefficient for the hypothetical.

I cannot imagine how the presence of files or not has any influence on whether the host{That is what you mean by VM right*?} has access to a shared folder or not. Do you have a source/explenation on this mechanism? Or more practical for me; do you know where that shared folder is located within Whonix, once enabled in the settings in Virtualbox?

*If I’m reading it right, you’re telling me that once I remove the files from the shared folder with the host, the guest won’t have access to those files anymore.

Though true, that is not really of my concern, the guest is the source of the file, and I am actually solely concerned about anything the host could, against my will, put back into the guest through the shared folder. But that is prevented by the settings in Virtualbox as I’ve learned from Ego, and applied.
So thanks for your concern, and feel free to let me know if I understand your suggestion right.

I just comprehended your last suggestion, very clever, I like how you open up new insights. For my concern however, I am Windows bound (eventually). And going from the assumption of a compromised host, reducing the “write-rights” to a certain folder by the host, seems like an overcomable problem by the hypothetical.
Nevertheless it’s also a door I can shut, Thanks! :slight_smile:

Thanks for the help everyone, what eventually did the trick was:
Power off the virtual machine.[3] Go to VirtualBox -> Machine -> Settings -> Shared Folder -> choose a folder add new shared folder -> use folder name shared. Choose mount automatically and create permanently. option not available Press OK.
*should have marked “read only”

Power up the workstation. -> open Konsole -> type:“sudo mount -t vboxsf -o uid=1000,gid=1000 shared /mnt/shared” [enter] “password” [enter]

And it functioned. Moreover, the shared folder in Whonix was /mnt/shared and the shared folder on the host is manually chosen/entered in the 2nd tab after settings -> shared folder… in vitualbox in the host ::slight_smile:

Note. After powering up the workstation and re-attempting to add folder a shared folder, the option “mount permanently” is available in virtualbox.