<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xml:base="http://www.hermann-uwe.de" xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
 <title>Uwe Hermann - Physical memory attacks via Firewire/DMA - Part 1: Overview and Mitigation (Update) - Comments</title>
 <link>http://www.hermann-uwe.de/blog/physical-memory-attacks-via-firewire-dma-part-1-overview-and-mitigation</link>
 <description>Comments for &quot;Physical memory attacks via Firewire/DMA - Part 1: Overview and Mitigation (Update)&quot;</description>
 <language>en</language>
<item>
 <title>Maybe, but it depends how</title>
 <link>http://www.hermann-uwe.de/blog/physical-memory-attacks-via-firewire-dma-part-1-overview-and-mitigation#comment-78962</link>
 <description>&lt;p&gt;Maybe, but it depends how the &quot;disable&quot; is done (which might be BIOS and hardware-specific). I wouldn&#039;t trust that unless you actually tested that disabling those options really spoils this specific attack.&lt;/p&gt;
&lt;p&gt;Uwe.&lt;/p&gt;
</description>
 <pubDate>Thu, 12 Nov 2009 22:46:33 +0100</pubDate>
 <dc:creator>Uwe Hermann</dc:creator>
 <guid isPermaLink="false">comment 78962 at http://www.hermann-uwe.de</guid>
</item>
<item>
 <title>There&#039;s another option that</title>
 <link>http://www.hermann-uwe.de/blog/physical-memory-attacks-via-firewire-dma-part-1-overview-and-mitigation#comment-78954</link>
 <description>&lt;p&gt;There&#039;s another option that seems to have been overlooked.  Many (if not all) motherboard BIOSes have the option of disabling the firewire ports and likely PCMCIA ports as well.&lt;/p&gt;
</description>
 <pubDate>Thu, 12 Nov 2009 06:27:12 +0100</pubDate>
 <dc:creator>Anonymous</dc:creator>
 <guid isPermaLink="false">comment 78954 at http://www.hermann-uwe.de</guid>
</item>
<item>
 <title>My Mac will be at your mercy</title>
 <link>http://www.hermann-uwe.de/blog/physical-memory-attacks-via-firewire-dma-part-1-overview-and-mitigation#comment-58051</link>
 <description>&lt;p&gt;My Mac will be at your mercy once again, I suppose.&lt;br /&gt;
So be it, next time we meet.&lt;/p&gt;
</description>
 <pubDate>Sat, 16 Aug 2008 22:12:53 +0200</pubDate>
 <dc:creator>DHReutter</dc:creator>
 <guid isPermaLink="false">comment 58051 at http://www.hermann-uwe.de</guid>
</item>
<item>
 <title>Firewire</title>
 <link>http://www.hermann-uwe.de/blog/physical-memory-attacks-via-firewire-dma-part-1-overview-and-mitigation#comment-58048</link>
 <description>&lt;p&gt;Yes, completely disabling Firewire via removal/destruction, in the BIOS/Firmware, or in the kernel/drivers is the best thing you can do if you don&#039;t ever use Firewire.&lt;/p&gt;
</description>
 <pubDate>Sat, 16 Aug 2008 04:09:52 +0200</pubDate>
 <dc:creator>Uwe Hermann</dc:creator>
 <guid isPermaLink="false">comment 58048 at http://www.hermann-uwe.de</guid>
</item>
<item>
 <title>phys_dma=0 and userland</title>
 <link>http://www.hermann-uwe.de/blog/physical-memory-attacks-via-firewire-dma-part-1-overview-and-mitigation#comment-58047</link>
 <description>&lt;p&gt;That&#039;s a good question. I don&#039;t know if there would be any breakage, but I expect slowdowns for devices which make heavy use of DMA (disks, video cameras, for instance). But I haven&#039;t tested any of this, I&#039;m just guessing here...&lt;/p&gt;
</description>
 <pubDate>Sat, 16 Aug 2008 04:05:39 +0200</pubDate>
 <dc:creator>Uwe Hermann</dc:creator>
 <guid isPermaLink="false">comment 58047 at http://www.hermann-uwe.de</guid>
</item>
<item>
 <title>FireWire can be completely disabled in Mac OS X.</title>
 <link>http://www.hermann-uwe.de/blog/physical-memory-attacks-via-firewire-dma-part-1-overview-and-mitigation#comment-58045</link>
 <description>&lt;p&gt;I have an iBook G4 running Leopard, and I toasted my FireWire controller. This caused all sorts of problems, until it occurred to me to disable the FireWire drivers. You don&#039;t need to recompile the kernel: just remove all of the kexts in /System/Library/Extensions that contain the text &quot;FireWire&quot; in their name. Then, remove /System/Library/Extensions.mkext (or, in Leopard, this file will be automatically rebuilt when you remove the extensions).&lt;/p&gt;
&lt;p&gt;Reboot, and your FireWire port is no more. Thus, if you are worried about security, and don&#039;t use FireWire, you can rest assured that it won&#039;t be a vector of attack.&lt;/p&gt;
&lt;p&gt;Of course, expecting real security on any machine to which attackers have physical access is a bit foolish.&lt;/p&gt;
</description>
 <pubDate>Fri, 15 Aug 2008 17:54:18 +0200</pubDate>
 <dc:creator>Anonymous</dc:creator>
 <guid isPermaLink="false">comment 58045 at http://www.hermann-uwe.de</guid>
