Feeds

Can WinXP Product Activation be reverse engineered?

It's beginning to look possible...

  • alert
  • submit to reddit

The essential guide to IT transformation

When Fully Licensed GmbH published details of its analysis of Microsoft's Windows Product Activation (WPA) system earlier this week, it had deliberately removed a small piece of the picture. The company made a fully-working executable of its XPDec utility available for download along with the XPDec source code, but it removed the encryption key from the source.

It seems, however, that this is only a minor obstacle for anyone wishing to have the complete source; The Register has been passed an explanation of how it can be restored, and it really sounds quite simple:

In main.c, there's a function called KeyedHash. From the source:

static unsigned char Key[4] =
{
#error The key has been removed from the source code. Please obtain the executable.
};

Since the key is 4 bytes long, simply insert the 4-letter word of your choice, and compile the project (I was thinking of our good friend Mr Gates when I thought up mine)

static unsigned char Key[4] =
{
"TWAT"
};

This produces an almost identical .exe file, which with the aid of a hex editor can then be compared to the downloaded .exe, and this allows you to zero in on the key.

But what is the point of having it? It is not in itself, according to our informant, the key to the gates of heaven. It doesn't allow you to get around WPA directly; what it does is encrypt the already-hashed part of the data, including the hardware data, when XP is generating a product key to be verified.

He suggests: "What it does allow you to do is generate vast numbers of arbitrary product IDs, which you can then (if you're clever) trick MS into giving you the unlock codes for. If you have access to a ready supply of Windows serial numbers (ie a corporate network), you can feed them in, activate them with different hardware data until they are exhausted, and get lots and lots of corresponding unlock keys."

So it begins to sound interesting, and maybe Microsoft does have some kind of security headache here. He continues: "With a bit of reverse engineering (well, maybe quite a lot), some hacking around with the various encryption algorithms used, and a lot of patience, you should (theoretically) be able to create an app that will give you the unlock code for any arbitrary product key; obviously this process will be greatly simplified with the addition of more sample data."

Not that it's necessarily going to be even that easy: "If MS are not entirely stupid, they should have implemented some kind of public-key cipher (RSA would be ideal) for the unlock codes; MS would encrypt the 'OK' message with their private key, and the client would use the freely-available public key to verify it. Even so, most of the public-key algorithms used suffer from some kind of weakness given enough sample data; it's also dependent on them implementing it properly."

At the very least, this opens up intriguing possibilities. ®

Related Stories

WinXP Product Activation decoded and analysed

Boost IT visibility and business value

More from The Register

next story
Munich considers dumping Linux for ... GULP ... Windows!
Give a penguinista a hug, the Outlook's not good for open source's poster child
The Return of BSOD: Does ANYONE trust Microsoft patches?
Sysadmins, you're either fighting fires or seen as incompetents now
Intel's Raspberry Pi rival Galileo can now run Windows
Behold the Internet of Things. Wintel Things
Microsoft cries UNINSTALL in the wake of Blue Screens of Death™
Cache crash causes contained choloric calamity
Eat up Martha! Microsoft slings handwriting recog into OneNote on Android
Freehand input on non-Windows kit for the first time
Linux kernel devs made to finger their dongles before contributing code
Two-factor auth enabled for Kernel.org repositories
prev story

Whitepapers

5 things you didn’t know about cloud backup
IT departments are embracing cloud backup, but there’s a lot you need to know before choosing a service provider. Learn all the critical things you need to know.
Implementing global e-invoicing with guaranteed legal certainty
Explaining the role local tax compliance plays in successful supply chain management and e-business and how leading global brands are addressing this.
Build a business case: developing custom apps
Learn how to maximize the value of custom applications by accelerating and simplifying their development.
Rethinking backup and recovery in the modern data center
Combining intelligence, operational analytics, and automation to enable efficient, data-driven IT organizations using the HP ABR approach.
Next gen security for virtualised datacentres
Legacy security solutions are inefficient due to the architectural differences between physical and virtual environments.