tuxwise 🇺🇦<p>(24/N) There are some best practices that will make it easier to answer threat modeling question #3, "What are you going to do about it?". These will help you protect a wide range of assets by taking care of your devices, so let's look at them first:</p><ol><li>Encrypt data at rest</li><li>Bootstrap your workplace</li><li>Actively maintain your devices</li><li>Secure your devices</li><li>Prepare for repair</li></ol><p><strong>1. Encrypt data at rest</strong></p><p>What can you achieve with intermediate knowledge, without fully descending into the rat hole?</p><p>⚠️ Caveat: this is best done when setting up <a href="https://mastodon.de/tags/Linux" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>Linux</span></a> on a new device. Modifying an existing installation on your own IMHO isn't advisable if you're not a seasoned user. If you still decide to venture into it, make SURE you have backed up all your assets, before following "howtos on the internet". You have been warned.</p><p>Likening your device to a medieval city:</p><p>1) Full-Disk Encryption (FDE) is like locking the "city gate". Most popular Linux distributions offer FDE during the installation process. FDE is also your last line of defense when your device gets stolen, or your disk fails and cannot be safely wiped before disposing of it. Use FDE. (Yes, technically, "Full" is not absolutely accurate. We'll leave it at that.)</p><p>2) Within your "city", there will likely be at least two "houses": the home of the admin account, and your personal home. Using FDE alone, the "doors" of these homes won't have any locks of their own. Possibly not a big deal with respect to the administrative account, but admins being able to access any of your non-public assets, even when you're not logged in, is probably not what you want.</p><p>While the specific steps depend on your preferred Linux distro, a "portable" solution is to create a separate, encrypted disk partition, and have it mounted as your user home directory, when you log in. That solution is based on cryptsetup and the pam_mount module, a nice tutorial example is:</p><ul><li>Linux Mint: <a href="https://cobertos.com/blog/post/linux-mint-luks-encrypted-user-home-directory" rel="nofollow noopener noreferrer" translate="no" target="_blank"><span class="invisible">https://</span><span class="ellipsis">cobertos.com/blog/post/linux-m</span><span class="invisible">int-luks-encrypted-user-home-directory</span></a></li></ul><p>3) Within your "house", you may wish to have a locked "chest", e.g. for your <a href="https://mastodon.de/tags/FYEO" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>FYEO</span></a> assets. There's essentially two options: a) a single, encrypted container file that acts as a "<a href="https://mastodon.de/tags/vault" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>vault</span></a>" for your asset files; or b) an encrypted overlay file system that maintains an openly visible directory hosting your encrypted assets, including directory structures, in the background; and allows you to mount a decrypted counterpart, for working on your assets.</p><p>a) A "vault", being a single file, is easy to copy and carry around, on arbitrary storage media, e.g. USB sticks. It doesn't reveal too much about its contents, but resizing it takes a little effort. Also, you can't "incrementally backup" content changes, just copy the whole, changed vault.</p><p>A nice tutorial for creating and using a vault using plain, standard cryptsetup is <a href="https://opensource.com/article/21/4/linux-encryption" rel="nofollow noopener noreferrer" translate="no" target="_blank"><span class="invisible">https://</span><span class="ellipsis">opensource.com/article/21/4/li</span><span class="invisible">nux-encryption</span></a> by <span class="h-card" translate="no"><a href="https://anticapitalist.party/@seth" class="u-url mention" rel="nofollow noopener noreferrer" target="_blank">@<span>seth</span></a></span> . If you <em>must</em> have a GUI for creating and mounting vaults, look at <a href="https://mastodon.de/tags/zuluCrypt" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>zuluCrypt</span></a> <a href="https://mhogomchungu.github.io/zuluCrypt/" rel="nofollow noopener noreferrer" translate="no" target="_blank"><span class="invisible">https://</span><span class="ellipsis">mhogomchungu.github.io/zuluCry</span><span class="invisible">pt/</span></a> – IMHO the app is still in need of a little polish, though.</p><p>b) An encrypted overlay file system allows for incrementally backing up changed assets, but exposes considerable metadata (rough file sizes, directory structures, modification dates).</p><p>The most widely used package for this is probably <a href="https://mastodon.de/tags/gocryptfs" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>gocryptfs</span></a>. Its "HowTo" is literally a one-pager: <a href="https://nuetzlich.net/gocryptfs/quickstart/" rel="nofollow noopener noreferrer" translate="no" target="_blank"><span class="invisible">https://</span><span class="ellipsis">nuetzlich.net/gocryptfs/quicks</span><span class="invisible">tart/</span></a></p><p>Start of this thread:<br><a href="https://mastodon.de/@tuxwise/113503228291818865" translate="no" rel="nofollow noopener noreferrer" target="_blank"><span class="invisible">https://</span><span class="ellipsis">mastodon.de/@tuxwise/113503228</span><span class="invisible">291818865</span></a></p><p><a href="https://mastodon.de/tags/ThreatModeling" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>ThreatModeling</span></a> <a href="https://mastodon.de/tags/4D" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>4D</span></a></p>