<h1>Sensitive use VMs Setup (Whonix VMs in a Veracrypt Hidden Volume) </h1>
<imgsrc="0.png"class="imgRz">
<p>In this tutorial we're going to cover how to setup Whonix VMs for Sensitive use. This means that our <ahref="../opsec4levels/index.html">OPSEC requirement</a> is that <b>we need to be able to deny the existance of the Sensitive Whonix VM if the adversary ever gets access to our laptop.</b></p>
<p>Now the advantage of this setup, is that it is not going to actually destroy the computer, nor any sensitive data, you can keep using it even after triggering an emergency shutdown. </p>
<p><u>CONTEXT WARNING:</u> this setup is only suitable <b>if you are not going to be thrown in jail for just using Veracrypt.</b>, and if an adversary were to bust down your front door, <b>you need to have at least 5 seconds before he can see your laptop screen.</b></p>
<p>Here we're using a non-system drive, as we want to be able to store our veracrypt hidden volume contents in a persistent manner, accross reboots. (if we were to have the veracrypt volume on the system drive, it would be wiped off upon rebooting since the Host OS is in live mode.)</p>
<p>And in our veracrypt outer (decoy) volume, we're going to setup the veracrypt inner (hidden) volume, and set it to be 250Gb big:</p>
<imgsrc="12.png"class="imgRz">
<imgsrc="13.png"class="imgRz">
<imgsrc="14.png"class="imgRz">
<imgsrc="15.png"class="imgRz">
<imgsrc="16.png"class="imgRz">
<imgsrc="17.png"class="imgRz">
<imgsrc="18.png"class="imgRz">
<imgsrc="19.png"class="imgRz">
<imgsrc="20.png"class="imgRz">
<p>Now that the vercarypt volume has been setup, to highlight the mechanism, for the same harddrive, you have 2 passwords. Password A opens up the decoy volume, and Password B (which must remains secret, only to be known by you) opens up the hidden volume:</p>
<imgsrc="21.png"class="imgRz">
<imgsrc="22.png"class="imgRz">
<imgsrc="23.png"class="imgRz">
</div>
</div><!-- /row -->
</div><!-- /container -->
</div><!-- /white -->
<divid="anon2">
<divclass="container">
<divclass="row">
<divclass="col-lg-8 col-lg-offset-2">
<h2><b>Setting up the Hidden Volume</b></h2></br></br>
<p>So now let's setup the hidden volume, where we will put the Sensitive Whonix QEMU VMs:</p>
<imgsrc="24.png"class="imgRz">
<p>Then, we're going to download the Whonix VMs and configure them to be used from inside the hidden veracrypt volume: </p>
<p>and from here we create <b>script.sh</b> that we put inside the veracrypt hidden volume, we will use it to automatically either import or remove both VMs into virt-manager depending on wether they are already imported or not.</p>
<pre><codeclass="nim">
[ nowhere ] [ /dev/pts/1 ] [/mnt/veracrypt1]
→ vim script.sh
[ nowhere ] [ /dev/pts/0 ] [~]
→ cat /mnt/veracrypt1/script.sh
#!/bin/bash
if [ $(virsh -c qemu:///system list --all | grep Whonix | wc -l) -ne 0 ];
<p>So by default you have your QEMU VMs like so:</p>
<imgsrc="26.png"class="imgRz">
<p>And to run the script to import the VMs you do as follows:</p>
<pre><codeclass="nim">
[ nowhere ] [ /dev/pts/1 ] [/mnt/veracrypt1]
→ chmod +x script.sh
[ nowhere ] [ /dev/pts/1 ] [/mnt/veracrypt1]
→ ./script.sh
Network Whonix-External defined from Whonix-external.xml
Network Whonix-Internal defined from Whonix-internal.xml
Network Whonix-External marked as autostarted
Network Whonix-External started
Network Whonix-Internal marked as autostarted
Network Whonix-Internal started
Domain 'Whonix-Gateway' defined from Whonix-Gateway.xml
Domain 'Whonix-Workstation' defined from Whonix-Workstation.xml
</pre></code>
<p>From there you'll see that the Whonix VMs are imported:</p>
<imgsrc="27.png"class="imgRz">
<p>And now to remove them you can just run the same script again:</p>
<pre><codeclass="nim">
[ nowhere ] [ /dev/pts/1 ] [/mnt/veracrypt1]
→ ./script.sh
error: Failed to destroy domain 'Whonix-Gateway'
error: Requested operation is not valid: domain is not running
error: Failed to destroy domain 'Whonix-Workstation'
error: Requested operation is not valid: domain is not running
Domain 'Whonix-Gateway' has been undefined
Domain 'Whonix-Workstation' has been undefined
Network Whonix-External destroyed
Network Whonix-Internal destroyed
Network Whonix-External has been undefined
Network Whonix-Internal has been undefined
</pre></code>
<p>And you'll see that the VMs are no longer there:</p>
<imgsrc="26.png"class="imgRz">
</div>
</div><!-- /row -->
</div><!-- /container -->
</div><!-- /white -->
<divid="anon1">
<divclass="container">
<divclass="row">
<divclass="col-lg-8 col-lg-offset-2">
<h2><b>Setting up the Decoy volume</b></h2></br></br>
<p>Now that we have setup the hidden volume, let's close it so that we can setup the decoy volume (dont forget to exit the drive from the commandline, otherwise veracrypt will complain that the drive is busy):</p>
<pre><codeclass="nim">
[ nowhere ] [ /dev/pts/1 ] [/mnt/veracrypt1]
→ cd ..
[ nowhere ] [ /dev/pts/1 ] [/mnt]
→
</pre></code>
<p>Now first dismount the hidden volume:</p>
<imgsrc="28.png"class="imgRz">
<p>And then mount the decoy volume:</p>
<imgsrc="21.png"class="imgRz">
<p>In the decoy volume, we want content that makes sense to be kept hidden in an encrypted volume while still not being considered as sensitive (meaning nothing that can get you into trouble like adult content, or movies that you pirated):</p>
<p>So in this example we're going to pretend we have pirated some movies and got some adult content, that way we have an excuse as to why we have an encrypted veracrypt volume if ever forced by an adversary. We then create the script.sh which will basically be used to kill the media player window:</p>
<pre><codeclass="nim">
[ nowhere ] [ /dev/pts/1 ] [/mnt/veracrypt1]
→ vim script.sh
[ nowhere ] [ /dev/pts/1 ] [/mnt/veracrypt1]
→ chmod +x script.sh
[ nowhere ] [ /dev/pts/1 ] [/mnt/veracrypt1]
→ cat script.sh
#!/bin/bash
kill -9 $(pidof vlc)
</pre></code>
<p>If ever asked to by an adversary, we'll basically pretend that this script is there to quickly kill the media player window in case if someone were to enter the room while you were watching that not-sensitive-but-private content.</p>
<p>Now that we're done setting up both the hidden and the decoy volumes, we're going to setup the script that will launch either of the 2 script.sh scripts we just wrote, on top of also erasing all potential proof that the sensitive VM exists (meaning we erase all logs, all kernel logs, we fill the ram with random content 3 times, and we erase the command history): </p>
<p>First we need to make sure we can run veracrypt commands without requiring to be a sudo user:</p>
<p>Now from there (after a reboot) you wont require sudo passwords to use veracrypt anymore. Next we need to be able to remove all logs without being the root user:</p>
<p>Now that we're setup, we need to be able to run that script using a shortcut to be ran from our desktop environment, I am currently using Cinnamon, therefore to create a shortcut for cinnamon you do as follows:</p>
<imgsrc="30.png"class="imgRz">
<imgsrc="31.png"class="imgRz">
<imgsrc="32.png"class="imgRz">
<p>So basically from here, if you are not in a QEMU VM, you simply need to hit the shortcut <b>"SUPER+R"</b>.</p>
<p>If you are focused in a QEMU VM, you need to do <b>"CTRL+ALT"</b> (to focus out of the QEMU VM), and then <b>"SUPER+R"</b> to run the wipe.sh script from the Host OS.</p>
<imgsrc="37.png"class="imgRz">
<p>Now i'm also going to setup an optional shortcut <b>"Super+V"</b> to only run the /mnt/veracrypt1/script.sh script just so it is easier to setup the whonix VMs when inside the veracrypt hidden volume.</p>
<imgsrc="36.png"class="imgRz">
<p>And we're now all setup! So let's try it out in both scenarios (from the decoy volume, and from the hidden volume):</p>
<p>So first we open the veracrypt, and open the decoy volume:</p>
<imgsrc="21.png"class="imgRz">
<imgsrc="22.png"class="imgRz">
<p>Then we open VLC, and we hit "Open file" and browse to our non-sensitive files:</p>
<imgsrc="33.png"class="imgRz">
<imgsrc="34.png"class="imgRz">
<p>Then suddenly someone busts your front door, and you quickly press <b>"Super+R"</b>, the VLC window immediately closes, and in 4 seconds you have the Veracrypt volume unmounted and the veracrypt window closed. Meanwhile the wipe.sh script is doing the remaining cleaning up operations in the background, which it will complete under 30 seconds.</p>
<imgsrc=""class="imgRz">
<p>And that's it ! if the adversary didnt get to your desk by the time you pressed the shortcut, he didnt get to see the content you were playing on your monitor. </p>
<h2><b>Hidden Volume Scenario (using the sensitive VM)</b></h2>
<p></p>
<imgsrc="23.png"class="imgRz">
<imgsrc="24.png"class="imgRz">
<p>Once the hidden volume is mounted, we hit <b>"Super+V"</b> to quickly setup the whonix VMs:</p>
<imgsrc="38.png"class="imgRz">
<p>And after a while of doing some actual sensitive stuff on the whonix VM you hear your front door being busted down, so you quickly hit <b>"CTRL+ALT"</b> to focus out of the VM, and then you hit <b>"Super+R"</b> to trigger the emergency shutdown procedure:</p>
<imgsrc="39.png"class="imgRz">
<p>Here it also only takes 4 seconds after pressing <b>"Super+R"</b> to have your whonix VMs shutdown, and the veracrypt hidden volume closed, with the veracrypt window closed. And in the background, the script doing the remaining cleaning steps which will take 30 seconds to complete.</p>
<p>And that's it ! You now have a Sensitive VM ready to be used, and you have implemented the necessary measures to protect the deniability of it's existance, from an adversary.</p>
</div>
</div><!-- /row -->
</div><!-- /container -->
</div><!-- /white -->
<!-- +++++ Second Post +++++ -->
<divid="anon2">
<divclass="container">
<divclass="row">
<divclass="col-lg-8 col-lg-offset-2">
<h2><b>In what context is there Deniability ?</b></h2>
<p>With this setup, you have deniability the moment that the script finishes running, regarding the existance of the veracrypt hidden volume, and the whonix sensitive VMs. <b>Meaning that it is impossible for an adversary that seizes your computer to prove the existance of the Whonix Sensitive VMs after the wipe.sh script finished running.</b></p>
<p>Of course, if you are ever forced to, <b>ONLY give your decoy password to the adversary.</b> The existance of the hidden volume, and of the secret password thats used to reveal it must remain a secret at all costs, it must remain known only by you.</p>
<p>If you are ever dragged into court, <b>the judge will appreciate much more if you actually hand over your laptop, and show that you are willing to cooperate with the authorities by providing your password to unlock it</b>, rather than starting to pretend you forgot your password (which can end badly like in <ahref="https://lawblog.legalmatch.com/2018/07/23/florida-man-jailed-allegedly-forgetting-password-on-cell-phones/">this court case</a>, where the defendant was found to be in contempt of court, and thrown in jail for 6 months for it). </p>
<p>If ever asked by the authorities on why you used veracrypt in your laptop, you can simply claim that it was to put your stash of adult content in it. Nothing incriminating about it, and it is plausible given that you dont want that laying around on your desktop, due to being of a private matter.</p>
</div>
</div><!-- /row -->
</div><!-- /container -->
</div><!-- /white -->
<!-- +++++ Footer Section +++++ -->
<divid="anonb">
<divclass="container">
<divclass="row">
<divclass="col-lg-4">
<h4>Nihilism</h4>
<p>
Until there is Nothing left.</p></br></br><p>Creative Commons Zero: No Rights Reserved</br><imgsrc="\CC0.png">