Posted
by
kdawson
on Thursday November 22, 2007 @11:59AM
from the not-a-security-flaw-no-really dept.

Arashtamere sends in a Computerworld story on a security flaw in the Windows 2000 pseudo-random number generator published by Israeli researchers earlier this month. Microsoft has now admitted that the flaw is present in XP too. Microsoft denies that the bug is a security vulnerability, since an attacker would have to have gained administrative access to a system before exploiting it. (The Israeli researchers point out that many common exploits provide admin access.) This stance apparently lets them off the hook for patching Win2K, which is in "extended support" mode, though it powers about 9% of US and EU business computers. Microsoft said that XP SP3, due in the first half of next year, will fix the bug. The company said that Vista, Windows Server 2003 SP2, and the new Windows Server 2008 are not vulnerable.

if you already have admin access via another "exploit" why would you bother attacking via random number generator, seems like its a lot of fuss over nothing, Windows has alwayss been vunerable locally (luckily for admins whose users forget passwords etc) so the most worry is over a remote exploit which this flaw isnt.
But iam sure some million dollar company will sell a solution for this, paranoia is a great sales tool in the murky world of snake oil, cough i mean computer security

Because you own a machine _now_ doesnt give you access to the encryption keys that was generated in the past.

Except that it pretty much does for Windows NTFS encryption. Thank you "key recovery account". For that matter, on a Windows machine not in a domain with default settings, you can get the NTFS encryption keys with no accounts at all, just stick the drive in your machine and "recover" the keys with the local admin account. Checkbox feature for the win!

And if you're using real encryption instead, you're not caring about the Windows RNG I hope.

CryptGenRandom is supposed to be the Windows-equivalent of/dev/urandom. Except it's not, because of this design flaw. The implications of this extend far beyond encrypted NTFS volumes.

For example, an attacker can passively monitor a network of Windows machines, wait for one of them to do something interesting (like connect via SSL www.paypal.com), then actively compromise those selected machines later, and gain enough information to decrypt the captured SSL sessions.

The PRNG is reseeded for each new process. This means that the vulnerability where you break the PRNG is only good for the process you exploited. Once the process is closed or restarted you're no longer in.

As the GP said this is a fuss over nothing. It's one of those vulnerabilities where you have to think real hard to imagine a way it could be used maliciously. (Though I agree that MS should make proprietary crypto algorithms open to public scrutiny.)

I'm pretty sure you don't need admin access to do damage with this bug. All you need to do is to read the memory of a process (say, firefox.exe) that's using the RNG, since a lot of the state is held in user space, and it's not updated very often (like once every 128 KiB of RNG output!).

It does if the data is accessed during the period that you have admin access. The process using the data has to manipulate the keys at some point, and if you can access their memory space then any security is toast. This is exactly how the drm on the new drm for blueray / hddvd was cracked.

This was the point of palladium, that the keys would be locked up inside a separate box, segregated from the processor. Each process would only manipulate opaque handles to the keys.

One nice aspect of this attack is that if you gain admin access after key generation, but before the entropy pool is refreshed then you can play back the state of the random number generator to recreate the keys after the fact. But this just extends the window slightly, you still need an exploit to get admin first.

If you have admin access, the battle's already lost. What's the point of running a complex process to obtain their password when you have full access to everything on their computer? Might as well just drop in a keylogger and get the same info much easier.

Granted, I agree with this for the most part. However, it always seems like there is that one person that looks at a problem like this in a way that no one else had prior and manages something completely expected. It's only at the point that a virus is running amok across half the corporate networks in the world that we find out you did not really need administrative priveleges if you did x, y, z first...

History is full of examples, probably both within and out of the computing field where people thought that 'that' was impossible...

But to say that is to deny our ability to flame MS! Clearly it's an example of MS' incompetence that a random number generator that's 7+ years old has been broken by recent maths and it can be exploited to gain full access when you already have full access!

It would be far more accurate to say that M$ claims that this is not a bug, because the latest version does not have it ie. it is an upgrade feature. How many other products would you accept this for, a defect in a motor vehicle. No recall because the latest version does not have that defect, you just have to trade in for the upgrade (M$ version of a trade in , it is more expensive than the original OEM).

If you haven't tought your children to behave by the time a full lock and key is the only thing that will stop them then either your child has serious mental problems (which does happen sometimes but should be fairly rare) or you were a very bad parent.

