Threat Models

Security is hard, and the way the software industry deals with security makes it even harder. In order to put some sanity into all of this, you should do threat modeling.

What is a threat model and why do you need one? Well, fundamentally a threat model is about rationally thinking through the kinds of assets you have available, the kinds of adversaries you have and what kinds of attacks are possible. Once you understand the landscape you can start making reasonable decisions about what kinds of attack you can protect against and how you will protect against them.

Security is not an absolute. You will never have an absolutely secure system. Instead, you have a system that should be designed to protect against a certain range of threats and attacks. But in order to build such a system you actually have to sit down and think it through. You can't just have a card that says "Security" that when you play you will put in some encryption where you think it makes sense and then be done with. You often have many assets to protect and how you protect is a matter of cost. Sometimes encrypting communication is not the right choice. And sometimes you want to have several layers of transport encryption validated with both client certificates and passwords. But you don't know which one you want until you actually sit down and map out your environment.

If you happen to be a computer capable person that is very likely to be targeted by large state sponsored attackers, it makes sense to take strong measures. One of the things these people do is that they have special computers that have been modified to make them harder to tamper with. You do this by taking a very old laptop (the exact model is roughly 8 years old now). Then you take out a bunch of things in it - like the harddrive, the microphone, the speaker, the firewire connections, the WiFi card and some other things. Then you flash an open source BIOS on it, and then you physically modify the BIOS chip so it's impossible to write to it again. And then you run something like Tails from a USB stick (preferably a USB stick with a readonly switch). And finally you can work on what you want to do. But a computer like this has to be protected as well - if it's out of your control for a while there is no way to be sure that it hasn't been tampered with. And finally you probably want several computers like this, segregated by usecase. You might want one that you only ever do XMPP over OTR on - and you will never open a browser on that machine. Or you might want to have another one that is airgapped, and has never been connected to the Internet.

Of course, most people don't need these kind of measures. And for sure, measures like this have a tendency to get in the way of daily life and actually getting things done. But it's a tradeoff. For some situations, guarding against a specific threat could be too expensive for it to be worth doing it. But you will never be able to even think about these issues until you have sat down and written a threat model. This is also why it's extremely important when evaluating software for security purposes that they have a threat model that you can read and understand. Take Tor - they explicitly do not guard against a global observer. It says so in their threat model and they made the judgment call that for the purpose that Tor is fulfilling, guarding against an attacker like that would be too costly.

So, before starting your next project, start thinking through the threat model.