Movatterモバイル変換


[0]ホーム

URL:


Jump to content
WikipediaThe Free Encyclopedia
Search

DMA attack

From Wikipedia, the free encyclopedia
Cyberattack exploiting high-speed expansion ports

ADMA attack is a type ofside channel attack incomputer security, in which an attacker can penetrate a computer or other device, by exploiting the presence of high-speed expansion ports that permitdirect memory access (DMA).

DMA is included in a number of connections, because it lets a connected device (such as acamcorder,network card,storage device or other useful accessory or internalPC card) to transferdata between itself and the computer at the maximum speed possible, by using directhardware access to read or write directly tomain memory without anyoperating system supervision or interaction. The legitimate uses of such devices have led to wide adoption of DMA accessories and connections, but an attacker can equally use the same facility to create an accessory that will connect using the same port, and can then potentially gain direct access to part or all of the physical memory address space of the computer, bypassing all OS security mechanisms and anylock screen, to read all that the computer is doing, steal data orcryptographic keys, install or runspyware and otherexploits, or modify the system to allowbackdoors or other malware.

Preventing physical connections to such ports will prevent DMA attacks. On many computers, the connections implementing DMA can also be disabled within theBIOS orUEFI if unused, which depending on the device can nullify or reduce the potential for this type of exploit.

Examples of connections that may allow DMA in some exploitable form includeFireWire,CardBus,ExpressCard,Thunderbolt,USB 4.0,PCI,PCI-X, andPCI Express.

Description

[edit]

In modernoperating systems, non-system (i.e.user-mode) applications are prevented from accessing any memory locations not explicitly authorized by the virtual memory controller (calledmemory management unit (MMU)). In addition to containing damage that may be caused by software flaws and allowing more efficient use of physical memory, this architecture forms an integral part of the security of the operating system. However, kernel-mode drivers, many hardware devices, and user-mode vulnerabilities allow direct, unimpeded access of the physical memory address space. The physical address space includes all of the main system memory, as well as memory-mapped buses and hardware devices (which are controlled by the operating system through reads and writes as if they were ordinary RAM).

TheOHCI1394 specification allows devices, for performance reasons, to bypass the operating system and access physical memory directly without any security restrictions.[1][2] ButSBP2 devices can easily bespoofed, making it possible to trick an operating system into allowing an attacker to both read and write physical memory, and thereby to gain unauthorised access to sensitive cryptographic material in memory.[3]

Systems may still be vulnerable to a DMA attack by an external device if they have aFireWire,ExpressCard,Thunderbolt or other expansion port that, likePCI andPCI Express in general, connects attached devices directly to the physical rather thanvirtual memory address space. Therefore, systems that do not have a FireWire port may still be vulnerable if they have aPCMCIA/CardBus/PC Card or ExpressCard port that would allow an expansion card with a FireWire to be installed.

Uses

[edit]

An attacker could, for example, use asocial engineering attack and send a "lucky winner" a rogue Thunderbolt device. Upon connecting to a computer, the device, through its direct and unimpeded access to the physical address space, would be able to bypass almost all security measures of the OS and have the ability to read encryption keys, install malware, or control other system devices. The attack can also easily be executed where the attacker hasphysical access to the target computer.

In addition to the abovementioned nefarious uses, there are some beneficial uses too as the DMA features can be used forkerneldebugging purposes.[4]

There is a tool called Inception[5] for this attack, only requiring a machine with an expansion port susceptible to this attack. Another application known to exploit this vulnerability to gain unauthorized access to running Windows, Mac OS and Linux computers is the spywareFinFireWire.

Mitigations

[edit]

DMA attacks can be prevented byphysical security against potentially malicious devices.

Kernel-mode drivers have many powers to compromise the security of a system, and care must be taken to load trusted, bug-free drivers. For example, recent 64-bit versions of Microsoft Windows require drivers to be tested and digitally signed by Microsoft, and prevent any non-signed drivers from being installed.

