Blockchain Security Best Practices: Part One

Ricardo Martinez
Hype
Published in
10 min readJul 3, 2019

Getting started with open source software

Getting started with free open source software

This is the first part in a series on blockchain & security best practices. In the coming weeks we will be taking a look at various aspects of securely and safely using and storing blockchain tokens.

Table of contents:

  1. Libre Software
  2. Some Linux distributions are not for beginners
  3. Stick with one of these Distributions if you’re just starting
  4. Making the Switch
  5. Installing Linux
  6. Resources for learning Linux & the command line interface

Libre Software

With all the scary headlines about cryptocurrency hacks, ransomware, cryptojacking, massive data breaches, identity theft, and other such risks, one needs to limit their attack surface. An easy way to do this is to use Free Open Source Software (F.O.S.S.), or Libre software.

Libre software is volunteer-run community software & development which operates under a creative-commons license. It is funded primarily through community donations and nonprofit organizations made up of enterprises that utilize the code under development in their business models. Libre software is philosophically aligned with the cypherpunk ethos behind cryptocurrency as there is a lot of ideological overlap in the two communities. Freedom is highly prized by both groups.

The way Libre software is developed is different than the way proprietary software is developed, in that anyone can look at, or contribute to the code. Under a proprietary software development model, a private company keeps their code confidential so competitors can’t steal their ideas, or so they can generate profit through licensing or selling a software product.

Proprietary software often monetizes through logging and selling user data. This is a way they can offer a product for free, and still profit. A lot of times, a lot of really sensitive information is sold without the user’s knowledge it’s even being sold, let alone to whom, or how securely it’s being stored, and where. This wildly insecure practice has led to an ever increasing wave of cyber crime and identity theft. With the epic rise of cryptocurrency and blockchain, and the astronomical amounts of money involved, cryptocurrency users themselves are now at high risk.

We can sidestep a lot of this risk simply by using Libre software alternatives, which don’t monetize our data, and are much more secure, due to the fact that thousands of developers have their eyes on the code, as it’s freely accessible.

Today we will take a look at how to make the switch to using a Linux operating system. I am not going to go into a history lesson history,but Linux operating systems are also known as GNU Linux operating systems, and they are based on Unix. Technically, Linux only refers to the kernel, not the OS, and some people are very adamant that you mention this detail.

There’s also a lot of other Libre operating systems based on Unix, like FreeBSD, Solaris, etc. I am not going to address them since they are for advanced users and involve a very steep learning curve.

Linux often intimidates new users because it has a bit of a technical learning curve, but it really isn’t that hard. The best way I can describe it is like driving a car with a manual transmission versus an automatic. Yes, it’s awkward at first, and a little bit more difficult, but once you learn how, it’s more fun and you have a lot more control over your system.

To depart from the car analogy, aside from the code being audited by thousands of people, hackers don’t really target Libre software as much as proprietary software like Windows or MacOs. That’s not to say it never happens, but it’s a lot less likely. This is due to the fact that less than 2% of desktop users are using a Linux-based system.

It’s easier for a hacker to get results if they attack the software the other 98.5% are using. This is kind of ironic since most of the backbone-infrastructure of the internet and mobile internet run on linux-based servers and software. A lot of proprietary software is originally forked from open source Linux projects before it’s modified behind closed doors, then repackaged and resold.

Most of the Libre software community is very friendly and helpful to new users, who have questions. That being said, Libre software is philosophically about becoming self-sufficient, so many community members, while they don’t mind helping, will expect you to have searched around a bit and at least attempt to solve an issue for yourself first. Remember the old crypto saying, Do Your Own Research? Well, that applies quite aptly in this case.

Most of the time, someone else has had the same problem before you did, so it’s easy to find solutions by using a search engine. Try to see if you can figure it out, if you can’t, then ask for help on a community forum. There is no such thing as a stupid question, when learning something new. People tend to be a lot more helpful when they see you tried, and are genuinely stuck.

Some Linux Distributions are not for Beginners

It can be overwhelming for someone new to Linux to choose a distribution to get started with because there are literally hundreds, if not thousands of different community-developed distributions. Some of them, like Arch or Gentoo, are not really geared towards beginners.

Stick with one of these Distributions if you’re just starting

  • Ubuntu is probably the most popular Linux distribution (or version) for new users. Ubuntu comes in a variety of versions, known as “flavors”, each featuring different desktop environments and customizations, or optimizations. The Ubuntu community is great and the amount of documentation and resources for Ubuntu is incredible.
  • Distributions like Mint and ElementaryOS, are also very good beginner distributions, and they are based on Ubuntu, which means a lot of tutorials online for Ubuntu, will work for them as well. This is really useful as a new Linux user, because you’ll be googling how to do things for a while until you get used to it.
  • Manjaro is another good beginner’s distribution, based on Arch Linux, and I personally think Pacman, Manjaro’s package manager, (the app you use to install software and manipulate files from the command line) is easier to learn than Ubuntu’s Apt package manager.

If you want to learn all about Linux distributions then go to distrowatch.com and knock yourself out, but be careful, you might fall down the rabbithole.

Making the Switch