The fact though still remains that Windows is a proprietary, closed-source operating system. If it was open-source much like Linux or BSD, the bug would have been fixed sooner and you could patch your own system, if MS doesn't see it is a security threat it won't get patched. Also, who is to say that crackers haven't found the bug out earlier? If it was Linux, the potential would be very minor for widespread devastation due to differing kernel versions and different patches for different kernel versions. About the only way for a sure-fire attack on the Linux kernel is to attack a distro without any patches but even the most popular distro still has 3 versions still receving support (7.10, 7.04 and LTS) (Ubuntu) and that would make an attack very hard if only 2 of the 3 had it and a patch was released quickly. Its the danger of a propriatary operating system, you never know who knows what and even if you will receive a patch, Linux you can audit the code yourself and rely on the community if you so choose.

...I think you hit reply at the wrong place. My point was that someone who writes 'Abble' and 'Linuzzz' is so obviously a troll, that you shouldn't reply. That's... sort of not in vein with what you replied...

I always assumed that XP and 2K would have similar flaws, however I would hope that Vista is a little better.yeah, sorry that post was pointless... To add some substance:Is there any reason that MS can't make portions of their code "open Source" but not-free?I.e.: You may look at this source code and even compile it for evaluation, you may not, however use this code for any production (including home pc) uses.Technically I think they could, but realistically I doubt it would ever happen (aside from large c

If you have admin access, the battle's already lost. What's the point of running a complex process to obtain their password when you have full access to everything on their computer? Might as well just drop in a keylogger and get the same info much easier.Most of the other ways to get to the passwords would leave a detectable trace, especially keyloggers. Or they need a reboot. If you're really after the user passwords, resetting them to something else is also not an option. AFAIK there is no other *easy* w

The point is that people often use the same passwordson multiple systems. If you can crack them you canvery likely gain access to other systems without havingto wait for uses to login at a time when you dont knowhow long you have control of the system

If you truly agree with MSFT, then you should quit working in computers right now, for everybody's sake.

Many corporate computers have local admin accounts that are likely to share a user/password combo across large numbers of machines. A keylogger might not get you these credentials, but the ability to crack these credentials could get you admin access to a huge number of other computers.

It is people like you who make sure that security consultants will never want for work.

Yeah, because Microsoft doesn't know what they're talking about. This is a PRNG flaw, it doesn't help you "get credentials" in terms of getting Windows logins/passwords. For Christ's sake. Once you have access to the machine, you can theoretically access any encrypted data on the machine because you can get the session keys for e.g. SSL sessions. But, of course, since you already have admin access you could do this any of various other ways anyway.

I didn't expect that argument to work, but I'm glad it did.Your previous reply missed the mark by such a wide berth I thought you were too fucking stupid to recognize your own stupidity. After all, you were claiming that if any admin flaws exist, then it doesn't matter if the cryptography is also broken, which is one of the most ignorant and fuckwitted claims I've ever read.

I mean honestly, it was such a dumb fucking claim that I really didn't think you'd recognize how utterly inferior and useless you are.

And, no "upgrade" is really necessary, Vista comes preinstalled on all new PC's!At the cost of "upgrading" your old PC, you can get a new box with much more power than you need!(now, where is that Open SuSE [opensuse.org] installation CD...)Got to hand it to those Novell people, that's a nice OS!Anyone here manage to get Vista and Open SuSE to "dual boot", and if so, any issues?

You could make the argument that it's no more reason to upgrade to Vista, but in what Universe is the fact that Vista is not vulnerable to something XP SP2 (but not the upcoming SP3) is vulnerable to a strike against Vista? I think you're changing the subject.

I fail to see why you would need administative privelidges however. You would only need to run in the userspace of the process that did run the random number generator before. Having administrative privs would be nice to inject code into that userspace, but is not needed i think.

It can get even worse if from a public key part the random number that was used to generate it can be extracted, what was done in early ssl implementation attacks.

As the winsock TCP/IP stack randomises it's TCP sequence numbers, I would suggest that it's very likely that it uses a PRNG output directly, and therefore is at risk of being spoofable.

Theoretically, one would need knowledge of just one TCP sequence number, and then it could generate the future sequence numbers coming out of the box. Therefore one would be able to hijack TCP/IP sessions *much* faster and easier than before.

