Hackers have publicly released new attack code that exploits a critical bug in the Windows operating system, putting pressure on Microsoft to fix the flaw before it leads to a worm outbreak.

The vulnerability has been known since Sept. 7, but until today the publicly available programs that leverage it to attack PCs haven't been able to do more than crash the operating system. A new attack, developed by Harmony Security Senior Researcher Stephen Fewer, lets the attacker run unauthorized software on the computer, in theory making it a much more serious problem. Fewer's code was added to the open-source Metasploit penetration testing kit on Monday.

Two weeks ago, a small software company called Immunity developed its own attack code for the bug, but that code is available only to the company's paying subscribers. Metasploit, by contrast, can be downloaded by anyone, meaning the attack code is now much more widely available.

Metasploit developer HD Moore said Monday that the exploit works on Windows Vista Service Pack 1 and 2 as well as Windows 2008 SP1 server. It should also work on Windows 2008 Service Pack 2, he added in a Twitter message.

But the code may not be completely reliable. Immunity Senior Researcher Kostya Kortchinsky said that he could get the Metasploit attack to work only on the Windows Vista operating system running within a VMware virtual machine session.

When he ran it on native Windows systems, it simply caused the machines to crash.

The attack "definitely works on at least some physical machines, but looks like it could use more testing," Moore said.

Either way, the public release of this code should put Windows users on alert. Security experts worry that this code could be adapting to create a self-copying worm attack, much like last year's Conficker outbreak.

That's because the underlying flaw that all of these programs exploit lies in the SMB (server message block) version 2 system, introduced in Vista. Microsoft has confirmed that Immunity's attack works on 32-bit versions of Vista and Windows Server 2008, but did not have any immediate comment on the Metasploit code.

The flaw has been patched in Windows 7, Kortchinsky said.

On Sept. 18, Microsoft released a Fix It tool that disables SMB 2, and the company said that it is working on a fix for the software.

Whether that patch will be ready in time for Microsoft's next set of security patches, due Oct. 13, remains to be seen.