To make the initial jump over to Linux, I recommend dual-booting with your existing operating system.

This means you install your Linux distribution (different versions of Linux operating systems are called distributions or distros) side by side next to the operating system you’re already using, on a different hard drive partition.

It will be like having two different computers on your system, and you’ll be able to choose which one to boot into. This is useful for still being able to use your system for work, surfing the web, and gaming, while you learn and get comfortable with your Linux system. You should always do a search for how to dual boot Linux for your particular computer system, make & model number.

  1. In order to dual boot, you need to download the installation media, usually an .ISO file, of the Linux distribution you want to install, which you can find on the distribution’s download page.
  2. Then, you need to use an app like Pen Drive Linux, Rufus, or Balena Etcher to create a bootable USB stick with .ISO file you downloaded for your chosen Linux distribution, which you’ll use to install Linux alongside your existing OS.
  3. You may need to disable Secure Boot so your system will boot from a USB. Google your particular system, make, and model number to find out. If you do need to disable secure boot, here is a tutorial showing how:
    Disabling secure boot

Here are a couple useful tutorials on dual booting with Windows, or MacOS to get you started:

Installing Linux

Once you dual boot from the USB, you’ll be able to install your chosen Linux distribution on a separate hard drive partition, which you’ll be creating on your hard drive. The graphical installation interface on your Linux distribution’s installation media should allow you to choose how much disk space you want to allocate and walk you through the process. See your distribution’s minimum requirements or documentation for specific information.

You can do a small partition of say, 20Gb just to test out your distro. You can also test distributions by running a live version off of your bootable USB, but you won’t have persistent memory, meaning you’ll lose all your work when you power down the computer after each session. By creating a partition and installing your distribution onto it, you’ll be able to download software, save your work, save your settings and preferences, etc.

Once you’ve successfully installed a Linux distro on your system, you’ll be able to choose if you want to run your Linux distro, or your existing OS upon booting up your machine.

Now you’re ready to learn how to use Linux, and the command line, although most distros allow you to do most things you’ll need or want to do from the familiar comfort of the GUI also, so don’t panic.

Resources for Learning Linux & The Command Line

Don’t let the image above intimidate you. Yes, there are lots of commands to learn, but they are easy to pick up once you’ve used them a couple of times.

The command line offers a lot more power to get things done, and a high degree of control over your system. The two most important things for learning the Linux command line are:

  1. The File System “Tree”
  2. The commands themselves

It does no good to learn the commands to manipulate files and directories, if you don’t know how to find the correct files and directories you want to manipulate. Learning the File System structure is just as important as learning the commands themselves.

The Linux file system is structured as a “tree”, and all the directories, subdirectories, and files are its branches. If you learn the file tree, your job of learning the command line will be much, much easier. The slash in the diagram below is the “root” directory, and all the other directories, subdirectories and files grow from there.

Linux File System…For Humans

Here is a great and easy to understand video tutorial for learning the Linux File-System Hierarchy:

The Linux File System Structure Explained

Here is a good article which summarizes the File System:

Filesystem Hierarchy Standard

For a really deep dive here’s a book about the File System in PDF format:

As for learning the commands themselves, there is a multitude of video tutorials on Youtube, some that last many hours and go into great detail. I am going to link a tutorial that’s geared towards beginners, if you want something more advanced, just do a YT search for “Linux command line tutorial”.

Beginner’s guide to the Bash Terminal

Here’s a good beginner video:

LinuxCommand.org

This excellent website LinuxCommand.org has a series of tutorials that take you from noob to pro:

The Linux Command Line

This book (PDF) was written by the man behind LinuxCommand.org, and it is one of the best for learning the command line:

Conclusion

Learning Linux and using it through the terminal to accomplish tasks is a wonderful skill that anyone can learn with a little perseverance. It opens up the door to a much deeper and fulfilling user experience. It also opens up the door to a lot more security and privacy for users, and for cryptocurrency users this particular feature is extremely valuable.

Another benefit is that understanding Linux and the command line allows you to participate in running a node, a masternode, or self-hosted blockchain alternative to a centralized service. You can learn how to securely store your coins, or run your own coinjoin server, there is no limit. If the command line is your intro to coding, you may find you enjoy it, and pursue it further.

Linux is not only more secure, it is a lot more reliable, with less problems, when compared to other proprietary alternatives. You don’t get the famous blue screen of death, in other words. It doesn’t get slow and unusable over time, and you’re not limited to being contained in a walled-garden when it comes to installing software and customizing your user environment. Nearly every single feature can be tweaked or modified allowing you to make your system truly feel like your own. There aren’t as many threats from malware, either.

Open source software is almost all free, and you can find a far larger range of variety in applications. You can find software for anything imaginable. For example, on Windows or Mac you can only run Windows or Mac versions of software. On a Linux system, you could run software from all 3 operating systems, at the same time, if you were so inclined.

The level of versatility and freedom that open source Libre software provides over the permissioned experience provided by proprietary software is truly analogous to the level of freedom cryptocurrency provides when compared to the walled-garden, permissioned experience of our current financial system.

Originally published at https://blog.hype.partners on July 3, 2019.

--

--