Very brief summary of articleEach process has their own instance of the generator, and the refresh of the internal state is done after 128 kbs of output from the generator (roughly 600-1200 SSL connections with IE). Not only that, it is run in the userspace so it is not a security violation to examine the internal state of the generator. The function used is not one-way which provides a means looking at past transactions of a user (within the 128 kbs of data).

Where did Microsoft say XP wasn't vulnerable?A lot of people assumed it wasn't because the testing was done on Win2k, but Microsoft never confirmed it. In fact, the article states they were very hesitant to do just that:

As recently as last Friday, Microsoft hedged in answering questions about whether XP and Vista could be attacked in the same way [...] Yesterday, however, Microsoft responded to further questions and acknowledged that Windows XP is vulnerable

So, in light of them actually admitting they're at fault, why wouldn't you trust it?

There are other reasons not to trust MS, of course, but from what I understand... vista's weird incompatibilities are just an annoying symptom of touching Windows in its naughty place - in other words, because MS rewrote so many of the lower-level subsystems in Vista, they probably ended up fixing many outstanding bugs from previous generations. The downside, those incompatibilities and quirks and new bugs/exploits, will hopefully get a lot brighter in SP1:)

I have to be honest - I think a lot of the outstanding bugs are related to Microsoft's focus on backwards compatibility, which I feel is unnecessary and holds back Windows development. In a way, I'm glad a lot of things broke in Vista - because in the end, a lot of things are only breaking because there are some terrible coding practices at work out there.One entry on Raymond Chen's blog (which is a goldmine for the weird quirky things that some programs expect Windows to handle) explained a situation where

In the end, while Linux and Apple can afford to break things a little every now and then to consistently improve, Microsoft set themselves up for a massive fall because they spent so long trying to make everything work before that now they aren't trying as hard, everyone sees it as a failure.Yep, the most important thing to a customer is to keep thier software working.

Upgrading to a new version of windows eventually is practically forced by the older version getting it's support dropped by hardware and soft

Open source code. Easier to do research on it, easier to fix.Whereas Windows has closed source, and you're pretty much stuck relying on Microsoft to provide fix (which they might not, hoping to use it as an argument to encourage shift toward Vista).

I for one welcome our new random number generating overlords
But seriously, aside from the "we're exploiting this because we can" this is hardly a security liability. They already have administrator and there's not much left to be compromised.

While in general I think open-source and closed-source software can coexist, I think this is a pretty good example of why anything related to crypto should be open. All of public key cryptography relies on the secrecy of private keys, not on the secrecy of the algorithm itself. And while they might have faithfully implemented the algorithm, who knows what kinds of arguments/whatever to the crypto functions might cause undesired results -- it's just too hard to test.

In any case, the thing that surprised me most from the article was that Windows 2000 users would be left out in the cold: "Because the company has determined that the PRNG problem is not a security vulnerability, it is unlikely to provide a patch [for Win2K]." Wow. Especially when it's something this easy to fix. This bug also solves any attacker's problem of trying to sort valuable from non-valuable information, since presumably any valuable information (credit cards used online, etc) will use encryption. And while someone suggested that a program should use its own random number generator, there is a problem because, in general, your application (not running as Admin) shouldn't have access to nearly the same amount of entropy sources (like network activity, GUI inputs, etc).

It might be easy to code the fix, but it's (at least) an order of magnitude more work to actually test it. Windows supports thousands of different hardware configurations, in hundreds of different languages.

Yeah, Microsoft could release this as a hotfix. For any customer that screams loud enough (and pays enough), they may well do.

To be honest, I'd rather see Microsoft focus their efforts on XP SP3, Vista SP1 and 2008 RTM (2003 SP2 only just came out,

"It might be easy to code the fix, but it's (at least) an order of magnitude more work to actually test it."Well, that depends. They already have the code and it is not that the API needs to much testing I suppose. I mean, getRandomXxx() with some 4 different strings for Xxx should be enough. Feed the output into a FIPS random number testing tool (for testing weirdness, I mean the code has already been tested in other configurations) and go.

Just for your information, distribution is just one part of the test suites for randomness. A counter going from 0..99 has a perfect distribution over 100 elements. It is also extremely non-random. There are quite a number of mathematically complex tests to perform before something is considered random enough. And even then you cannot distinguish between true randomness and a rather complex mathematical method that just uses the previous output as only input parameter. So the tests you are pointing to are n

