Russian researchers expose breakthrough U.S. spying program

Kittamaru

Ashes to ashes, dust to dust. Adieu, Sciforums.
Valued Senior Member
http://www.reuters.com/article/2015/02/16/us-usa-cyberspying-idUSKBN0LK1QV20150216

(Reuters) - The U.S. National Security Agency has figured out how to hide spying software deep within hard drives made by Western Digital, Seagate, Toshiba and other top manufacturers, giving the agency the means to eavesdrop on the majority of the world's computers, according to cyber researchers and former operatives.

That long-sought and closely guarded ability was part of a cluster of spying programs discovered by Kaspersky Lab, the Moscow-based security software maker that has exposed a series of Western cyberespionage operations.

Kaspersky said it found personal computers in 30 countries infected with one or more of the spying programs, with the most infections seen in Iran, followed by Russia, Pakistan, Afghanistan, China, Mali, Syria, Yemen and Algeria. The targets included government and military institutions, telecommunication companies, banks, energy companies, nuclear researchers, media, and Islamic activists, Kaspersky said. (reut.rs/1L5knm0)

The firm declined to publicly name the country behind the spying campaign, but said it was closely linked to Stuxnet, the NSA-led cyberweapon that was used to attack Iran's uranium enrichment facility. The NSA is the agency responsible for gathering electronic intelligence on behalf of the United States.

A former NSA employee told Reuters that Kaspersky's analysis was correct, and that people still in the intelligence agency valued these spying programs as highly as Stuxnet. Another former intelligence operative confirmed that the NSA had developed the prized technique of concealing spyware in hard drives, but said he did not know which spy efforts relied on it.

NSA spokeswoman Vanee Vines declined to comment.

Kaspersky published the technical details of its research on Monday, which should help infected institutions detect the spying programs, some of which trace back as far as 2001. (bit.ly/17bPUUe)

The disclosure could further hurt the NSA's surveillance abilities, already damaged by massive leaks by former contractor Edward Snowden. Snowden's revelations have hurt the United States' relations with some allies and slowed the sales of U.S. technology products abroad.

The exposure of these new spying tools could lead to greater backlash against Western technology, particularly in countries such as China, which is already drafting regulations that would require most bank technology suppliers to proffer copies of their software code for inspection.

Well this is kind of terrifying... if this is something being included in the firmware or other base-memory of the hard drives, it would be extremely difficult to route out such a system...
 
I don't know off-hand, but a savvy systems programmer should be able to use sdparm or hdparm to dump the contents of the firmware block and at least examine the pointer tables to determine whether the hack has been done. I know an engineer that I'll ask about it, and if he gives up something interesting I'll report back here.
 
I don't know off-hand, but a savvy systems programmer should be able to use sdparm or hdparm to dump the contents of the firmware block and at least examine the pointer tables to determine whether the hack has been done. I know an engineer that I'll ask about it, and if he gives up something interesting I'll report back here.