</item>
<item>
 <title>Should Linux distro disable Firewire physical DMA by default?</title>
 <link>http://www.hermann-uwe.de/blog/physical-memory-attacks-via-firewire-dma-part-1-overview-and-mitigation#comment-58043</link>
 <description>&lt;p&gt;Since disabling physical DMA on Linux is trivial and effective, should the various Linux distributions ship with &quot;options ohci1394 phys_dma=0&quot; somewhere in modprobe config by default?  What would that break in userland?  Would the breakage be worth the added security?&lt;/p&gt;
&lt;p&gt;I can set phys_dma=0 myself, but I would rather have distro have it by default so that I do not have to think about it each time I set up a new machine...&lt;/p&gt;
</description>
 <pubDate>Fri, 15 Aug 2008 15:38:19 +0200</pubDate>
 <dc:creator>EtienneG</dc:creator>
 <guid isPermaLink="false">comment 58043 at http://www.hermann-uwe.de</guid>
</item>
<item>
 <title>OpenFirmware</title>
 <link>http://www.hermann-uwe.de/blog/physical-memory-attacks-via-firewire-dma-part-1-overview-and-mitigation#comment-58041</link>
 <description>&lt;p&gt;Interesting, I&#039;ll try to validate/reproduce this. Note however, that newer Macs are partially &lt;a href=&quot;http://en.wikipedia.org/wiki/Extensible_Firmware_Interface&quot;&gt;EFI&lt;/a&gt;-based (AFAIK) so this may not apply there...&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Update:&lt;/strong&gt; Oh, and this will only work for Mac OS X of course (as it&#039;s a feature in the Mac OS X kernel). If you&#039;re running Linux on Apple hardware for example (macbook, macmini, etc) then setting an OpenFirmware password will definately &lt;strong&gt;not&lt;/strong&gt; help! So be careful and always test if you&#039;re affected.&lt;/p&gt;
</description>
 <pubDate>Fri, 15 Aug 2008 03:29:00 +0200</pubDate>
 <dc:creator>Uwe Hermann</dc:creator>
 <guid isPermaLink="false">comment 58041 at http://www.hermann-uwe.de</guid>
</item>
<item>
 <title>blacklisting linux kernel modules</title>
 <link>http://www.hermann-uwe.de/blog/physical-memory-attacks-via-firewire-dma-part-1-overview-and-mitigation#comment-58040</link>
 <description>&lt;p&gt;Yep, that (partially) works, thanks!&lt;/p&gt;
&lt;p&gt;For the &quot;old&quot; Firewire stack it&#039;s sufficient to blacklist &lt;strong&gt;ohci1394&lt;/strong&gt; (and/or ieee1394, which ohci1394 depends on, if you want). However, you must &lt;strong&gt;also&lt;/strong&gt; run &lt;strong&gt;update-initramfs -u&lt;/strong&gt; after editing the blacklist file, otherwise the settings won&#039;t take effect on the next reboot (the modules will automatically be loaded while booting; manual loading after an rmmod will fail as expected, though).&lt;/p&gt;
&lt;p&gt;Also, I recommend to also put &lt;strong&gt;options ohci1394 phys_dma=0&lt;/strong&gt; into the blacklist file in order to force that option to be used should the module ever get loaded (for whatever reason).&lt;/p&gt;
&lt;p&gt;I&#039;ve updated the article with some more info on blacklisting (for the old Firewire stack). No testing done on the new stack yet, so I&#039;ve omitted that information for now until I have actually been able to test all of that...&lt;/p&gt;
</description>
 <pubDate>Fri, 15 Aug 2008 03:28:11 +0200</pubDate>
 <dc:creator>Uwe Hermann</dc:creator>
 <guid isPermaLink="false">comment 58040 at http://www.hermann-uwe.de</guid>
</item>
<item>
 <title>Blacklisting firewire in software</title>
 <link>http://www.hermann-uwe.de/blog/physical-memory-attacks-via-firewire-dma-part-1-overview-and-mitigation#comment-58038</link>
 <description>&lt;p&gt;Is this, in a file in modprobe.d, enough to prevent this attack for Linux users who never want to use Firewire?&lt;/p&gt;
&lt;p&gt;# prevent automatic loading&lt;br /&gt;
blacklist sbp2&lt;br /&gt;
blacklist ieee1394&lt;br /&gt;
blacklist ohci1394&lt;br /&gt;
blacklist raw1394&lt;br /&gt;
blacklist eth1394&lt;br /&gt;
blacklist dv1394&lt;br /&gt;
blacklist firewire-ohci&lt;br /&gt;
blacklist firewire-core&lt;br /&gt;
blacklist firewire-sbp2&lt;br /&gt;
# and just for paranoia, prevent manual loading&lt;br /&gt;
install sbp2 false&lt;br /&gt;
install ieee1394 false&lt;br /&gt;
install ohci1394 false&lt;br /&gt;
install raw1394 false&lt;br /&gt;
install eth1394 false&lt;br /&gt;
install dv1394 false&lt;br /&gt;
install firewire-ohci false&lt;br /&gt;
install firewire-core false&lt;br /&gt;
install firewire-sbp2 false&lt;/p&gt;
</description>
 <pubDate>Thu, 14 Aug 2008 16:54:27 +0200</pubDate>
 <dc:creator>smcv</dc:creator>
 <guid isPermaLink="false">comment 58038 at http://www.hermann-uwe.de</guid>
