Protection against Physical Attacks

From Kicksecure
Revision as of 16:24, 15 December 2021 by Nurmagoz (talk | contribs)
Jump to navigation Jump to search

Introduction

Physical attacks require adversaries to have direct access to a user's computer and cannot be conducted remotely. This section should be read in conjunction with the Full Disk Encryption and Encrypted Images chapters.

BIOS Password

Info The instructions in this section refer to BIOS or legacy BIOS. Users with UEFI firware should research specific instructions for their computer.

The Basic Input/Output System (BIOS) is non-volatile firmware which performs hardware initialization during the computer's booting process after it is powered on. It also provides runtime services for operating systems and progams. BIOS in modern PCs initialize and test system hardware components, as well as loading a boot loader or operating system from a mass memory device. The Unified Extensible Firmware Interface (UEFI) is the successor to BIOS that was released in 2011. [1]

All local settings are stored in BIOS, including power options, boot options and memory information. The BIOS menu allows the user to set and change a boot password for the computer upon startup. An administrator password can also be set to prevent others from changing BIOS settings. To set a BIOS boot password: [2] [3]

  • Turn on / restart the computer.
  • Press the relevant key to access the BIOS menu. It is usually one of: Del, Esc, F2, F10, or F12.
  • Navigate to the Security or Password section using the arrow keys.
  • Search for an entry named "Password on boot" or similar.
  • Enter the new, strong password.
  • Save the changes made to BIOS settings. On most PCs, this is done by pressing Esc or F10Save and Exit. Check the bottom of the BIOS screen to be sure.
  • Reboot the computer and confirm a password prompt now appears.

For greater security, a password should be set to access the BIOS menu itself. Search the Security or Password BIOS menu for "Set supervisor password", "User password", "System password", or something similar. [4] Also, users may prefer to configure BIOS to only allow booting from HDD/SSD so the computer cannot be booted from CD-ROM or USB flash drives.

It should be noted that there are numerousarchive.org iconarchive.today icon methodsarchive.org iconarchive.today icon of bypassing, removing or resetting BIOS passwordsarchive.org iconarchive.today icon, so this method will only prevent casual attempts to gain access.

Cold Boot Attacks

Due to the design of modern computers, nearly all the data manipulated during a session is temporarily written to RAM. This can include texts, saved files, passwords, and encryption keys! Data from more recent activities has a greater likelihood of still residing in RAM. [5]

Modern computer architecture poses a significant risk to Kicksecure users. Adversaries with physical access to a computer running Kicksecure may be able to recover all session activities, even if FDE is enabled.

Even when a computer is powered off, the data in RAM does not immediately disappear. Depending on the circumstances, data can survive for up to several minutes. For example, this occurs when a computer loses power abruptly and does not go through the normal shutdown cycle. [6] If an adversary has immediate physical access to a computer, a cold boot attackarchive.org iconarchive.today icon can be mounted.

Forensic experts have two main methods of extracting data from RAM: [7]

  • The running computer is cold-booted and a lightweight operating system is booted from a removable disk. A tool is used to dump pre-boot physical memory contents to a file.
  • The memory modules are quickly removed from the original system and placed in another computer under the adversary's control. The machine is then booted to access the memory contents.

In both cases, the RAM contents can be analyzed in a computer forensics laboratory. Depending on what is found, the user may be in serious peril. Notably, cold boot attacks have proven effective against Trusted Platform Modules (TPMs)archive.org iconarchive.today icon, as well as full disk encryption regardless of the vendor or operating system. For certain memory modules, the time window for an attack can be extended to several hours by cooling them with a refrigerant. [7]

Cold boot attacks are thought to be a very uncommon method of recovering data, but high-risk users should be prepared for such a contingency to stay on the safe side. So long as a cold boot attack is not mounted directly after shutdown, then contents of RAM should be emptied within minutes. [8]

Preventative Measures

