This commit is contained in:
nihilist 2024-11-04 14:04:40 +01:00
parent 48013fc5f6
commit 3d6d6e34a1
6 changed files with 134 additions and 40 deletions

View File

@ -288,7 +288,7 @@
<ol>
<li><a href="veracrypt/index.html">✅ The main source of Plausible Deniability: Deniable Encryption</a></li>
<li><a href="tailsqemuvm/index.html">✅ Tails OS QEMU VM for Temporary Sensitive Use</a></li>
<li><a href="livemode/index.html"> Using the Host-OS in live-mode to prepare for long-term Sensitive Use</a></li>
<li><a href="livemode/index.html"> Using the Host-OS in live-mode to prepare for long-term Sensitive Use</a></li>
<li><a href="sensitivevm/index.html">🟠 Sensitive use VMs Setup (Whonix VMs in a Veracrypt Hidden Volume)⭐</a></li>
<li><a href="plausiblydeniabledataprotection/index.html">🟠 Plausibly Deniable Critical Data Backups</a></li>
</ol></br>

BIN
opsec/livemode/1.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 376 KiB

BIN
opsec/livemode/2.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 522 KiB

View File

@ -63,7 +63,6 @@
<a href="../index.html">Previous Page</a></br></br><p><img src="../../assets/img/user.png" width="50px" height="50px"> <ba>nihilist@mainpc - 2024-11-03</ba></p>
<h1>Using the Host-OS in live-mode to prepare for long-term Sensitive Use </h1>
<img src="../deniability/7.png" class="imgRz">
<p> </p>
</div>
</div><!-- /row -->
@ -75,24 +74,17 @@
<div class="container">
<div class="row">
<div class="col-lg-8 col-lg-offset-2">
<h2><b>Initial Setup </b></h2>
<p></p>
<img src="" class="imgRz">
<pre><code class="nim">
</code></pre>
<p></p>
<img src="" class="imgRz">
<pre><code class="nim">
</code></pre>
<p></p>
<img src="" class="imgRz">
<pre><code class="nim">
</code></pre>
<h2><b>What is the usecase ?</b></h2>
<p>The main usecase of using your Host OS in live mode, is that you want to use it for long term sensitive activities (meaning, you want to save sensitive files on a harddrive). <b>As you're going to see, using the Host OS in live mode is effectively a hard requirement for deniability</b>.</p>
<p>When we are talking sensitive use, we are talking about our need of Deniability. Which means that we need to use deniable encryption using <a href="../veracrypt/index.html">Veracrypt's hidden volumes</a>:</p>
<img src="../deniability/5.png" class="imgRz">
<p>In theory it is impossible to prove the existence of the hidden volume by itself once it is closed, <b>and if there is no proof of it's existence our deniability is maintained.</b> </p>
<p>But the issue is that we have more variables that we also need to keep under control, on the Host OS side you have <b>system logs, kernel logs</b>, the various other <b>non-standard log files</b> that software is writing on the disk, and even <b>the content of the RAM itself</b> can be used to prove the existence of a hidden volume.</p>
<p>Now when you are using your computer for regular public, private and anonymous activities, normally you don't need to care about those things. But the Host OS is a potential goldmine of forensic evidence to be used against you, <b>so for sensitive use specifically we need to take care of it.</b></p>
<p>Now you could start to manually erase all logs, all kernel logs, all non-standard system logs, manually overwrite the RAM contents, but this is going to be way too tedious and you're likely to miss something. So we have one simple solution: <b>use the Host OS in live mode</b>.</p>
<p>TODO: graph (regular host OS writes on system disk, and has contents in RAM, while live mode host OS does not write on system disk, and has everything in RAM) </p>
<p>Thanks to live mode, <b>we are able to load the entire Host OS in RAM directly</b>, allowing us to avoid writing anything on the system disk (no system logs, no kernel logs, no non-standard logs, <b>only ram contents to worry about</b>)</p>
<p>And since everything is loaded inside the RAM, <b>all we need is to reboot the computer to wipe all of the RAM contents</b>, effectively <b>erase all forensic evidence (and all potential forensic evidence) of the existence of the hidden volume in one simple action.</b></p>
</div>
</div><!-- /row -->
</div> <!-- /container -->
@ -102,24 +94,67 @@
<div class="container">
<div class="row">
<div class="col-lg-8 col-lg-offset-2">
<h2><b>Setup</b></h2> </br> </br>
<p></p>
<img src="" class="imgRz">
<h2><b>Setting up Live Mode</b></h2> </br> </br>
<p>To do so, we need to install Kickstart's apt repository to have the grub-live package:</p>
<pre><code class="nim">
nothing@debian-tests:~$ su -
Password:
root@debian-tests:~# wget https://www.kicksecure.com/keys/derivative.asc
--2024-11-04 07:22:22-- https://www.kicksecure.com/keys/derivative.asc
Resolving www.kicksecure.com (www.kicksecure.com)... 95.216.66.124, 64:ff9b::5fd8:427c
Connecting to www.kicksecure.com (www.kicksecure.com)|95.216.66.124|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 77312 (76K) [application/octet-stream]
Saving to: derivative.asc
derivative.asc 100%[=====================================>] 75.50K --.-KB/s in 0.1s
2024-11-04 07:22:22 (794 KB/s) - derivative.asc saved [77312/77312]
root@debian-tests:~# sudo cp ~/derivative.asc /usr/share/keyrings/derivative.asc
root@debian-tests:~# echo "deb [signed-by=/usr/share/keyrings/derivative.asc] https://deb.kicksecure.com bookworm main contrib non-free" | sudo tee /etc/apt/sources.list.d/derivative.list
deb [signed-by=/usr/share/keyrings/derivative.asc] https://deb.kicksecure.com bookworm main contrib non-free
root@debian-tests:~# sudo apt-get update -y
Hit:1 http://security.debian.org/debian-security bookworm-security InRelease
Hit:2 http://deb.debian.org/debian bookworm InRelease
Hit:3 http://deb.debian.org/debian bookworm-updates InRelease
Get:4 https://deb.kicksecure.com bookworm InRelease [62.0 kB]
Get:5 https://deb.kicksecure.com bookworm/main amd64 Packages [37.6 kB]
Get:6 https://deb.kicksecure.com bookworm/contrib amd64 Packages [509 B]
Get:7 https://deb.kicksecure.com bookworm/non-free amd64 Packages [917 B]
Fetched 101 kB in 1s (73.7 kB/s)
Reading package lists... Done
</code></pre>
<p>Then we install the grub-live package</p>
<pre><code class="nim">
root@debian-tests:~# sudo apt-get install grub-live -y
</pre></code>
<p>Once that's done, let's take a quick look at the mounted drives using the lsblk command:</p>
<pre><code class="nim">
nothing@debian-tests:~$ lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS
sr0 11:0 1 1024M 0 rom
vda 254:0 0 20G 0 disk
<b>├─vda1 254:1 0 19G 0 part /</b>
├─vda2 254:2 0 1K 0 part
└─vda5 254:5 0 975M 0 part [SWAP]
vdb 254:16 0 1G 0 disk
</code></pre>
<p>As you can see here, we are not yet in live mode, so you can see the vda1 system drive mounted in the root directory, meaning that by default everything that is written on the disk by the Host OS is actually being written into the disk, rather than the RAM. So let's reboot to get into live mode:</p>
<pre><code class="nim">
root@debian-tests:~# reboot now
</code></pre>
<p></p>
<img src="" class="imgRz">
<pre><code class="nim">
</code></pre>
<p>and then when you reboot your host OS, you should see that there is a new boot option to choose from grub:</p>
<img src="../deniability/7.png" class="imgRz">
<p></p>
<img src="" class="imgRz">
<pre><code class="nim">
</code></pre>
<p>So we select it to boot into the OS, and then we're in live mode!</p>
</div>
</div><!-- /row -->
@ -132,22 +167,81 @@
<div class="container">
<div class="row">
<div class="col-lg-8 col-lg-offset-2">
<h2><b>Setup</b></h2> </br> </br>
<p></p>
<h2><b>Testing Live Mode</b></h2> </br> </br>
<p>now we're back into the host OS in live mode, let's first open a terminal and validate that we are in live mode by running lsblk:</p>
<pre><code class="nim">
nothing@debian-tests:~$ lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS
sr0 11:0 1 1024M 0 rom
vda 254:0 0 20G 0 disk
<b>├─vda1 254:1 0 19G 0 part /usr/lib/live/mount/medium
│ /usr/lib/live/mount/rootfs/filesystem
│ /run/live/medium
│ /run/live/rootfs/filesystem</b>
├─vda2 254:2 0 1K 0 part
└─vda5 254:5 0 975M 0 part [SWAP]
vdb 254:16 0 1G 0 disk
</code></pre>
<p>Here you can see that we have the <b>/dev/vda1 system drive</b> mounted under the <b>/run/live</b> and <b>/usr/lib/live</b> directories, so basically now everything that is normally being written into the system disk (like system logs, kernel logs, non-standard logs, and every other file) <b>is instead being written into the RAM, and not writing on the system disk at all.</b> </p>
<p>To test this, we'll create a file in the system drive:</p>
<pre><code class="nim">
nothing@debian-tests:~$ vim test.txt
nothing@debian-tests:~$ cat test.txt
THis has been written in the system disk vda1 from live mode !
</code></pre>
<p>and then we will create a file in the <b>non-system drive /dev/vdb</b> (which contains a veracrypt hidden volume):</p>
<img src="1.png" class="imgRz">
<pre><code class="nim">
nothing@debian-tests:~$ lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS
sr0 11:0 1 1024M 0 rom
vda 254:0 0 20G 0 disk
├─vda1 254:1 0 19G 0 part /usr/lib/live/mount/medium
│ /usr/lib/live/mount/rootfs/filesystem
│ /run/live/medium
│ /run/live/rootfs/filesystem
├─vda2 254:2 0 1K 0 part
└─vda5 254:5 0 975M 0 part [SWAP]
<b>vdb 254:16 0 1G 0 disk
└─veracrypt1 253:0 0 499.9M 0 dm /media/veracrypt1</b>
nothing@debian-tests:~$ cd /media/veracrypt1/
nothing@debian-tests:/media/veracrypt1$ ls
lost+found
nothing@debian-tests:/media/veracrypt1$ vim test2.txt
nothing@debian-tests:/media/veracrypt1$ cat test2.txt
this is a test file written from live mode, into a non-system drive!
</code></pre>
<p></p>
<p>Then we simply reboot the host OS into regular non-live mode to check if our first test file on the system drive is gone, and if the second test file on the non-system drive has been effectively saved:</p>
<img src="2.png" class="imgRz">
<img src="" class="imgRz">
<p>And then we check that the first test file we created in the system drive is effectively not there anymore:</p>
<pre><code class="nim">
nothing@debian-tests:~$ lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS
sr0 11:0 1 1024M 0 rom
vda 254:0 0 20G 0 disk
├─vda1 254:1 0 19G 0 part /
├─vda2 254:2 0 1K 0 part
└─vda5 254:5 0 975M 0 part [SWAP]
vdb 254:16 0 1G 0 disk
└─veracrypt1 253:0 0 499.9M 0 dm /media/veracrypt1
nothing@debian-tests:~$ cat test.txt
cat: test.txt: No such file or directory
</code></pre>
<p></p>
<p>And then we check if the file we created in the non-system veracrypt hidden volume is effectively still there:</p>
<pre><code class="nim">
nothing@debian-tests:~$ cat /media/veracrypt1/test2.txt
this is a test file written from live mode, into a non-system drive!
</code></pre>
<p>And that's it ! we have now validated that running the Host OS in live mode could protect our veracrypt hidden volume's existence from being proven, protecting our deniability. </p>
</div>
</div><!-- /row -->
</div> <!-- /container -->

0
pull.sh Executable file → Normal file
View File

0
pushtoprod.sh Executable file → Normal file
View File