AnIOMMU is a technology that applies the concept of virtual memory to such system busses, and can be used to close this security vulnerability (as well as increase system stability). Intel brands its IOMMU as VT-d. AMD brands its IOMMU as AMD-Vi. Linux and Windows 10 supports these IOMMUs[6][7][8] and can use them to block I/O transactions that have not been allowed.

Newer operating systems may take steps to prevent DMA attacks. RecentLinux kernels include the option to disable DMA by FireWire devices while allowing other functions.[9]Windows 8.1 can prevent access to DMA ports of an unattended machine if the console is locked.[10] But as of 2019, the major OS vendors had not taken into account the variety of ways that a malicious device could take advantage of complex interactions between multiple emulated peripherals, exposing subtle bugs and vulnerabilities.[11]

Never allowing sensitive data to be stored in RAM unencrypted is another mitigation venue against DMA attacks. However, protection against reading the RAM's content is not enough, as writing to RAM via DMA may compromise seemingly secure storage outside of RAM bycode injection. An example of the latter kind of attack is TRESOR-HUNT, which exposes cryptographic keys that are never stored in RAM (but only in certain CPU registers); TRESOR-HUNT achieves this by overwriting parts of the operating system.[12]

Microsoft recommends changes to the default Windows configuration to prevent this if it is a concern.[13]

See also

[edit]

References

[edit]
  1. ^Freddie Witherden (2010-09-07)."Memory Forensics Over the IEEE 1394 Interface"(PDF). Retrieved2024-05-22.
  2. ^Piegdon, David Rasmus (2006-02-21).Hacking in Physically Addressable Memory - A Proof of Concept(PDF). Seminar of Advanced Exploitation Techniques, WS 2006/2007.
  3. ^"Blocking the SBP-2 Driver to Reduce 1394 DMA Threats to BitLocker".Microsoft. 2011-03-04. Retrieved2011-03-15.
  4. ^Tom Green."1394 Kernel Debugging: Tips And Tricks".Microsoft. Archived fromthe original on 2011-04-09. Retrieved2011-04-02.
  5. ^"Inception is a physical memory manipulation and hacking tool exploiting PCI-based DMA. The tool can attack over FireWire, Thunderbolt, ExpressCard, PC Card and any other PCI/PCIe interfaces.: carm." 28 June 2019 – via GitHub.
  6. ^"/linux/Documentation/Intel-IOMMU.txt". 14 July 2014. Archived fromthe original on 14 July 2014.
  7. ^"Linux Kernel Driver DataBase: CONFIG_AMD_IOMMU: AMD IOMMU support".cateee.net.
  8. ^Dansimp."Kernel DMA Protection (Windows 10) - Microsoft 365 Security".docs.microsoft.com. Retrieved2021-02-16.
  9. ^Hermann, Uwe (14 August 2008)."Physical memory attacks via FireWire/DMA - Part 1: Overview and Mitigation". Archived fromthe original on 4 March 2016.
  10. ^"Countermeasures: Protecting BitLocker-encrypted Devices from Attacks".Microsoft. January 2014. Archived fromthe original on 2014-03-24.
  11. ^"Thunderclap: Exploring Vulnerabilities in Operating System IOMMU Protection via DMA from Untrustworthy Peripherals – NDSS Symposium". Retrieved2020-01-21.
  12. ^Blass, Erik-Oliver (2012). "Tresor-Hunt".Proceedings of the 28th Annual Computer Security Applications Conference. pp. 71–78.doi:10.1145/2420950.2420961.ISBN 9781450313124.S2CID 739758.
  13. ^"KB2516445: Blocking the SBP-2 Driver to Reduce 1394 DMA Threats to Bitlocker".Microsoft. 2011-03-04. Retrieved2011-03-15.

External links

[edit]
Retrieved from "https://en.wikipedia.org/w/index.php?title=DMA_attack&oldid=1256011742"
Category:
Hidden categories:

[8]ページ先頭

©2009-2025 Movatter.jp