Nistar36 OS. Have a safe trip
Imagine a hotel room in a foreign city. You go out to dinner, and the laptop stays on the desk, switched off and encrypted. When you come back, everything looks just as it did before you left. Or does it? Almost every security guide starts with disk encryption and stops there. Yet a system that encrypts its disk properly can still give away a lot about you along the way: show a console to someone who types the wrong password, start a replaced boot program, expose your device through the system clock, send DNS queries in plain text over the hotel network. Below we describe several such places, from the threshold of your room to the decision about which system to use at all. Each time we show how we approached it in Nistar36 OS, a system that combines convenience with security. One of the solutions used in it means that the classic Evil Maid attack, the replacement of the boot program while the owner is away, has no chance of success.
A wrong password and a console nobody should see
Most encrypted Linux laptops start booting with GRUB, which asks for the disk password. When the password is wrong, the standard configuration does not switch the computer off. It leaves a GRUB command line on the screen. Commands can be typed into this console, and even in rescue mode a minimal set of them is available. In practice, however, this is enough to browse the computer's unencrypted boot partition and read its files. So the attack vector is open. A small one, but it is there.
In Nistar36 OS no console appears after a wrong password. The system displays a message in English, Polish and Russian, waits a few seconds and switches the computer off automatically. To try again, you have to start it from scratch. These are valuable seconds that we have taken away from a potential intruder. On its own this is not yet a shield against the Evil Maid attack, described by Joanna Rutkowska in 2009 using TrueCrypt as an example. The boot partition on the disk remains unencrypted, so once the drive is removed it can be read even without access to the console. But that takes further valuable minutes. Switching the computer off after a wrong password takes the shortest path away from an intruder. Effective protection against the classic Evil Maid attack comes from another solution built into Nistar36 OS at system level.
A key without which the laptop will not start
An Evil Maid attack requires two "visits" by the attacker, at least one of which has to be "local", with direct access to the computer (for example a repair shop, a visit to your hotel room or simply a computer left unattended). The first time, the intruder replaces the boot program on the disk with one that looks identical but records the password you type. The second time, once the password has been entered, they collect the "loot", in person or remotely. The whole attack rests on one assumption: the code that asks for the password waits in the laptop, and the laptop stays in the hotel room, waiting for you.
Nistar36 OS turns that assumption around. When you need it (for example before a trip), you run the SECURE KEY program and move all the boot code to an ordinary USB stick, which becomes your secure USB key (SECURE KEY). The sensitive code disappears from the laptop's disk, and all that remains is a screen saying that the key is missing when it is not plugged into a USB port at startup. After displaying the message, the computer switches itself off. You carry the USB stick with you, for example on your key ring. An uninvited guest who comes while you are away to get at your computer has nothing to replace, because there is nothing on the disk that would lead to your system. When you come back, you start the laptop safely only from the USB stick that was in your pocket the whole time. Simple and effective.
The idea of keeping the boot program off the disk is not new. For years it has circulated in manual guides for advanced Linux users, with a dozen or so steps in the terminal and a high risk that a single mistake will leave the computer unable to boot. In Nistar36 OS it is a system-level solution in the form of a single icon that runs the whole process with every step checked. And just as easily, the SECURE KEY program can restore the original state, that is, starting the computer without the USB key.
A guard for the boot code
The USB key protects you while travelling, but a laptop also spends time in the office, at home, at a repair shop. That is why Nistar36 OS has a second guard, ESP GUARD. At every system start and every 180 minutes it compares the boot code on all internal disks, and the boot entries stored in the computer's memory, with a reference approved as correct. Any difference, a new file, a changed byte, an added boot entry, triggers an alarm on the screen with a clear warning not to type any passwords until you have checked the cause. The only things that do not trigger the alarm are legitimate operations of the system itself, such as an update of the boot program, and diagnostic logs written by the laptop's manufacturer. As a result, an alarm always means a change that has to be checked.
What to take on a trip and what to leave at home
The digital safety kit of the Committee to Protect Journalists (CPJ) treats securing devices and crossing borders as separate topics. We add a simple rule: the less data you carry, the less you can lose. The laptop you take on a trip as a journalist, or simply as someone who cares about their security, should not be the same computer that holds all your sensitive data. It should be a separate device, with a minimum of files, protected by a long and complex password rather than biometrics. Shut down completely, not put to sleep. The difference between sleep and shutdown is fundamental. A sleeping computer keeps the encryption key in memory, while a switched-off one does not. Nistar36 OS does not use a swap partition at system level, so not even "crumbs" of memory are left on the disk.
The disk password remains the most important line of defence when the laptop falls into someone else's hands. In version 22.8 we raised the cost of every attempt to guess it, so that a dictionary attack on a copied disk takes several times longer. No setting, however, can replace a good, well-constructed password. We will soon devote a separate article to that.
Why the clock gives you away
Every computer needs to know the current time, and the most common way to learn it is the NTP protocol, widely used in other operating systems. The time server sees that on this day and at this hour someone started a computer from a given IP address, and no encryption changes that, because encryption protects against eavesdropping along the way, not against the server. On top of that, NTP is not encrypted: it works over UDP packets sent in plain text, so anyone on the same network can see the queries. It is not much, but on a network where you want to disappear into the crowd, even a little can be a lot. So your clock can be your "fingerprint" and make it possible to identify the hardware you use on the network. Researchers from the University of California, San Diego proved in 2005 that tiny and unique differences in the rate at which each computer's hardware clock ticks make it possible to recognise the machine remotely, even when it changes networks and addresses. No software can remove this hardware trait, but the method reads it from timestamps in TCP packets, and these can be switched off in the system or hidden by routing traffic through Tor. Nistar36 OS simply switches this fingerprinting vector off: the system kernel does not add timestamps to TCP packet headers. Someone analysing your network traffic, for example on a public Wi-Fi network, or a server you connect to, therefore cannot use this route to measure the unique rate of your clock or use these timestamps to recognise your system. There is no NTP daemon in Nistar36 OS. The time is set by htpdate, which takes it from the response headers of ordinary, trusted web servers. This is less precise than NTP (usually differences of fractions of a second), but it is enough for what we really need: for the browser, TLS certificates and Tor to see the correct time.
Hotel Wi-Fi and the login portal
Most hotels and airports require you to log in on a portal page before they let you onto the internet. The portal relies on a trick: it intercepts your DNS queries and serves its own page instead. The problem is that DNS over TLS (DoT), described in RFC 7858, encrypts these queries so that nobody along the way can read or alter them. For security this is great news, but for the login portal a disaster: the page cannot load and you are left without internet access.
Nistar36 OS uses strict DoT as a default setting and has a switch on the desktop called HotSpot Wi-Fi (DoT). It lets you deliberately relax the rules briefly while you log in, and then, after 15 minutes, it returns to strict mode by itself. The point is that in a hotel, at the end of a long day, you should not have to give up protection permanently just because the access portal does not work. For the same reason, the laptop does not announce itself on the network under its own name, and the services that advertise the computer to other devices on the local network are switched off by default. You switch them on only when you need them, for example for a printer on your private or trusted network. You are in full control.
The Broadcom driver that is not there
Many laptops, especially older models, have a Broadcom Wi-Fi card which on Linux requires a closed driver called wl (in Debian the broadcom-sta-dkms package, in the non-free section). We cannot inspect it, and on top of that it has to be compiled on the user's computer, which requires a whole set of development tools. For a project that promises transparency and security, this is unacceptable. That is why we removed this driver together with DKMS, the compiler and the kernel headers, and blocked the module in the system.
The price is real: on some laptops with a Broadcom chip, Wi-Fi will not work out of the box. We soften it by including firmware for popular USB adapters based on Atheros and MediaTek chips, which have open drivers. And in this case, a small USB adapter in your pocket or laptop bag is a more sensible compromise than closed code in the system kernel.
Intel ME, a computer inside the computer
Since 2008, the chipset of almost every laptop with an Intel processor has contained a separate microcontroller, the Intel Management Engine. It has its own operating system and access to memory, and in versions with AMT technology also to the network. It runs as long as the computer has power, and its code is closed. ME cannot be switched off from the operating system, because it runs below it. What you can do is cut the operating system off from it.
Nistar36 OS does not disable Intel ME. That is not a task an operating system can perform. Nistar36 OS applies a block on the host interface to Intel ME: it blocks all kernel modules of the mei family, the drivers of the interface through which the system and programs communicate with the Management Engine. The modules load neither automatically nor on request, and there is no device in the system through which a command could be sent to ME. No program can therefore send commands to ME or read data from it, and malware that got into the system loses this route to the deepest layer of the computer. The ME chip itself, however, keeps running in hardware if the computer has an Intel processor. Disabling it requires changes to the computer's firmware, for example setting the HAP bit, and that is a completely separate topic.
Qubes OS, Nistar36 OS or...?
Qubes OS is currently the strongest and most uncompromising solution for people who need isolation. It divides the system into separated compartments running on the Xen hypervisor, so that a break-in to one module (the browser, the messenger) does not automatically spread to the other sectors. It does have its price: it needs compatible hardware, plenty of RAM, time to learn and a change of habits. Nistar36 OS takes a completely different approach: a single hardened system based on Debian, with an encrypted disk, Tor, a boot key and a guard for the boot code, equipped with many other in-house solutions not described in this article, which is used like a typical operating system. The system interface is available in dozens of languages, as we describe in the article Nistar36 OS. What you don't see.
There is no winner here. If you work with very sensitive sources and data at a desk, Qubes will probably be the best choice. If you travel, change hardware, need something that works from the first boot and at the same time do not want to be left unprotected, a hardened "single-compartment" system makes sense. Nothing stops you from using both: Qubes OS at your desk, in your office or at home, and on the road and in the field a separate laptop with Nistar36 OS and the key in your pocket.
Instead of a summary
Most of the solutions described may not look spectacular. Nobody will make a sensational film about a laptop switching itself off after a wrong password or a clock that does not talk to an NTP server. A key in your pocket and a guard watching the boot code do not impress at first sight either. But the security of your system is made of exactly such details, and their sum decides how secure your configuration, your data and you are. It is also worth stressing that in this text we have deliberately not described all the solutions and capabilities of Nistar36 OS, because that information is not public and is intended exclusively for our clients. Until recently, Nistar36 OS was available only to a narrow circle of users, and hardly anyone even knew it existed...
Continued in: Nistar36 OS. What you don't see.