12 ms·
How the NSA’s Firmware Hacking Works and Why It’s So Unsettling
- GizaDog 12y agoDoes anyone care? I think not.
- jimktrains2 12y agoI guess I don't understand this comment. Someone wrote about it, so obviously they care. Moreover, firmware is normally considered safe, if it's not then that is a significant shift in paradigm for the security conscious.
- anonbanker 12y agoBut why would someone create a new account to make that comment?
- mirimir 12y agoBecause it's a passive-aggressive comment that translates to something like "Who would care, except for those who want the terrists to win?" ;)
- AnthonyMouse 12y ago> Hard disk makers don’t cryptographically sign the firmware they install on drives the way software vendors do. That is not a solution for this. You have to assume that a state-level attacker will be able to either coerce the vendor or its employees into signing malicious firmware or just compromise their network and steal the signing key. The right way to secure firmware updates is with a hardware write-enable switch/jumper that has to be physically set to make any changes to the firmware.
- tw04 12y agoI guess I could see having that as an option, but reality is that every vendor would just ship the dries with the jumper in the "flashme" position by default. Asking a consumer to pull out a drive and move a jumper to install an update is akin to asking them to remove their own spleen.
- hueving 12y agoHow often do consumers actually have to flash a hard drive with new firmware?
- tedunangst 12y agoI think every SSD I've owned, from three manufacturers, recommended firmware updates. Not nearly as rare as such updates were ten years ago.
- semi-extrinsic 12y agoI own several SSDs, but have never updated any firmwares. How do you get notified?
- thoth 12y agoProbably from installing the utility program that often comes with the SSD. I bought a Samsung 840 EVO recently and it came with "Samsung Magician" which dutifully tells me about the Feb 2015 update available. http://www.samsung.com/global/business/semiconductor/minisite/SSD/global/html/support/downloads.html http://www.samsung.com/global/business/semiconductor/minisit... Now tedu being a BSD guy ;) probably is finding out some other way but I'm going to guess the vast majority of SSD customers have a Windows or Mac computer and just go with the utility provided by the hardware vendor, Samsung or some other company.
- semi-extrinsic 12y agoI see. All my computers run ArchLinux. Guess I should skim through the manufacturers recommendations some time.
- sjtrny 12y agoPhysical switches can easily be bypassed in the code.
- mmastrac 12y agoNot if the physical switch is directly controlling the NAND's !WP pin. If that's possible it's beyond my knowledge. eg: http://www.hynix.com/datasheet/pdf/flash/HY27UF084G2M%20Series%28Rev.0.7%29.pdf http://www.hynix.com/datasheet/pdf/flash/HY27UF084G2M%20Seri...
- sjtrny 12y agoIt seems unlikely that any PC manufacturer (Apple, Dell, HP etc) would force their users to open up their machines and flick the WP switch on the hard drive controller to install a firmware update.
- andrewpi 12y agoThey could wire it to a key on the keyboard, so you have to hold down 'Esc' to flash a firmware update, for example.
- mmastrac 12y agoUnless you've got a direct electrical connection between the Esc key and that pin, you've unfortunately introduced a way for software to do the same thing as holding Esc.
- mmastrac 12y agoHow often have you honestly installed a firmware update on an HDD ever? I think I've done it maybe twice in my lifetime. Both times required jumping through crazy hoops creating boot floppies. Apple would likely just ask you to bring it into the Apple store.
- eli 12y ago
- manicdee 12y agoPhysical switches are no impediment to people who already gain physical access in transit.
- rl3 12y agoPhysical switches would be an impediment, actually. Some targets may fall under surveillance and not acquire new hardware for long periods of time. Years.
- AnthonyMouse 12y agoWith physical access they could just program the flash chips directly or replace the entire hard drive with a compromised one. The only way to defend against physical access is to prevent physical access.
- pdkl95 12y agoIt was a serious design flaw to move away from physical write-enable protection. Physical interlocks for rare-but-important events such as upgrading firmware should exist in almost all situations. Look back at floppy disks: while many people were caught by the write-protect tab/switch while they were still learning, it was an easy concept for people to understand once taught. I knew many non-technical people that quickly adopted habits that utilized write-protection. The physical interlock is something that can be taught a lot easier than how to use crypto without screwing up. If you require proactive checking or fancy technique, it will be forgotten and skipped. On the other hand, if you fail the update with a message "did you forget to flip the write-protect switch? [picture of switch]", a lot of people will figure it out. There are similarities to Schneier's (et al) recommendation to make good (long, random) passwords, but write them down and keep them someplace safe. (i.e. leverage the physical security knowledge that people already have)
- tehwalrus 12y agoI still use write protection on SD cards, since I had a buggy Mac that reformatted one to be unusable by my camera. I just got into the habit of flipping the switch whenever plugging a card into a machine, and it works fine (and is slightly safer).
- jnbiche 12y agoYeah, as you suggest by your "slightly safer" parenthetical, the mechanical write protection on most SD cards is just a suggestion that the card reader is free to ignore (though obviously most don't). It's actually specified in the SD spec [1], which says on p. 38 that the mechanical protect switch is "Host responsibility only" and that the "The position of the write protect switch is unknown to the internal circuitry of the card." 1. https://www.sdcard.org/downloads/pls/simplified_specs/part1_410.pdf https://www.sdcard.org/downloads/pls/simplified_specs/part1_... [pdf file]
- tehwalrus 12y agoI did read that somewhere, but I'd forgotten.. Good catch! Hardware write protection is harder to find than you think..
- userbinator 12y agoEven with hardware write-enable, they could just ship the firmware with the backdoor code by default, and sign it too. This somewhat reminds me of Computrace in the BIOS - it's advertised as a "theft recovery" solution, but could also be used as a firmware-level backdoor, and many laptops are sold with this preinstalled in the BIOS without the user's knowledge. (It's easy enough to remove for those who are into hacking BIOSes, but anyone asking how gets accused of stealing hardware...) The ultimate solution would be to make HDD firmware open-source, just like Coreboot for BIOSes, so the truly paranoid could download, verify, compile, and flash their drives themselves. Unfortunately, I don't see this happening due to all the trade secrets (including some existing backdoors into passworded drives that you can find on data recovery forums, but obviously manufacturers don't want you to know about...) that are likely involved.
- zby 12y agoI agree with the open source point (but not that it would solve everything - see "Trusting trust"), but shipping with the backdoor by default is is problematic for the attackers, because it makes it public.
- psykovsky 12y agoRE: passworded drives. To access a BIOS passworded drive all you had to do was swap it for another for which you knew the password, boot into the BIOS and change the HDD password. It will ask you for your old password, you enter it and you go to the new password input screen. Now you take out the HDD and put the locked one in its place. You press enter twice, setting the password as blank, and voilá, you have your locked drive unlocked. Just boot the computer and no more HDD password. Have fun.
- tedunangst 12y agoNot to worry. Soon you'll be able to buy a Librem laptop with a CPU that accepts unsigned microcode updates as well.
- mmastrac 12y ago> “You know how much effort it takes to land just one firmware for a hard drive? You need to know specifications, the CPU, the architecture of the firmware, how it works,” Raiu says. The Kaspersky researchers have called it “an astonishing technical accomplishment and is testament to the group’s abilities.” I honestly don't think it's as difficult as they make it out to be. About ten years ago we were hacking Treo 650 firmware to read and write to flash without actually knowing how to do it at a low level. We just found the appropriate "read sector" and "write sector" commands and wrote a heuristic to search for them in whatever version was running. Later Android hacking attempts did exactly the same thing with HTC's HBOOT. HDD, CD-ROM, DVD-ROM, BluRay -- firmware for all of those types of drives have been decompiled before. With the right JTAG hardware and/or creativity it just isn't that difficult for someone who knows that they are doing. Now, if you can execute code on the HDD's CPU through whatever exploit you can find, you can search through RAM for whatever methods you need to write yourself to persistent storage. That persistent exploit can then use heuristics to hook the appropriate methods to intercept reads and writes as needed.
- voltagex_ 12y agoNot easy, but not impossible: http://spritesmods.com/?art=hddhack&page=2 http://spritesmods.com/?art=hddhack&page=2
- rasz_pl 12y agoand http://vimeo.com/channels/coastermelt/111417458 http://vimeo.com/channels/coastermelt/111417458
- chinpokomon 12y agoI'm a huge fan of Micah Scott. Inspiring work.
- XorNot 12y agoThis. It requires time and effort but not more then could be accomplished by a single motivated hacker without being paid.
- mirimir 12y agoThe NSA's Trojanized HDD firmware is indeed “an astonishing technical accomplishment”. But I'm wondering whether their firmware reprogramming modules are especially capable, or are merely customized to add requisite APIs. Maybe Kaspersky will release them. Or not. In particular, I'm wondering whether host machines' HDDs can be flashed from VMs. And further, which hypervisors and emulators are least vulnerable in that way.
- userbinator 12y agoIn particular, I'm wondering whether host machines' HDDs can be flashed from VMs. If the VM is using an emulated disk based on an image file on the host, probably no chance at all as only "read block" and "write block" types of commands will be interpreted by the virtual disk. Even other mundane commands like "spin down to save power" won't make it to the hardware due to the effect that would have on the host or other VMs on it. If the VM is configured to passthrough directly to the hardware, then it has full control over the HDD.
- chirayuk 12y agoSome thoughts: VMs are an interesting case. Someone with the motive and means would have exploits to get out of the VM. This is probably easier if the guest is running something to accelerate (e.g. VMWare Tools / VirtualBox Guest Additions.) Once you get out, you have to account for the host OS. Assuming you could do it, how does one determine if the VM is part of a honeypot or the target?
- temp0larry 12y agoNot really. Consider how many hypervisors are there really to exploit from a virtual OS? Maybe four. HyperV, KVM, ESX, what you mentioned, etc... But really, 3 vendors - Oracle, Microsoft, and VMWare covers the majority. Way fewer virtualization technologies (mainstream) than hard drive firmwares.
- deadfece 12y agoSome of Seagate's drives require signed firmware. http://www.seagate.com/www-content/product-content/savvio-fam/savvio-10k/savvio-10k-6/en-us/docs/100699181c.pdf http://www.seagate.com/www-content/product-content/savvio-fa... 8.7 AUTHENTICATED FIRMWARE DOWNLOAD In addition to providing a locking mechanism to prevent unwanted firmware download attempts, the drive also only accepts download files which have been cryptographically signed by the appropriate Seagate Design Center. Three conditions must be met before the drive will allow the download operation: 1. The download must be an SED file. A standard (base) drive (non-SED) file will be rejected. 2. The download file must be signed and authenticated. 3. As with a non-SED drive, the download file must pass the acceptance criteria for the drive. For example it must be applicable to the correct drive model, and have compatible revision and customer status.
- elchief 12y agoNext week on Der Spiegel: NSA stole drive manufacturers' private keys.
- pstrateman 12y ago"stole"
- cdr 12y agoYes, stole. As repeatedly evidenced - most recently with the Gemalto documents - the NSA far prefers to obtain keys surreptitiously than to go through the trouble of legally compelling corporations to provide them.
- elchief 12y agoIf you want an air gapped machine I guess you better buy the parts separately, from different sources, via anonymous intermediaries.
- A_COMPUTER 12y agoIt's sort of funny that the NSA can remotely flash a running system's hard drive firmware, but Seagate makes me make a DOS bootdisk to do it. they really do have tech that the rest of us can't conceive of.
- Sanddancer 12y agoIt's fairly likely that the hard drive can be flashed from within the OS without any problems. The most likely reason for Seagate's actions is a good, old fashioned, case of CYA. By making you use a boot disk, you're getting rid of a lot of other factors, like buggy drivers for other components, etc, that could cause a system to hang mid-flash and brick the hard drive.
- cnvogel 12y agoAlso probably they don't see enough demand for people being able to effortlessly reflash/reprogram their harddisks to invest the necessary R&D to make it work seamlessly. There are hundreds of tricks to make flashing more reliable and unsusceptible to data corruption, but it's cheaper to just use a DOS tool and write "DO NOT TURN OFF OR RESET YOUR COMPUTER!" on the screen.
- chinathrow 12y agoAnd not to forget that you get rid of all the folks who don't know what they do. No support calls. No complains.
- Arnt 12y agoNah, they just don't have customers. If Seagate's flasher breaks your entire RAID array, you call Seagate support. If the NSA's flasher does, you don't call the NSA.
- federico3 12y agoI'm sure they have backup copies of your data.
- drzaiusapelord 12y ago
- vasundhar 12y agoIt intrigues me how , NSA pulls the best of the hackers To accomplish this task and who is behind the architecture and direction of this ? It's bad, it's terrible in privacy violation perspective and in security perspective , but also remember this is nothing less than magic to bring the resources together effectively and make it scale.
- bo1024 12y agoRemember that the NSA's annual budget is estimated at $11 billion.
- pjc50 12y agoAnything is easy if you have unlimited funding. Especially this kind of reverse-engineering job, where the NSA can use their industrial espionage assets to get a copy of the firmware source and board schematics.
- Htsthbjig 12y ago"It intrigues me how , NSA pulls the best of the hackers To accomplish this task and who is behind the architecture and direction of this ?" They don't need to be the best of the hackers. The fascist(collusion between private companies and State) laws that were created after 11-9 let them have access to the source code of hardware and software. With source code, doing this is not that hard. I believe most of them do not need to be stars. I don't know about the specific NSA, but normally secret agencies have lots of ways of finding who is good at hacking-cracking(the stars). For example who is behind the release of the crack to a software protection. As simple as "recording the web" for unique documents upload, and analyzing which dark web page was the first to upload the document. Follow all the proxies and who is really behind is not that hard if you have resources. Once you know who is the target you want to hire you study her with social connections in facebook-twitter-whatsapp- gmail-smartphone, very easy for the NSA. You study her weaknesses, she probably needs money, you give her(first one's is free, so you give her lots of money for her first easy job so she believes she could be rich easily). She is lonely, you give her a partner. Needs sex? And so on. The rest is easy, once they take the bait maintaining them hooked requires them much less energy(money, resources or coercion). They can destroy you life with the pinky finger. Life is good if you do exactly what they ask you. If your vice is thinking for yourself or ethical scruples(and most hackers have those vices) your life could be hell. If you help them, you are a patriot, if you don't, you are a traitor. You are with me or against me is their favorite motto. Stars know personally other stars, and they know who is good at it at a glance. So you make one of her jobs to hire other hackers crackers.
- andy_ppp 12y agoPresumably some of the people writing these firmwares are reading hacker news. I'm pretty sad that extremely competent software people are building these things for the government - just following orders so to speak. They must know that it's wrong? Or do they buy the government arguments about the balance between privacy and security; maybe are they just young, talented and excited to be doing something "legally" that most people would be put in jail for? What to do when governments become untrustworthy actors to such an extent?
- junto 12y agoSpying is often seen as a necessary requirement to diplomatic stability. I have much more of a problem with blanket surveillance than this targeted spying to be honest. Lots of these revalations are being published by a non-US security company. The US security companies have either missed these security issues, deliberately ignored them, or have been forced to keep them secret. In my opinion, the fact that there are still some non-US IT security companies is a good thing.
- coldtea 12y ago>Spying is often seen as a necessary requirement to diplomatic stability. Also for having the upper hand in negotiations and forcing the lesser states and their politicians to do as you please... Which is much more important than some BS need for "diplomatic stability" without any other major player like USSR around, except maybe with China. If you're the 10,000-pound gorilla you don't get instabilized by the small 10 pound zoo animals...
- frostmatthew 12y ago> If you're the 10,000-pound gorilla you don't get instabilized by the small 10 pound zoo animals That's not always true for either countries[1] or animals[2]. [1] https://en.wikipedia.org/wiki/Category:Former_British_colonies https://en.wikipedia.org/wiki/Category:Former_British_coloni... [2] https://en.wikipedia.org/wiki/War_pig https://en.wikipedia.org/wiki/War_pig
- coldtea 12y agoI think all those articles into details also help to triviliaze the issue. "They do this specific thing, or they do that specific thing" -- at the level of implementation / deployment etc. The "unsettling" thing should be that they spy on citizens, period. Not how they do it, if it's 200,000 or 40.000.000 targets, how long they retain the data, if they're "allowed" to see them, etc...
- biturd 12y agoWhy can't the HDD vendors publish a md5/sha1 hash of the firmware so we know what the value should be? If the NSA ( or anyone ) are going to modify the firmware and hide malicious or preparatory exploit code in that area, the end user will have little recourse post-exploit. Though, beforehand, if the HDD vendor published, for example: the md5/sha1 of the firmware the OS vendor could then write a "control panel" or application that the number has been entered/seeded by that vendor. If the hash on boot does not match the hash in storage, alert the user the drive has been hampered with. Alert the vendor, they send you a new drive, and you throw away the old drive. I'm not entirely sure how to do this if they happen to not modify the firmware but instead just store in the areas wasted space. I can think that you would use sized to make values you could then hash. As long as the vendor knows the values of of what they did, those can always become keys to compare to make sure they have not been modified. ( I hope at the very least. I don't want a stalemate or a loss when it comes to this type of security, it has to be a win for the consumer. ) Is there any reason this approach wouldn't work? What other alternatives are there if they are writing to the firmware area of the HDD? What if this were the firmware of the hardware itself. There are firmware(s) within your USB bus, wifi chipset, cpu chipset, keyboard chipset, display, power management, some cables, everywhere. Those can be leveraged individually or via a RAID style merging of all these firmware areas to give you, hundreds of MB of super difficult to locate storage space. If no one is looking, you can get away with anything you want. And in this case, even if someone is looking, it will take a very good set of eyes a few times over, as it seems one voice is never loud enough to get the word out. Be prepared to go to jail for talking about any of their methods, even in a theoretical sense.
- tryp 12y ago>Why can't the HDD vendors publish a md5/sha1 hash of the firmware so we know what the value should be? Because the only way to actually verify the hash of the firmware is to connect to the drive's controller outside of the firmware's control with something like JTAG or a direct dump of the flash. Otherwise, the PC would send a command to ask the HD firmware what it's own hash is. The compromised HD firmware can then simply respond with a published vendor hash.
- 12y ago
- giancarlostoro 12y agoI notice only Windows is mentioned, so how does this affect Mac or Linux? Curious about how they approach entirely different systems? Or am I not understanding how hard drives work? I'm not as knowledgeable on hardware, as I am on software.
- drivingmenuts 12y agoThat the NSA succeeded in this is somewhat alarming, but what is most alarming is that the document describing this is EIGHT YEARS OLD. No telling what other exploits those sons-a-bitches have come up with and deployed in the meantime.
- glabifrons 12y agoI've only read part of the article so far, but scanned it for the NSA's codename and am surprised it is not mentioned (there or here). They're describing SWAP [0]. Cool they Kasperksy now has binaries to reverse-engineer. What's impressive is the number of OSes and filesystems that are supported. Keep in mind the documentation publicized is from 2008, so they likely support ZFS, ext4 & btrfs as well now. [0] https://www.schneier.com/blog/archives/2014/02/swap_nsa_exploi.html https://www.schneier.com/blog/archives/2014/02/swap_nsa_expl...
- DanBlake 12y agoDoes the firmware itself have the capability to issue outbound/inbound networking requests? That might be the case for a hacked firmware on a ethernet card, but on a hard-drive? How would windows even interpret a outbound request that comes from the hardware in the first place? The only way I can imagine this works is if when doing a fresh install with a hacked hard-drive, the operating system would request the drivers from the hard-drive itself, which would give it the infected DLL which could obviously do whatever it needed- But it doesn't work that way, drivers are almost always downloaded, no?
- mirimir 12y agoModern workstations and servers implicitly trust hard disks to act as well-behaved block devices. This paper analyzes the catastrophic loss of security that occurs when hard disks are not trustworthy. First, we show that it is possible to compromise the firmware of a commercial off-the-shelf hard drive, by resorting only to public information and reverse engineering. Using such a compromised firmware, we present a stealth rootkit that replaces arbitrary blocks from the disk while they are written, providing a data replacement backdoor. Zaddach et al. (2014) Implementation and Implications of a Stealth Hard-Drive Backdoor http://www.s3.eurecom.fr/docs/acsac13_zaddach.pdf http://www.s3.eurecom.fr/docs/acsac13_zaddach.pdf
- Kennedy0808 12y agoDo you need hackers for hire? Do you need to keep an eye on your spouse by gaining access to their emails? As a parent do you want to know what your kids do on a daily basis on social networks ( This includes facebook, twitter , instagram, whatsapp, WeChat and others to make sure they're not getting into trouble? Whatever it is, Ranging from Bank Jobs, Flipping cash, Criminal records, DMV, Taxes, Name it, We can get the job done. We're a group of professional hackers with 25 Years+ experience. Contact at hacksville147@gmail.com ... Send an email and Its done. Its that easy, try us out today.