</item>
<item>
 <title>Macs</title>
 <link>http://www.hermann-uwe.de/blog/physical-memory-attacks-via-firewire-dma-part-1-overview-and-mitigation#comment-58037</link>
 <description>&lt;p&gt;There&#039;s &lt;a href=&quot;http://rentzsch.com/macosx/securingFirewire&quot;&gt;claims that setting an OpenFirmware password disables Firewire DMA&lt;/a&gt;.&lt;/p&gt;
</description>
 <pubDate>Thu, 14 Aug 2008 16:22:35 +0200</pubDate>
 <dc:creator>James</dc:creator>
 <guid isPermaLink="false">comment 58037 at http://www.hermann-uwe.de</guid>
</item>
<item>
 <title>Physical memory attacks via Firewire/DMA - Part 1: Overview and Mitigation (Update)</title>
 <link>http://www.hermann-uwe.de/blog/physical-memory-attacks-via-firewire-dma-part-1-overview-and-mitigation</link>
 <description>&lt;p&gt;&lt;a href=&quot;http://www.hermann-uwe.de/photoblog/firewire-cable&quot;&gt;&lt;img src=&quot;http://www.hermann-uwe.de/files/images/firewire_cable.preview.jpg&quot; width=&quot;160&quot; height=&quot;120&quot; align=&quot;right&quot; hspace=&quot;5&quot; alt=&quot;Firewire cables&quot; /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;This is part 1 of a series on articles about the Firewire security issues mentioned below.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;For many years now, attacks via &lt;a href=&quot;http://en.wikipedia.org/wiki/FireWire#Security_issues&quot;&gt;Firewire / i.LINK / IEEE 1394&lt;/a&gt; have been a known security issue. Basically, if you gain physical access to a PC or laptop which has Firewire ports (or PCMCIA/Cardbus/ExpressCard, more on that later) you can&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;read arbitrary RAM contents from the victim&#039;s system,&lt;/li&gt;