Kicksecure does not yet provide an analogous feature to Tails, which wipes RAM on shutdownarchive.org iconarchive.today icon by overwriting it with random data. Possible interim solutions include:

Cold boot attacks are a clear and present danger for high-risk users due to the limited countermeasures available. In the purely hypothetical situation where an adversary is knocking earnestly on the door, safest would be pressing the panic button on the host, leading to the contents of RAM being quickly wiped. Failing that, the computer should be immediately shut down and access to the computer delayed as long as possible.

Evil Maid Attack

If an encrypted computer is left unattended, it is possible for an adversary ("evil maid") to secretly access it and install a hacked bootloader. The process has two steps: [13]

  1. After accessing the shutdown computer, the attacker boots it from a separate volume. A hacked bootloader is written to the system, then shut down.
  2. Later on the owner boots the computer and enters their encryption key. Once the disk is unlocked, the malicious bootloader can capture the key and send it over the internet, store it in a secret location and so on. [14]

In 2009, security researcher Joanna Rutkowska (who coined the term "evil maid attack") demonstrated this technique against a TrueCrypt encrypted system using a small bootable USB stick image; see herearchive.org iconarchive.today icon for further details and a discussion about possible solutions.

If the user has a TPM chip, [15] anti-evil maid measures are available for:

Problematic Interfaces

There are a number of computer interfaces that pose the risk of a direct memory access (DMA) attackarchive.org iconarchive.today icon. Potentially exploitable interfaces include ExpressCard, PCMCIA, FireWire, PCI, PCI Express or Thunderbolt.

High-speed expansion ports allow attackers to penetrate computers and other peripherals because the connected devices have direct hardware access to enable maximum throughput.

In practice, attached devices are permitted to read and write directly to memory, often without supervision of the operating system. This is in contrast to user-mode applications that are usually prevented from accessing memory locations that are not explicitly authorized by virtual memory controllers. [17]

A successful DMA attack on an unattended, live computer allows the adversary to: [18] [17] [19] [20]

  • Access sensitive cryptographic material in memory.
  • Circumvent FDE.
  • Inject executable code.
  • Partially or fully read the memory address space.
  • Read documents, files or other digital traces present in memory.
  • Take control of the entire system, for example via the network.
  • Unlock screensavers without a passphrase.

DMA attack software tools which mimic the abilities of state-level adversariesarchive.org iconarchive.today icon are even available on GitHubarchive.org iconarchive.today icon! [21] Mitigating the threat of a DMA attack requires mostly physical security countermeasures; it is recommended to:

  • Consider blocking or removing them completely.
  • Disable them in BIOS or UEFI.
  • Never allow unknown and potentially malicious devices to be inserted into these ports. [22]
  • Securely configure these interfaces.
  • Use IOMMUarchive.org iconarchive.today icon technology if available, along with software which supports it, like Qubes. [23]
  • Use Linux kernel options to disable DMA by Firewire devices.

Screen Lock

Info If a computer is left unattended, always lock the screen of the host or shut it down for greater safety.

Locking the screen on the host prevents others from viewing or using the device. It is advisable to set the screen to lock after a certain period of inactivity, and a strong password is recommended. Note that screen lockers provide notoriously weak protectionarchive.org iconarchive.today icon, so do not overestimate their effectiveness. [24]

To manually lock the screen: [25] [26]

Windows

  • Open Start MenuClick User IconSelect Lock; or
  • Ctrl + Alt + DelSelect Lock; or
  • Windows key + L.

macOS

  • Apple menu buttonLock Screen; or
  • CMD + Ctrl + Q. [27]

Linux

  • Menu panelLock Screen.
  • Shortcuts are specific to the desktop environment in use, for example, GNOME, KDE, Xfce and so on.

Recommendations:

  • Do not enable Alt + Crtl + Backspace to kill the X Server. Do not disable DontZap in Xorg configuration. [28] [29]

Virtual Consoles

Login Screen