Sounds good! I'm very curious to know about this - if there is a way to make a simple tool/utility for a home user, I'd be all over figuring that out (though I'm no programmer)
 
I don't know if it's simple. That's why I shot if off to Doug. I do Linux and some driver stuff, but he writes drivers. I just wish I had some of my old IBMer contacts...
 
circa 1970, the nsa set up shop in site R and generated more data than they could handle........so they brought in more people.and still couldn't keep up.....so they brought in more people and tried to limit the data collected.........and still couldn't keep up....
after a couple months, they just gave up, and they all went away, leaving a very large room, which was once full of maybe 50-100 people, full of eerily quiet machines.
If you are targeted, there ain't much that you can hide.
But their fishing trips (at least back then) were total failures.
 
I worked for NSA in the early '70s, and in fact, in the "R" div (and yes, once I figured out a few things, I quit - I was young and stupid then)....it's not that simple, is all I can still probably say. I'm happy to say I haven't worked for that community since then, but yes, they still keep a bit of an eye on me.

No, hdparm or even dd won't help. If the firmware on a drive is compromised (or in a bios for the mobo) and you have to trust the CPU running that firmware to tell you anything whatever, you're up the creek. The hack to read back what you expect instead of what's there is trivial and obvious. I put more on my site about this. If Dr_Toad wants to link it here, that's up to him (he uses a different name on my site). That's the Tl;Dr version. Unless the code is on a separate component, like the old days of eprom (and not in-system writeable), there's nothing at all you can do except hit the trash dumpster.

Copycat attacks from other interests may now be expected to be incoming any time. This is actually a lot easier than Kaspersky makes out - once you know what you want to do. It would take me under a week to dupe this at least for one brand of drive or mobo. But I'd rather make things than break them.
 
Well, hell, Doug. I should have known you'd become a member here..
hi.gif


Here's the link to your post at home...
 
I worked for NSA in the early '70s, and in fact, in the "R" div (and yes, once I figured out a few things, I quit - I was young and stupid then)....it's not that simple, is all I can still probably say. I'm happy to say I haven't worked for that community since then, but yes, they still keep a bit of an eye on me.

No, hdparm or even dd won't help. If the firmware on a drive is compromised (or in a bios for the mobo) and you have to trust the CPU running that firmware to tell you anything whatever, you're up the creek. The hack to read back what you expect instead of what's there is trivial and obvious. I put more on my site about this. If Dr_Toad wants to link it here, that's up to him (he uses a different name on my site). That's the Tl;Dr version. Unless the code is on a separate component, like the old days of eprom (and not in-system writeable), there's nothing at all you can do except hit the trash dumpster.

Copycat attacks from other interests may now be expected to be incoming any time. This is actually a lot easier than Kaspersky makes out - once you know what you want to do. It would take me under a week to dupe this at least for one brand of drive or mobo. But I'd rather make things than break them.

Very good info Doug! I have to ask - is there any reliable way of checking this? Perhaps comparing a bitcount of the "official" firmware vs the actual firmware?
 
From what he said at his forum, the firmware can't be dumped without using the firmware, so the infected drives will give the same checksum and report the correct image whether or not it's been shat upon. Beg pardon..
 
lol notice the total and i mean TOTAL disinterest among Americans about this issue. They simply don't care.

CNN?

New York Times?

FoxNews?

where the f*** are they with their democracy now?
 
In NSA's pocket because of all the stuff they got caught lying about, maybe? I hope that's all it is..
 
In NSA's pocket because of all the stuff they got caught lying about, maybe? I hope that's all it is..

NSA isn't the only blame it all scapegoat in this spying program. It is the extent to which the secret agencies have gotten into our lives and this presents much more serious problem than say accidental malfunction of a nuclear warhead.
 
Hic iacet Draco.

I'd rather have a "malfunction" than an outright coup secrete..
 
This has gotten on Bruce Schneier's site now. Finally. Bruce is not talking much (hmmm...his outfit used to make hardware instrumentation intrusion detection devices, sold to BT for zillions, and now he's running another firm). But his posters are.
Nick, Dirk, Clive - those guys are connected and know what they are talking about as far as I can tell, having read their posts for well over a decade...Don't be hard on Clive for mixing up to and too - he's in the hospital using speech recog.
https://www.schneier.com/blog/archives/2015/02/the_equation_gr.html