&lt;li&gt;overwrite arbitrary RAM contents with whatever you want,&lt;/li&gt;
&lt;li&gt;and perform many, many severe attacks based on the two issues above. Examples include grabbing a full RAM dump via Firewire (takes only a few minutes), grabbing ssh-agent keys, grabbing screen contents, modifying screen contents, bypassing login/password screens, and many, many more...&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;All of this is done by exploiting a &quot;feature&quot; of the &lt;a href=&quot;http://www.storm.net.nz/static/files/ohci_11.pdf&quot;&gt;Firewire spec (OHCI-1394)&lt;/a&gt; (PDF), namely that it allows read/write access to physical memory (via &lt;a href=&quot;http://en.wikipedia.org/wiki/Direct_Memory_Access&quot;&gt;DMA&lt;/a&gt;) for external Firewire devices. Worse, as this is DMA, the CPU/OS will not even know what&#039;s going on. Even worse, this works regardless of whether you have locked your screen with a password-protected screensaver, or xlock, or vlock, or whatever. As long as the system is running, you&#039;re vulnerable.&lt;/p&gt;
&lt;p&gt;In this article, I intend to give a fairly complete overview of the available papers published on this issue, tools for testing the attacks, as well as mitigation techniques for various OSes. If I&#039;m missing some important papers or tools, please post a comment!&lt;/p&gt;
&lt;h2&gt;Papers, Attacks, and Tools&lt;/h2&gt;
&lt;p&gt;Over the years a number of presentations and papers have been released with information about these Firewire issues.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Maximilian Dornseif et. al.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;The first publication that I know of was done by &lt;a href=&quot;http://md.hudora.de/&quot;&gt;Maximilian Dornseif&lt;/a&gt;, &lt;a href=&quot;http://pi1.informatik.uni-mannheim.de/index.php?inc=staffhome.php3&amp;amp;user_id=18&quot;&gt;Michael Becher&lt;/a&gt;, and Christian Klein. They gave a number of talks on various security conferences on this topic:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;http://md.hudora.de/presentations/#firewire-pacsec&quot;&gt;Pacsec 2004: 0wned by an iPod&lt;/a&gt; (&lt;a href=&quot;http://md.hudora.de/presentations/firewire/PacSec2004.pdf&quot;&gt;PDF&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://md.hudora.de/presentations/#firewire-21c3&quot;&gt;21C3: Hacking with Fire&lt;/a&gt; / &lt;a href=&quot;http://www.ccc.de/congress/2004/fahrplan/event/14.en.html&quot;&gt;Feuriges Hacken - Spaß mit Firewire&lt;/a&gt; (&lt;a href=&quot;http://md.hudora.de/presentations/firewire/2004-firewire-21c3.pdf&quot;&gt;PDF&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://md.hudora.de/presentations/#firewire-cansecwest&quot;&gt;Cansecwest 2005: Firewire: all your memory are belong to us&lt;/a&gt; (&lt;a href=&quot;http://md.hudora.de/presentations/firewire/2005-firewire-cansecwest.pdf&quot;&gt;PDF&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://md.hudora.de/presentations/firewire/&quot;&gt;http://md.hudora.de/presentations/firewire/&lt;/a&gt;: further papers and demo videos&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;They also released a number of tools, Firewire libraries for Mac OS X and Linux, as well as small demo scripts which use those libs:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;http://c0re.23.nu/c0de/pyfw/pyfw-20041111.tar.gz&quot;&gt;pyfw-20041111.tar.gz&lt;/a&gt;: Mac OS X Firewire bindings for Python, various demos&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://c0re.23.nu/c0de/pyfw/&quot;&gt;http://c0re.23.nu/c0de/pyfw/&lt;/a&gt;: Other versions of the above code&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://md.hudora.de/presentations/firewire/pyfw_linux.tar.gz&quot;&gt;pyfw_linux.tar.gz&lt;/a&gt;: Linux Firewire bindings for Python (can be used with above demo code on Linux)&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://md.hudora.de/presentations/firewire/ipod-linux-pyfw.tar.bz2&quot;&gt;ipod-linux-pyfw.tar.bz2&lt;/a&gt;: Instructions (+ disk image) on how to turn your iPod into a Firewire attack tool&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Adam Boileau&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;In 2006 &lt;a href=&quot;http://storm.net.nz/metl&quot;&gt;Adam Boileau (a.k.a. Metlstorm)&lt;/a&gt; gave a talk called &lt;a href=&quot;http://storm.net.nz/static/files/ab_firewire_rux2k6-final.pdf&quot;&gt;Hit by a Bus: Physical Access Attacks with Firewire&lt;/a&gt; (PDF) at &lt;a href=&quot;http://www.ruxcon.org.au/2006-presentations.shtml#14&quot;&gt;Ruxcon 2006&lt;/a&gt;. In 2008 he then released a set of tools:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;http://storm.net.nz/static/files/pythonraw1394-1.0.tar.gz&quot;&gt;pythonraw1394-1.0.tar.gz&lt;/a&gt;: Python bindings for &lt;a href=&quot;http://linux1394.org/&quot;&gt;libraw1394&lt;/a&gt; (Linux). Tools: businfo, romtool, 1394memimage&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://storm.net.nz/static/files/winlockpwn&quot;&gt;winlockpwn&lt;/a&gt;: Python script which can circumvent a locked Windows XP screen (an arbitrary password will log you in)&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://storm.net.nz/static/files/bioskbsnarf&quot;&gt;bioskbsnarf&lt;/a&gt;: Grabs/shows the BIOS keyboard buffer via Firewire (which often contains your BIOS password)&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Peter Panholzer&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;As of early 2008 Peter Panholzer from &lt;a href=&quot;http://www.sec-consult.com/publikationen.html&quot;&gt;sec-consult.com&lt;/a&gt; published a two-page whitepaper which says they were able to run a winlockpwn-like attack on Windows Vista via Firewire. There&#039;s not much information in the PDF unfortunately, and no tools were released, as far as I know.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;http://www.sec-consult.com/publikationen.html&quot;&gt;Whitepaper: Physical Security Attacks on Windows Vista&lt;/a&gt; (&lt;a href=&quot;http://www.sec-consult.com/files/Vista_Physical_Attacks.pdf&quot;&gt;PDF&lt;/a&gt;)
&lt;li&gt;&lt;a href=&quot;http://seclists.org/bugtraq/2008/Mar/index.html#42&quot;&gt;Bugtraq Thread about the whitepaper&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;David R. Piegdon&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;The most recent toolset and papers I know of are from &lt;a href=&quot;http://eh2008.koeln.ccc.de/fahrplan/speakers/1149.de.html&quot;&gt;David R. Piegdon (a.k.a. IosTrace)&lt;/a&gt;, who gave a number of talks in 2007/2008 about the issue, and also released a toolset called SEAT1394.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;http://koeln.ccc.de/updates/2007-02-17_FireWire.xml&quot;&gt;2007: OpenChaos: hacking in physically addressable memory&lt;/a&gt; (no extra slides)&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://eh2008.koeln.ccc.de/fahrplan/events/2466.de.html&quot;&gt;Easterhegg 2008: FireWire Hacking&lt;/a&gt;: &lt;a href=&quot;http://eh2008.koeln.ccc.de/fahrplan/attachments/1067_SEAT1394-svn-r432-paper.pdf&quot;&gt;paper&lt;/a&gt; (PDF), &lt;a href=&quot;http://eh2008.koeln.ccc.de/fahrplan/attachments/1068_SEAT1394-svn-r432-slides.pdf&quot;&gt;slides&lt;/a&gt; (PDF)&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://david.piegdon.de/papers.html&quot;&gt;More papers here...&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://0null.net/software/SEAT1394/&quot;&gt;http://0null.net/software/SEAT1394/&lt;/a&gt;: tools and libraries for pyhsical memory access via Firewire/DMA: 1394csrtool, liblinear, libphysical, debug-sshkey, dump-memory, remote-ps, show-stack, snarf-sshkey, test-all-pagedirs, dmashell, ...&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;I&#039;ll go into much more detail on how the tools are used and what they can do in another follow-up article.&lt;/p&gt;
&lt;h2&gt;Mitigation&lt;/h2&gt;
&lt;p&gt;There are ways to eliminate or at least mitigate these attack vectors. The simplest and most secure way is to not have &lt;em&gt;any&lt;/em&gt; Firewire ports installed (don&#039;t put Firewire PCI/PCIe cards in your PC, don&#039;t use Firewire PCMCIA/Cardbus/ExpressCard cards). Now, if you have a laptop with built-in Firewire ports, you have a problem, of course. In that case you could still physically destroy the port (by opening the laptop and cutting/desoldering stuff, or by putting glue/epoxy in the port in order to prevent any Firewire cables being attached). These are slightly drastic (but effective!) measures.&lt;/p&gt;
&lt;p&gt;Note: Even if you don&#039;t have any Firewire ports, you&#039;re not automatically safe and secure. If your laptop has a PCMCIA/Cardbus/ExpressCard slot, an attacker can simply insert a PCMCIA Firewire card (for instance) in that slot. Chances are, that your OS will automatically load the driver for that card and also the Firewire drivers you&#039;ll need if you want to use the card for attaching Firewire devices. Game over. Your &quot;secure&quot; laptop is now vulnerable...&lt;/p&gt;
&lt;p&gt;If you cannot (or don&#039;t want to) remove/destroy/disable your Firewire ports, the next best thing is to ensure that nobody except yourself ever gets physical access to your PC/laptop. This is hard to do for a PC, and almost impossible for a laptop, mind you.&lt;/p&gt;
&lt;p&gt;Finally, there are some software measures you can use to prevent at least physical DMA access for Firewire devices:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Mitigation: Linux&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Pretty much every Linux system with the &quot;old&quot; Firewire drivers loaded (kernel module &lt;strong&gt;ohci1394&lt;/strong&gt; et. al.) is vulnerable to these issues. Newer kernels now also ship with a new Firewire stack called &quot;juju&quot; (kernel module &lt;strong&gt;firewire_ohci&lt;/strong&gt; et. al.) which may or may not have the same issues (not fully tested by me so far, will report back later).&lt;/p&gt;
&lt;p&gt;Per default, all recent kernels, e.g. 2.6.26, are vulnerable, but see below.&lt;/p&gt;
&lt;p&gt;Under Linux, simply using a kernel which doesn&#039;t have any Firewire support (neither built-in, nor as a module) is the most secure option. If you must have Firewire support you can load the &lt;strong&gt;ohci1394&lt;/strong&gt; module with the &lt;strong&gt;phys_dma=0&lt;/strong&gt; parameter to at least disable physical DMA support:&lt;/p&gt;
&lt;pre&gt;
  $ rmmod ohci1394
  $ modprobe ohci1394 phys_dma=0
&lt;/pre&gt;&lt;p&gt;
I have personally tested this on some boxes and I can confirm that it renders the currently published tools useless.&lt;/p&gt;
&lt;p&gt;If you don&#039;t use Firewire at all, you can simply &lt;strong&gt;rmmod ohci1394&lt;/strong&gt;, and (for a permanent fix) add the following lines in &lt;strong&gt;/etc/modprobe.d/blacklist&lt;/strong&gt; and then (important!) run &lt;strong&gt;update-initramfs -u&lt;/strong&gt; afterwards!&lt;/p&gt;
&lt;pre&gt;
  # Prevent automatic loading of the ohci1394 module.
  blacklist ohci1394
  # Prevent manual loading of the ohci1394 module.
  install ohci1394 false
  # Iff we should ever load the ohci1394 module, force the use of the &#039;phys_dma=0&#039; option.
  options ohci1394 phys_dma=0
&lt;/pre&gt;&lt;p&gt;
As for the new &quot;juju&quot; Firewire stack, I&#039;m not so sure. A few quick tests showed that the currently available tools don&#039;t work with the new stack, &lt;strong&gt;but&lt;/strong&gt; you shouldn&#039;t feel too secure! AFAIK the new stack does support (or will support soon) physical DMA for Firewire, so it&#039;s probably just a matter of adapting the tools a bit (I&#039;ll do some testing/research on this later, as time permits).&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Mitigation: Mac OS X&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;On Mac OS you &lt;em&gt;might&lt;/em&gt; also be able to completely remove Firewire support from the kernel (but I don&#039;t know if/how that can be done, not sure if you can easily recompile Mac OS kernels, and/or if you even have buildable source code and toolchains for that). However, you can at least remove the Firewire support in the default Mac OS installation by unloading &lt;strong&gt;AppleFWOHCI.kext&lt;/strong&gt;:&lt;/p&gt;
&lt;pre&gt;
  $ sudo kextunload /System/Library/Extensions/IOFireWireFamily.kext/Contents/PlugIns/AppleFWOHCI.kext
&lt;/pre&gt;&lt;p&gt;
Thanks to a &lt;a href=&quot;http://dhreutter.de&quot;&gt;Daniel Reutter&lt;/a&gt; for &lt;a href=&quot;http://dhreutter.de/?q=blog/escaping-firewire-dma-attack&quot;&gt;letting me abuse his MacBook via Firewire&lt;/a&gt; and for finding the above kextunload command line. We have successfully tested that after unloading &lt;strong&gt;AppleFWOHCI.kext&lt;/strong&gt; the current tools won&#039;t work anymore.&lt;/p&gt;
&lt;p&gt;The tests were done on a Mac OS X 10.5 (Leopard) with all recent security updates applied. Please leave a comment if you can test other versions of Mac OS X...&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Mitigation: Windows&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;As for Windows, well, I guess you&#039;re screwed. While Windows XP does implement sort of &quot;protection&quot; in that it only allows physical DMA access via Firewire to devices which &quot;deserve it&quot;, e.g. iPods (or any other Firewire mass storage device, I guess) this can be easily defeated by having your attack PC/laptop pretend to be an iPod (see the &lt;strong&gt;romtool&lt;/strong&gt; Python script by Adam Boileau).&lt;/p&gt;
&lt;p&gt;The only remaining option I know of (short of removing/destroying Firewire ports or preventing physical access alltogether) is to disable the Firewire ports/drivers in the device manager (untested by me so far). If you do that, remember to also disable all PCMCIA/Cardbus/ExpressCard controllers, of course (see above).&lt;/p&gt;
&lt;p&gt;So far I&#039;ve tested Windows XP SP2 successfully with Adam Boileau&#039;s winlockpwn. Windows XP SP3 doesn&#039;t seem to work, though (winlockpwn likely needs tweaking). I haven&#039;t yet been able to test Windows 95/98/Vista, if you can verify one of them, please leave a comment.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Mitigation: OpenBSD/FreeBSD/NetBSD/OpenSolaris/...&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;On OpenBSD you&#039;re likely not vulnerable as OpenBSD doesn&#039;t have any Firewire drivers at all, as far as I know ;-)&lt;/p&gt;
&lt;p&gt;As for FreeBSD, NetBSD, OpenSolaris, and other OSes I don&#039;t have any information. I might be able to test one or two of them in the nearer future, but please leave a comment if you have some information about whether they are vulnerable and/or how you can secure your system...&lt;/p&gt;
&lt;h2&gt;Further Resources&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;http://security4all.blogspot.com/2008/03/unlock-windows-pc-without-password.html&quot;&gt;Security4all: Unlock a Windows PC without the password through Firewire (UPDATED)&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://www.matasano.com/log/695/windows-remote-memory-access-though-firewire/&quot;&gt;Windows Remote Memory Access Though FireWire&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://www.engadget.com/2008/03/04/windows-passwords-easily-bypassed-over-firewire/&quot;&gt;Windows passwords easily bypassed over Firewire&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://www.codeangel.org/article/crack_a_mac_with_firewire&quot;&gt;Crack a Mac with Firewire&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://blog.juhonkoti.net/2008/02/29/automated-os-x-macintosh-password-retrieval-via-firewire&quot;&gt;Automated os x macintosh password retrieval via firewire&lt;/a&gt; (no tools released)&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://it.slashdot.org/article.pl?sid=08/03/04/1258210&quot;&gt;Aging Security Vulnerability Still Allows PC Takeover&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://www.theage.com.au/news/security/hack-into-a-windows-pc-no-password-needed/2008/03/04/1204402423638.html&quot;&gt;Hack into a Windows PC - no password needed&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://www.darkreading.com/blog.asp?blog_sectionid=447&amp;amp;doc_id=147718&quot;&gt;No Firewire for Hack? No Problem&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://www.techworld.com/security/news/index.cfm?NewsID=11615&quot;&gt;Techworld: Windows hacked in seconds via Firewire&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://www.infopackets.com/news/hardware/2008/20080311_firewire_hack_also_works_with_windows_vista.htm&quot;&gt;Infopackets.com: FireWire Hack Also Works With Windows Vista&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://computer.forensikblog.de/en/2008/02/acquisition_5_firewire.html&quot;&gt;Computer Forensic Blog: Acquisition (5): FireWire&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://www.darkreading.com/document.asp?doc_id=147713&quot;&gt;Tool Physically Hacks Windows (Lets an attacker use Firewire to take over a &#039;locked&#039; Windows machine)&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://www.infopackets.com/news/security/2008/20080306_tool_can_hack_into_a_windows_pc_sans_password.htm&quot;&gt;Tool Can Hack Into A Windows PC Sans Password&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://www.informationweek.com/news/personal_tech/showArticle.jhtml?articleID=206901949&quot;&gt;InformationWeek: Windows XP FireWire Attack Also Defeats Windows Vista &lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://www.stuff.co.nz/4425376a28.html&quot;&gt;Stuff.co.nz: Kiwi security expert exposes Windows flaw&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://www.hackszine.com/blog/archive/2008/03/ram_dump_over_firewire.html&quot;&gt;Hackszine.com: Ram dump over Firewire&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://ntsecurity.nu/onmymind/2006/2006-09-02.html&quot;&gt;ntsecurity.nu: Memory dumping over FireWire - UMA issues &lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://computer.forensikblog.de/en/2006/09/problem_when_dumping_memory_over_firewire.html&quot;&gt;Computer Forensic Blog: Problem when Dumping Memory over FireWire&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://security4all.blogspot.com/2008/03/partytricks-winlockpwn-tutorial-or-how.html&quot;&gt;Security4all: Partytricks: a winlockpwn tutorial or how to log into a computer without the password&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://matt.ucc.asn.au/apple/&quot;&gt;Apple Bits: Firewire Physical DMA Security&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://kerneltrap.org/node/145#comments&quot;&gt;Kerneltrap: FreeBSD: Remote gdb With FireWire&lt;/a&gt; (see discussion on Firewire security in the comments)&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://blogs.23.nu/RedTeam/stories/5201/&quot;&gt;RedTeam: FireWire round-up&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://www.smh.com.au/news/security/security-conference-to-debut-windows-firewire-crack/2006/09/18/1158431640614.html&quot;&gt;smh.com.au: Security conference to debut Windows firewire crack&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://itradio.com.au/security/?p=61&quot;&gt;Risky Business #52 — EXCLUSIVE: Winlockpwn code release&lt;/a&gt; (audio podcast)&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://www.theregister.co.uk/2008/03/04/windows_password_bypass_tool/&quot;&gt;The Register: Tool makes mincemeat of Windows passwords&lt;/a&gt; (many user comments here)&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://www.schneier.com/blog/archives/2008/03/physically_hack.html&quot;&gt;Schneier on Security: Physically Hacking Windows Computers via FireWire&lt;/a&gt; (make sure to read the comments)&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://www.heise-online.co.uk/security/Windows-login-bypass-tool-released--/news/110249&quot;&gt;Heise: Windows login bypass tool released&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://isc.sans.org/diary.html?storyid=4123&quot;&gt;SANS Internet Storm Center: Firewire in the limelight&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://www.darknet.org.uk/2008/03/new-windows-xp-vista-full-take-over-hack-with-firewire/&quot;&gt;Darknet: New Windows XP &amp;amp; Vista Full Take-over Hack with Firewire &lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://mooseyard.com/Jens/2008/03/physical-attacks-via-firewire/&quot;&gt;Thought Palace: Physical Attacks via FireWire&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://rentzsch.com/macosx/securingFirewire&quot;&gt;rentzsch.com: Securing Firewire&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://blog.chip.de/0-security-blog/windows-knacken-per-firewire-20080307/&quot;&gt;CHIP Online: Windows knacken per Firewire&lt;/a&gt; (German)&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://my.88db.com/my/Knowledge/Knowledge_Detail.page/Computers_Internet/?kid=10596&quot;&gt;88DB Malaysia: Lock Your Workstations, Or Not: New Tool Bypasses Windows Logon&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://www.kire.ch/datenschutz/keyrecovery.htm&quot;&gt;kire.ch: Aushebeln der Festplattenverschlüsselung durch Zugriff auf den Hauptspeicher - und Gegenmittel&lt;/a&gt; (German)&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://metalab.at/wiki/SYMWorkshop&quot;&gt;SYMWorkshop: Secure Your Mac Workshop&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://enkhbayar.net/2008/03/05/firewire-port-vulnerability/&quot;&gt;SE’s Weblog: Firewire port vulnerability&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://translate.google.com/translate?u=http%3A%2F%2Fblog.knudde.be%2FFirewire%2BDMA&amp;amp;sl=nl&amp;amp;tl=en&amp;amp;hl=en&amp;amp;ie=UTF-8&quot;&gt;Knudde.be blog: Firewire DMA&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://www.nabble.com/IEEE-1394-(FireWire)-Memory-Imaging-td9110867.html&quot;&gt;Mailing list thread: IEEE 1394 (FireWire) Memory Imaging&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://en.wikipedia.org/wiki/FireWire#Security_issues&quot;&gt;http://en.wikipedia.org/wiki/FireWire#Security_issues&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://www.friendsglobal.com/papers/FireWire%20Memory%20Dump%20of%20Windows%20XP.pdf&quot;&gt;A. Martin: FireWire Memory Dump of Windows XP: A Forensic Approach&lt;/a&gt; (PDF)&lt;/li&gt;
&lt;li&gt;Random blogs: &lt;a href=&quot;http://secauditor.wordpress.com/2008/03/09/thwart-windows-authentication-through-firewire/&quot;&gt;1&lt;/a&gt;, &lt;a href=&quot;http://www.hbarel.com/Blog/entry0023.html&quot;&gt;2&lt;/a&gt;, &lt;a href=&quot;http://www.tumelum.de/blog/index.php?/archives/26-Direktangriffe-auf-den-Hauptspeicher.html&quot;&gt;3&lt;/a&gt;, &lt;a href=&quot;http://roawtech.wordpress.com/2008/03/10/ram-dump-over-firewire-security/&quot;&gt;4&lt;/a&gt;, &lt;a href=&quot;http://www.omninerd.com/news/Firewire_Interface_Hack&quot;&gt;5&lt;/a&gt;, &lt;a href=&quot;https://tepin.aiki.de/blog/archives/278-Winlockpwn-Firewire-port-Owned.html&quot;&gt;6&lt;/a&gt;, &lt;a href=&quot;https://tepin.aiki.de/blog/archives/268-Memory-Dump-per-Firewire.html&quot;&gt;7&lt;/a&gt;&lt;/li&gt;
&lt;p&gt;&lt;!--&lt;/p&gt;
&lt;li&gt;&lt;a href=&quot;&quot;&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;&quot;&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;&quot;&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;&quot;&gt;&lt;/a&gt;&lt;/li&gt;
&lt;p&gt; --&gt;&lt;/p&gt;
&lt;p&gt;&lt;!-- https://bugs.launchpad.net/ubuntu/+source/linux/+bug/200109 --&gt;&lt;/p&gt;
&lt;/ul&gt;
&lt;h2&gt;Conclusion&lt;/h2&gt;
&lt;p&gt;That&#039;s it for now. I hope you now have a good overview of these issues and how to protect. I can only urge you to take this problem seriously! Three or four minutes of leaving your laptop unattended are fully sufficient for an attacker to get a full forensic image of all your RAM contents for later analysis. This is at least as critical as the &lt;a href=&quot;http://citp.princeton.edu/memory/&quot;&gt;Cold Boot attacks&lt;/a&gt;, if not worse.&lt;/p&gt;
&lt;p&gt;I will follow-up with more articles about some more interesting details on these Firewire issues, how to use the above tools, and I&#039;ll report on some of the stuff I was able to find in RAM dumps gathered via Firewire...&lt;/p&gt;
&lt;p&gt;&lt;strong style=&quot;color:red&quot;&gt;Update 2008-08-15:&lt;/strong&gt; Added information on how to blacklist the Firewire modules on Linux (for permanent mitigation).&lt;br /&gt;
&lt;strong style=&quot;color:red&quot;&gt;Update 2008-08-16:&lt;/strong&gt; Added links to further articles. Windows XP SP3 doesn&#039;t seem to work with winlockpwn.&lt;/p&gt;
</description>
 <comments>http://www.hermann-uwe.de/blog/physical-memory-attacks-via-firewire-dma-part-1-overview-and-mitigation#comments</comments>
 <category domain="http://www.hermann-uwe.de/taxonomy/term/1980">1394</category>
 <category domain="http://www.hermann-uwe.de/taxonomy/term/1981">1394memimage</category>
 <category domain="http://www.hermann-uwe.de/taxonomy/term/1983">businfo</category>
 <category domain="http://www.hermann-uwe.de/taxonomy/term/333">dma</category>
 <category domain="http://www.hermann-uwe.de/taxonomy/term/1984">dmashell</category>
 <category domain="http://www.hermann-uwe.de/taxonomy/term/1032">dump</category>
 <category domain="http://www.hermann-uwe.de/taxonomy/term/1985">dump-memory</category>
 <category domain="http://www.hermann-uwe.de/taxonomy/term/1972">firewire</category>
 <category domain="http://www.hermann-uwe.de/taxonomy/term/1158">forensics</category>
 <category domain="http://www.hermann-uwe.de/taxonomy/term/144">hack</category>
 <category domain="http://www.hermann-uwe.de/taxonomy/term/1973">ilink</category>
 <category domain="http://www.hermann-uwe.de/taxonomy/term/619">ipod</category>
 <category domain="http://www.hermann-uwe.de/taxonomy/term/60">linux</category>
 <category domain="http://www.hermann-uwe.de/taxonomy/term/1555">macos</category>
 <category domain="http://www.hermann-uwe.de/taxonomy/term/512">memory</category>
 <category domain="http://www.hermann-uwe.de/taxonomy/term/1978">mitigation</category>
 <category domain="http://www.hermann-uwe.de/taxonomy/term/757">paper</category>
 <category domain="http://www.hermann-uwe.de/taxonomy/term/1979">phyical</category>
 <category domain="http://www.hermann-uwe.de/taxonomy/term/1851">ram</category>
 <category domain="http://www.hermann-uwe.de/taxonomy/term/1982">romtool</category>
 <category domain="http://www.hermann-uwe.de/taxonomy/term/1976">seat1394</category>
 <category domain="http://www.hermann-uwe.de/taxonomy/term/38">security</category>
 <category domain="http://www.hermann-uwe.de/taxonomy/term/1974">slides</category>
 <category domain="http://www.hermann-uwe.de/taxonomy/term/1977">vista</category>
 <category domain="http://www.hermann-uwe.de/taxonomy/term/1316">windows</category>
 <category domain="http://www.hermann-uwe.de/taxonomy/term/1975">winlockpwn</category>
 <category domain="http://www.hermann-uwe.de/taxonomy/term/1519">xp</category>
 <pubDate>Thu, 14 Aug 2008 14:55:28 +0200</pubDate>
 <dc:creator>Uwe Hermann</dc:creator>
 <guid isPermaLink="false">1365 at http://www.hermann-uwe.de</guid>
</item>
</channel>
</rss>
