Language Selection

English French German Italian Portuguese Spanish

Creating a runtime environment for access to important online accounts

by chinablue

Hopefully, most people know by now that its not really safe to access important accounts from the same install they do all their porn surfing from. Over time, cruft and malware can build up on such a system. Thankfully, Linux is a lot more resistant to these attacks, but you never know. Its important to remember that the best hack is never found. No matter what ironclad OS you're running, its best to take all the precautions you can.

Consensus opinion seems to favor Linux live CDs as being the safest environment from which to do important access. The CD is read-only, so it can't get hacked, and each boot starts from a known-clean environment.

The only problem with live CDs is that they are usually not configured the way you'd like. The browser's not set up right, and doesn't have all those security plugins you'd like to have. No host blocking is configured, and many distros come without a firewall installed by default. Of course, you could do all this configuration after boot, but then its not persistent, so you have to do it each time. And you might like to have some permanent storage to save off any documents you download, too.

One idea is to pick a good live CD and remaster it, adding your favorite apps and configuring better security. But remastering is not always easy, takes some time, and any time anything changes (a new browser version closing a hole, a new hosts file, firewall, etc.), you have to remaster all over again.

I think a better way to accomplish this job is to use a vanilla live CD, but in conjunction with writable storage like a USB key. Runtime configuration can be changed, and new versions of existing apps can be installed, from a script run from the USB device. And you can have permanent, encrypted storage for important documents.

Recently, I've heard several new Linux users, unfamiliar with using live CDs in this way, asking about it on various podcasts and forums. Below are some ideas I had for creating an environment like this.

Picking the live CD distro

To start with, pick a well-known, major distro for your live CD. I know there are many good distros put together by two twelve year olds in the garage, but that won't impress your bank. Its important to make sure the live CD itself is free of hacks, and you can be pretty certain that a live CD direct from Debian, Red Hat, or Novell will be, at least after you SHA the iso. But you never really know what two twelve year olds can get up to.

Creating the USB key

I have assumed a USB key, but the writable storage could also be a flash drive (or hard disk partition, if you must, but its better that not be in the computer when not in use).

1)The key should be mountable in the regular way, not loopback or loopback-encrypted. Any configuration information, setup scripts, and updated programs should be kept in the clear. The key should however contain an encrypted file for any important saved documents, which will be mounted loopback-encrypted.

2)Once mounted, the user can then run one script (from the USB device) which will perform the complete setup. Setup will include:

a)Mounting the encrypted file on the loopback device, with password.
b)Copying any host files, browser or other configuration information into the live system.
c)Executing the firewall script which installs the firewall in the running system.
d)Copying or linking to any new versions of software which may be placed on the key, as replacements for software on the liveCD.
e)Linking to the distinguished Documents directory on the USB key (i.e., the loopback-encrypted file), for automatic storage of downloaded data.

Copying hosts file and configuration information

The directory containing the browser configuration (.mozilla for Firefox, .gnuzilla for Icecat) contains all information necessary to configure the browser and its plugins. That is, although the browser on the live CD is unconfigured, replacing, e.g, the .mozilla directory in the vanilla runtime environment with a .mozilla from a fully configured Firefox will yield a fully configured Firefox in the liveCD environment.

rm -r $HOME/.mozilla && cp -r /.mozilla

should result in a fully configured browser with plugins. The user would be able to install additional plugins or do additional browser configuration in the live environment, but the configuration would have to be manually copied back to the USB key prior to shutdown.

Instead of copying in the configuration, linking could be done. This would let the user install additional browser plugins in the runtime environment and have them automatically carried over to the next boot. However, this might be somewhat dangerous, as the plugins are Javascript, and any hack to the plugins would be carried over as well.

At present, I'm not certain this technique will work for other browsers, like Chrome, although I suspect it will.

Copying or linking to new versions of software

Browser and other software upgrades can also be done on the fly from USB. This could be done by:

1)Copying

a)Placing the package (.deb, .rpm, etc.) on the USB key and running dpkg upgrade or similar from the script.

b)Installing a tarball version in the /opt directory of the running system, then deleting the .desktop file for the old version and creating one for the new version in $HOME/Desktop. This has the advantage that the act of changing the .desktop files will cause the proper icons to appear on the desktop (at least, in KDE, but doing this in GNOME should be investigated) .