Anybody who has done hardware dev from scratch knows about a few of these type of vulns, but we don't use them for that while developing. They are hooks for our debuggers, or just a way to have the hardware come in in-budget. A very popular example is the arduino.
It has code it jumps to on boot that knows how to burn the rest of the firmware you want to put into it. They didn't hide it (well they tell you it's there), and they made it hard to erase by accident, and in this case, you can also get your hands on it to burn "virgin" at328 cpus with the internal flash, should you want to make one from scratch, or bork one you bought. This allows anyone to put anything (eg the customer in this case) into an arduino easily, via the serial port - the chip doesn't have any native way to talk to that port without some code - and that's the "hidden stuff" in the arduino that gets invoked on power-up (and why when you write a sketch for arduino, you don't get to use all the non volatile memory - some is used for that boot loader). A disk drive operates much the same - there's a cpu, flash, ram, and opsys going in there for things like wear leveling on SSD's, bad sector detection and marking out on spinning rust, and so forth - general disk management stuff so the opsys can be presented with a "perfect disk drive" via overprovisioning of some number of "spare sectors" and only mapping in the good ones, reserving some for replacing ones that go bad.

It's those sectors, and that flash that this attack works with. Your opsys, even at the driver level, can't even tell they are there. The only way to read back the disk drive internal firmware would be through that very firmware. No big trick to subert that, while you're subverting the rest, eh? Your opsys still sees sectors 0-n, on cylinders 0-m no matter where the actual disk blocks are physically through this mechanism, and therefore saves having to do all this itself. You could argue in this light that outsourcing this to disk was not a great idea.
But it is what it is. Same deal goes for the boot flash on every motherboard. Only worse. Most CPUs these days aren't actually shipped bug-free, and even the instruction set isn't the plain old ASM we old guys knew and loved-hated. Nope, there are "firmware fixes" for bad yielding chips that change internal CPU microcode, that in turn implements the "hardware" instruction set...understanding all this is dependent on digging into how it all works deeply enough, but we're way off the metal these days, Dorothy.

To make it easy on themselves, manufacturers made it so you can update a drive or bios firmware, which can in turn, update CPU internals, drive sector assignment (and in at least one case, some of the drive storage also contains software for the drive's CPU) later, when bugs are found after shipping it. In essence, we are and have been paying them to be their beta testers, when it was even a remotely honest world.

There are of course folks out there who downplay this, saying it's too hard. Well, sure, it's too hard to do what I do almost without thinking every day for %99.howevermanynines people. That doesn't mean there aren't hundreds if not thousands who only need the hint to pull this off in a week or so. And the motivation. I don't have that, I retired and well off. So that goes into the 9's count too. So? Didn't we just hear that someone was skillful enough and careful enough to steal nearly a billion bucks from banks via much lesser tech? There's motivation out there all right. And not just for state actors. One should not judge threat by the speed bureaucracy works. After we did our first nuke, we had the hubris to think it would take the Russians far longer, and made plans around that. We were dead wrong. They had serious motivation, and better yet - they, unlike us, had an "existence proof" - they knew there was light at the end of that particular tunnel. Saved them no end of work, and they got there quite fast - even being a state actor with the usual disadvantages over just a couple guys in a basement with the right tools (eg state actors have to have meetings and such, and set policy, so they go slower).

Worse, the code to flash a bios or a hard drive's version of the same is already out there, on the manufacturer's website, along with example code. They could hardly make a copycat attack simpler for ya. Even if you don't have their source, it's a simple matter to run it with a logic scope hooked to the hardware, see the protocol for doing it all, and you have nice, working, sample code to add your little tricks to. Yes, it's that bad, even leaving out the state actor aspect - they're not the only players out there by far.

Be careful out there - any exploit that gains "root" or "admin" privileges can do this writing of bad-ware to disks and bios storage - and not flash up a bragging "you've been pwned" message or give any indication at all you can detect before something really bad happens. Linux is strangely not mentioned anywhere, which makes me a little nervous, as all my systems are linux here (and as far as I can tell, never infected, but then, I'm really careful). Sometimes the dog that didn't bark is the one that tells the tale in this game. I'll be checking my honeypots.
 
Last edited:
Huh...I would have thought that kind of access would be capped/killed at the end of the manufacturing cycle... I would guess there's no easy/efficient way to terminate that access at this point?
 
Yeah, you'd think, and it used to be the case - there was either a not-in-circuit programmable device, or a jumper you had to move to get that type of control in the day. It got lost along the way so manufacturers could save money on support, or something like that.
I might be sad I tossed out all that obsolete stuff (well, donated it to a good cause) and might just rebuild some of my older junk to have a safe system. Except, even as an expert, I can't really read all the lines of code or find all the bugs even in open source opsys...there will always be some doubt...

Edit, I should add there's a few more vectors, recently found, and with current software, there's simply nothing that can be done. Just as your opsys trusts that when a SATA drive says it's a seagate disk drive with such and such specs (at the other end of the cable, it can't take a picture of it), and really can't get inside except via seagate-supplied (or NSA) software to put anything else on there, there's a fundamental flaw mentioned in Bunnie's analysis of USB - a device could power up saying it's a USB stick, say, and then become a keyboard (or a keylogger or whatever). The computer has no way to know, and since no one's done that attack yet (that we know of) no software checks to see if something out there changed it's mind since it was plugged in, or told the truth in the first place (the latter might be impossible). If you're really into the hardware, the presentation here is worth checking out:
http://www.bunniestudios.com/blog/?p=3554

This was the "hint" I'd seen much earlier, but I just didn't think enough like a crook to fully get the implications, and this stuff is usually forgotten except by subject matter nerds pretty quickly and thus is no real threat. Or at least, used to be - crooks in general were too lazy to learn this kind of thing. It's not as true now, with monetary or state motivations these days. After all, back in the day, if you could do this kind of thing, you were making so much money you didn't have time to spend it, much less want to be a crook and risk jail. This is making me kind of glad I'm retired...
 
Last edited:
Yeah, you'd think, and it used to be the case - there was either a not-in-circuit programmable device, or a jumper you had to move to get that type of control in the day. It got lost along the way so manufacturers could save money on support, or something like that.
I might be sad I tossed out all that obsolete stuff (well, donated it to a good cause) and might just rebuild some of my older junk to have a safe system. Except, even as an expert, I can't really read all the lines of code or find all the bugs even in open source opsys...there will always be some doubt...

Edit, I should add there's a few more vectors, recently found, and with current software, there's simply nothing that can be done. Just as your opsys trusts that when a SATA drive says it's a seagate disk drive with such and such specs (at the other end of the cable, it can't take a picture of it), and really can't get inside except via seagate-supplied (or NSA) software to put anything else on there, there's a fundamental flaw mentioned in Bunnie's analysis of USB - a device could power up saying it's a USB stick, say, and then become a keyboard (or a keylogger or whatever). The computer has no way to know, and since no one's done that attack yet (that we know of) no software checks to see if something out there changed it's mind since it was plugged in, or told the truth in the first place (the latter might be impossible). If you're really into the hardware, the presentation here is worth checking out:
http://www.bunniestudios.com/blog/?p=3554

This was the "hint" I'd seen much earlier, but I just didn't think enough like a crook to fully get the implications, and this stuff is usually forgotten except by subject matter nerds pretty quickly and thus is no real threat. Or at least, used to be - crooks in general were too lazy to learn this kind of thing. It's not as true now, with monetary or state motivations these days. After all, back in the day, if you could do this kind of thing, you were making so much money you didn't have time to spend it, much less want to be a crook and risk jail. This is making me kind of glad I'm retired...


OH hell... that is a whole bag of worms I dont' even want to think about...
 
Back
Top