emerg-shutdown - Instantly Power Off the System
emerg-shutdown immediately and forcibly powers off the system if the boot drive is removed or a "panic" key combo is pressed. When used in combination with full disk encryption, it is a powerful tool to prevent data theft by physically present attackers.
Overview
[edit]Some of Kicksecure's security features require the system to be powered off to be effective. For instance, Full Disk Encryption only works if an attacker cannot gain access to the encryption key used to lock the disk. This key is stored in RAM while the system is powered on and running normally. If an attacker can gain physical access to the machine while the key is in RAM, they can likely extract the data on the disk or even the key itself. Disk encryption is therefore not reliable unless the system is powered off when an attacker gains access to it.
If a user has to defend against an adversary that may become physically present without warning and take control of the system, they must power the system down as quickly as possible after the adversary arrives. However, traditional shutdown mechanisms are insufficient for a number of reasons:
- They are oftentimes cumbersome to access (
Start Menu→Power button→Shut Down→Yes), greatly reducing the chances that a user (especially a panicking user) will be able to use them in a timely fashion. - Even if a user can initiate a normal shutdown quickly enough,
systemdmay take an excessive amount of time to finish powering off the machine, allowing the adversary to initiate a cold boot attack or similar before the machine fully powers off. - Desktop machines can be physically unplugged to quickly power them off, but laptops generally will remain powered on even when AC power is lost, and removing the battery from most modern laptops is not a task that can be performed quickly.
emerg-shutdown solves these problems by allowing a user to instantly power off the system by removing the boot drive or by pressing a "panic" key combo.
emerg-shutdown is installed and enabled by default on Kicksecure 18 and higher. It is part of the security-misc package.
Usage
[edit]When emerg-shutdown is enabled, the system may be immediately shut down by doing one of the following actions:
- Press the emergency key combo (by default
Ctrl + Alt + End.[1] This shortcut is recognized by emerg-shutdown as a "panic button" and will cause the system to be forcibly shut down. - Unplug the drive or eject the disc the system was booted from (only applicable when booting from a live ISO or a USB installation).
emerg-shutdownwill detect the drive removal and will forcibly shut down the system in response.[2]
Both of these actions are expected to be fast and easy to do even in high-stress situations, while also being difficult to do on accident.
emerg-shutdown can also be used in scripts, programs, and system services to trigger an immediate shutdown. Running /run/emerg-shutdown --instant-shutdown as root will cause the system to be forcibly shut down.[3]
Configuration
[edit]The emergency key combination in emerg-shutdown may be configured by placing a file under /etc/security-misc/emerg-shutdown or /usr/local/etc/security-misc/emerg-shutdown. See /etc/security-misc/emerg-shutdown/30_security_misc.conf![]()
for details.
The list of supported keys is hardcoded in the emerg-shutdown source code, in the key_table variable. See /usr/src/security-misc/emerg-shutdown.c![]()
Additional keys may be added to this list in the future if necessary.
Footnotes
[edit]- ↑ Why
Ctrl + Alt + End? OriginallyCtrl + Alt + Deletewas used as the panic key, but other applications such assystemdmay interpret this shortcut, and a more powerfulCtrl + Alt + Deletehandler may be added to Kicksecure in the future.Ctrl + Alt + Endis the keyboard shortcut used by Windows Remote Desktop Connection to sendCtrl + Alt + Deleteto a remote system (https://serverfault.com/a/57233
), so it was considered suitable as an "alternate
Ctrl + Alt + Delete". - ↑
emerg-shutdown's core executable supports a--paranoidoption that will cause an immediate shutdown if any device is removed from the system. This may be useful in the future for users who need the system to shut down even if they unplug the "wrong" device. There currently is no configuration option to enable this mode. - ↑ This requires root access because otherwise it would make denial-of-service attacks trivial. The usual methods of triggering
emerg-shutdowndon't require the ability to log in as root, but they do not pose a denial-of-service risk because they require a physically present user.
We believe security software like Kicksecure needs to remain Open Source and independent. Would you help sustain and grow the project? Learn more about our 13 year success story and maybe DONATE!