Not that I consider this flaw terribly serious unless it has the ability to compromise other encryption algos run on the machine aside from user passwords. I've never considered windows encryption secure, so never bothered with it. A person with admin rights could do what they wanted anyway as far as the system goes.The real downside of W2K is that MS has given it the shaft for awhile, even when it wasn't in extended support they were still not supporting it very well for the last couple years as far as th

>Microsoft said that XP SP3, due in the first half of next year, will fix the bug.

It should be an offence to know and state you know about a bug but sit on the fix for months. This is a really stupid MS position and will push people more towards alternatives like GNU/Linux.It should be a hot fix right now.

No, I think the things that will push people towards it (and macs) are stuff like 32 bit Vista not being able to address a full 4GB no matter how many CPUs you have and the 64 bit version having a lack of drivers. Server 2003 Enterprise version doesn't have that problem but most are not even going to bother to find out the price, let alone spend it.

Some people might see it as an annoying limit like the people that bought 28800 bps modems and found that Win 3.11 couldn't go past 9600 bps due to an arbitrary

If this bug was in RedHat 5.2, there would be no issue about getting this critical bug fixed. If nothing else, I could just fix it myself -- and put the necessary patches to the source packages on my website.

No worries about whether or not it's even legal to fix a machine that I'm using to run my business.

...but I can't complain that XP has the same bug as Windows 2000 in this case-- if the researchers didn't find the problem and publish it before last month, it seems to be asking a little much to expect Microsoft to fix a bug nobody knew they had.As to patching Windows 2000: They're going to patch XP, and if the bug is in both, chances are it's the same code. I believe they should at least look at it and see if a patch is going to be simple. That said, it'd have to be darned simple to be worth it: if you're

Microsoft denies that the bug is a security vulnerability, since an attacker would have to have gained administrative access to a system before exploiting it.

Let's see here. When I bought my new laptop (with MCE on it), I logged in as myself (with admin rights). I tried to downgrade myself to a "Power User"
I was told by MCE that "there must be at least one administrator".
I logged out and logged in as "Administrator" and tried to downgrade my normal userid.
I was told once again by MCE that "there must

So it's not an exploit because you already had to get administrator access in order to do it. Funny how they didn't use that logic when it came to implementing mandatory driver signing in Vista 64. A rootkit would already need to have administrator access to get loaded.

Thank you, Microsoft, for proving that you lied about the reason why you made driver signing mandatory.

Possibly. What would be better still is to show, provably that those he was calling morons/idiots, were indeed morons/idiots. As it is, he just insulted all slashdotters (including me, obviously), many of whom are not either.

Flamebaits and trolls have nothing to do with truth! The moderation system is designed to accommodate opinions, and doesn't take sides on what's "truth" or not. Even if you strongly believe that something is true, that doesn't mean that everyone else will, but that also doesn't mean you deserve to be modded into oblivion. What truly earns you a Troll or Flamebait mod is how you present your view, and you took an overgeneralised pot-shot at Slashdot as a whole. That's a no-no, for future reference.

And your "random"-number generator, unless based on a proven algorithm, might well have vulnerabilities of its own to worry about. If you keep the source code secret, no serious security person is going to touch it with a barge pole; and if you show the source code, then your extra layer is largely irrelevant since the sequence only depends on a seed supplied by Microsoft's PRNG.

The nub of the problem is that a deterministic state machine can never produce random behaviour. The long term solution would

then your extra layer is largely irrelevant since the sequence only depends on a seed supplied by Microsoft's PRNG. There are plenty of other potential sources of randomness you can tap into, the least significant bits of timestamps for various external events, noise on analog inputs (such as the sound card) and many others.

I just don't see how its possible just from looking at the numbers themselves unless you're selecting from a pre-known selection of algorithms and comparing expected results with actual output from the generator given a specific seed. If you don't know the algo then you could be making educated guesses for literally years and still not work out the algorithm.

Eh? You reverse engineer the machine code, which is exactly what they did. Doesn't matter if it runs in kernel space either, just take any x86 VM and there you go. Hell, they used a pretty weird scheme with hashes and symmetric encryption, but once you figure out when those - rather standardized - algorithms are called, it's a piece of cake. At least for someone that knows a fair bit about debugging and reverse engineering. Many CS mayors *should* be able to do this.