It does not help much to lock the screen of a virtual machine (VM). If the host operating system (OS) is ever compromised, then any VMs it hosts are also effectively compromised. Therefore if anything, it is much better to lock the host screen. See also Screen Lock.

If a login screen in Template:Non q project name VMs is desired despite, this is possible. To enable a login screen in Template:Non q project name VMs it is required to disable autologin in Template:Non q project name VMs, see disable autologin.

Side Channel Attacks

Info Kicksecure does not provide protection against most side-channel attacksarchive.org iconarchive.today icon.

Side-channel attacks are made possible by physical effects caused by cryptosystem operations (on the side) which provide extra information about system secrets like cryptographic keys, state information, or full/partial plaintexts. Wikipedia defines side-channel attacks as: [31]

...any attack based on information gained from the physical implementation of a cryptosystem, rather than brute force or theoretical weaknesses in the algorithms (compare cryptanalysis). For example, timing information, power consumption, electromagnetic leaks or even sound can provide an extra source of information, which can be exploited to break the system.

Side-channels emerge because computation takes place on a non-ideal system, composed of transistors, wires, power supplies, memory, and peripherals. Component characteristics vary with the instructions and data that are processed, allowing measurable variance to be used by attackers. [32]

Table: Primary Side-channel Attack Classes [31]

Attack Class Description
Acoustic Cryptanalysis Sound produced during computation is used for attacks.
Cache Attacks Attackers monitor cache accesses made by the user in shared physical systems like virtualized environments or cloud services.
Data Remanence Sensitive data are read after supposedly being deleted.
Differential Fault Analysis Secrets are discovered by introducing faults in a computation.
Electromagnetic Attacks Leaked electromagnetic radiation allows attacks that can provide plaintexts and other information. Cryptographic keys can be inferred via this method; for example, see TEMPESTarchive.org iconarchive.today icon.
Optical Secrets and sensitive data are read by visual recordings with a high resolution camera, or other devices.
Power-monitoring Attacks Attacks use measurements of varying hardware power consumption during computation.
Software-initiated Fault Attacks Row hammerarchive.org iconarchive.today icon is an example of this attack, whereby off-limits memory is changed by rapidly accessing adjacent memory, leading to state retention loss.
Timing Attacks Attacks are based on measuring how long various computations take to perform, such as the attacker's password compared to the user's unknown one.

While Kicksecure has some limited countermeasures to side-channel attacks, in general it cannot provide protection against most classes, nor hardware keyloggersarchive.org iconarchive.today icon, TEMPEST, miniature cameras and so on. Full disk encryption is also helpless against these attacks.

For further reading on this complex topic, see herearchive.org iconarchive.today icon, herearchive.org iconarchive.today icon and herearchive.org iconarchive.today icon.

See Also