1)Linking directly to a previously setup version on the key. However this has the disadvantage that the programs could become hacked as resident on the USB key. Copying the software into the live environment simulates the advantages of running from a liveCD, namely, always loading a clean version.

Linking to the Documents directory

Simply rm $HOME/Documents then link to the loopback device where the encrypted container is mounted. This mount could be noexec, so no executable corruption can occur. Linking should be done here, rather than relying on the user to remember to copy back any downloaded information before shutdown.

In Conclusion

Sounds like a fun little project to me. Shouldn't take much time to write it, for anyone who finds it useful. I'm too scared to do any of that stuff online anyway.

But if you've got a better way of doing this, or more importantly, a perfectly secure way of doing online access, let me know. I kinda find this stuff interesting.

More in Tux Machines

digiKam 7.7.0 is released

After three months of active maintenance and another bug triage, the digiKam team is proud to present version 7.7.0 of its open source digital photo manager. See below the list of most important features coming with this release. Read more

Dilution and Misuse of the "Linux" Brand

Samsung, Red Hat to Work on Linux Drivers for Future Tech

The metaverse is expected to uproot system design as we know it, and Samsung is one of many hardware vendors re-imagining data center infrastructure in preparation for a parallel 3D world. Samsung is working on new memory technologies that provide faster bandwidth inside hardware for data to travel between CPUs, storage and other computing resources. The company also announced it was partnering with Red Hat to ensure these technologies have Linux compatibility. Read more

today's howtos

  • How to install go1.19beta on Ubuntu 22.04 – NextGenTips

    In this tutorial, we are going to explore how to install go on Ubuntu 22.04 Golang is an open-source programming language that is easy to learn and use. It is built-in concurrency and has a robust standard library. It is reliable, builds fast, and efficient software that scales fast. Its concurrency mechanisms make it easy to write programs that get the most out of multicore and networked machines, while its novel-type systems enable flexible and modular program constructions. Go compiles quickly to machine code and has the convenience of garbage collection and the power of run-time reflection. In this guide, we are going to learn how to install golang 1.19beta on Ubuntu 22.04. Go 1.19beta1 is not yet released. There is so much work in progress with all the documentation.

  • molecule test: failed to connect to bus in systemd container - openQA bites

    Ansible Molecule is a project to help you test your ansible roles. I’m using molecule for automatically testing the ansible roles of geekoops.

  • How To Install MongoDB on AlmaLinux 9 - idroot

    In this tutorial, we will show you how to install MongoDB on AlmaLinux 9. For those of you who didn’t know, MongoDB is a high-performance, highly scalable document-oriented NoSQL database. Unlike in SQL databases where data is stored in rows and columns inside tables, in MongoDB, data is structured in JSON-like format inside records which are referred to as documents. The open-source attribute of MongoDB as a database software makes it an ideal candidate for almost any database-related project. This article assumes you have at least basic knowledge of Linux, know how to use the shell, and most importantly, you host your site on your own VPS. The installation is quite simple and assumes you are running in the root account, if not you may need to add ‘sudo‘ to the commands to get root privileges. I will show you the step-by-step installation of the MongoDB NoSQL database on AlmaLinux 9. You can follow the same instructions for CentOS and Rocky Linux.

  • An introduction (and how-to) to Plugin Loader for the Steam Deck. - Invidious
  • Self-host a Ghost Blog With Traefik

    Ghost is a very popular open-source content management system. Started as an alternative to WordPress and it went on to become an alternative to Substack by focusing on membership and newsletter. The creators of Ghost offer managed Pro hosting but it may not fit everyone's budget. Alternatively, you can self-host it on your own cloud servers. On Linux handbook, we already have a guide on deploying Ghost with Docker in a reverse proxy setup. Instead of Ngnix reverse proxy, you can also use another software called Traefik with Docker. It is a popular open-source cloud-native application proxy, API Gateway, Edge-router, and more. I use Traefik to secure my websites using an SSL certificate obtained from Let's Encrypt. Once deployed, Traefik can automatically manage your certificates and their renewals. In this tutorial, I'll share the necessary steps for deploying a Ghost blog with Docker and Traefik.