Footnotes

  1. https://en.wikipedia.org/wiki/BIOSarchive.org iconarchive.today icon
  2. https://www.techwalla.com/articles/how-to-change-the-administrator-password-in-biosarchive.org iconarchive.today icon
  3. http://www.intowindows.com/how-to-set-bios-or-uefi-password-in-windows-10/archive.org iconarchive.today icon
  4. If the system has both a supervisor password and a user password, then set passwords for both.
  5. https://tails.boum.org/doc/advanced_topics/cold_boot_attacks/index.en.htmlarchive.org iconarchive.today icon
  6. https://darkwebnews.com/security-guide/cold-boot-attacks-unencrypted-ram-extraction/archive.org iconarchive.today icon
  7. Jump up to: 7.0 7.1 https://en.wikipedia.org/wiki/Cold_boot_attackarchive.org iconarchive.today icon
  8. https://tails.boum.org/doc/advanced_topics/cold_boot_attacks/index.en.htmlarchive.org iconarchive.today icon
  9. Unfortunately, an upstream script does not yet exist to implement this feature, so Kicksecure is currently unable to provide a solution for this attack.
  10. Tailsarchive.org iconarchive.today icon and Liberte Linux have partially solved this problem.
  11. Instead of waiting for an upstream solution, see the Dev#Wipe RAM panic script. The user would need to implement a panic button which will wipe RAM. Please contributearchive.org iconarchive.today icon by coding this feature.
  12. https://en.wikipedia.org/wiki/Cold_boot_attack#Register-based_key_storagearchive.org iconarchive.today icon
  13. https://www.schneier.com/blog/archives/2009/10/evil_maid_attac.htmlarchive.org iconarchive.today icon
  14. An advanced adversary is likely to return again and remove any evidence of the hack.
  15. Intelarchive.org iconarchive.today icon:

    TPM is is a microcontroller that stores keys, passwords, and digital certificates.

  16. By installing the anti-evil-maid package in dom0 and following the configuration stepsarchive.org iconarchive.today icon.
  17. Jump up to: 17.0 17.1 https://en.wikipedia.org/wiki/DMA_attackarchive.org iconarchive.today icon
  18. http://louwrentius.com/firewire-the-forgotten-security-risk.htmlarchive.org iconarchive.today icon
  19. https://privatecore.com/resources-overview/physical-memory-attacks/index.htmlarchive.org iconarchive.today icon
  20. http://www.delaat.net/rp/2011-2012/p14/report.pdfarchive.org iconarchive.today icon
  21. This is not an endorsement for the use of hacking tools.
  22. This is another reason why high-risk users should never leave their devices unattended.
  23. IOMMU maps device-visible virtual addresses to physical addresses. The security benefit is that operating systems that are run in guest virtualized machines -- AppVMs in Qubes -- do not know the physical memory addresses on the host that are being accessed. This makes DMA attacks very difficult and can lead to memory corruption if attempted.
  24. Attacks that have bypassed screen lockers on most platforms can easily be found online.
  25. https://www.isunshare.com/windows-10/3-ways-to-lock-windows-10-computer.htmlarchive.org iconarchive.today icon
  26. https://swissmacuser.ch/new-lock-screen-feature-in-macos-high-sierra/archive.org iconarchive.today icon
  27. Some macOS systems instead use Ctrl + Shift + Power button OR Ctrl + Shift + Eject key.
  28. Jump up to: 28.0 28.1 https://forums.whonix.org/t/screen-locker-in-security-can-we-disable-these-at-least-4-backdoors/8128archive.org iconarchive.today icon
  29. Quote xscreensaver FAQarchive.org iconarchive.today icon:

    Backdoor #1: Ctrl-Alt-Backspace

    This keystroke kills the X server, and on some systems, leaves you at a text console. If the user launched X11 manually, that text console will still be logged in. [...]

  30. Quote xscreensaver FAQarchive.org iconarchive.today icon:

    Backdoor #2: Ctrl-Alt-F1 , Ctrl-Alt-F2 , etc.

    These keystrokes will switch to a different virtual console, while leaving the console that X11 is running on locked. If you left a shell logged in on another virtual console, it is unprotected. So don’t leave yourself logged in on other consoles. You can disable VT switching globally and permanently by setting DontVTSwitch in your xorg.conf, but that might make your system harder to use.

  31. Jump up to: 31.0 31.1 https://en.wikipedia.org/wiki/Side-channel_attackarchive.org iconarchive.today icon
  32. http://rootlabs.com/articles/IEEE_SideChannelAttacks.pdfarchive.org iconarchive.today icon

License

Kicksecure Protection Against Physical Attacks wiki page Copyright (C) Amnesia <amnesia at boum dot org>
Kicksecure Protection Against Physical Attacks wiki page Copyright (C) 2012 - 2025 ENCRYPTED SUPPORT LLC <

This program comes with ABSOLUTELY NO WARRANTY; for details see the wiki source code.
This is free software, and you are welcome to redistribute it under certain conditions; see the wiki source code for details.

Notification image

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!