Only 200 computers were affected by the Trojan horse virus that caused Microsoft to issue a security release on October 23, according to a security researcher.

Joe Stewart, director of malware research at SecureWorks, tracked down 'Gimmiv', the Trojan that started the rush to patch. By accessing three control servers used by Gimmiv's makers, downloading log files and then decrypting the encrypted data, Stewart was able to pinpoint its origin, the first evidence of its spread and the overall number of infected PCs.

Microsoft warned of the critical vulnerability in the Windows Server service, which is used by all versions of the operating system, including client editions, to connect to file and print servers on a network. Hackers were already exploiting the bug in what Microsoft called "limited, targeted attacks," the company said as it issued a patch outside its normal second-Tuesday-of-the-month schedule.

Gimmiv, which Microsoft tagged as 'Win32/MS08067.gen!A' instead, was identified as the malware that prompted the emergency patch.

It first popped up August 20 and was probably written by a South Korean hacker, said Stewart. According to the log files, however, the Trojan was present at only two IP addresses in August, and then only briefly.

"One of these IP addresses, located in Korea, we can tell was running Gimmiv in a VMware virtual machine, exactly the kind of thing you might expect someone testing a piece of malicious mobile code to do," said Stewart.

Not until September 29, however, did Gimmiv show up 'in the wild' as log files noted an infected PC in Hanoi, Vietnam. All told, approximately 200 machines in 23 countries were successfully attacked by Gimmiv between September 29 and October 23, when Microsoft released its out-of-cycle fix. Many of the machines were on two networks in Malaysia, and few systems outside of Asia were compromised.

The log files recorded just one hacked machine in North America, for instance.

"But we had just as many questions after this as before," said Stewart, who ticked off a long list of unusual characteristics of Gimmiv. "They weren't the worst programmers ever, but it seemed like this was put together quickly. It almost felt like a half-finished program."

NEXT PAGE: Code that led to nowhere

Only 200 computers were affected by the Trojan horse virus that cause Microsoft to issue a security release on October 23, said a security researcher.

Stewart found lots of debug code in Gimmiv, as well as code that led nowhere. "Sections were supposed to do something, but never did," he said. "For example, it pings a website in China and then if that's not available, Google. It sends a special pattern in the ping but doesn't do anything with the results.

"It also gathers a lot of information about the [infected] system, such as email passwords and the ActiveX controls on the PC, then encrypts the information. But it doesn't send it anywhere," Stewart added. "There are just a lot of thing here that don't fit your typical malware pattern."

One thing Stewart was sure of, though, is that Gimmiv is more than a simple password stealer, which is how some researchers originally described it. Instead, the Trojan uses a two-stage attack process in which the first stage is relatively unsophisticated, with the second significantly more complex.

"The difference between the first and second stages is that the first uses strong encryption but a weak key, while the second uses a much stronger key, and different keys for each function," said Stewart. The pattern led him to speculate that the first stage was a decoy for the second, which included backdoor and propagation components in its payload.

Another oddity is the hard-coded termination date for Gimmiv's second-stage bits. "The first stage deletes itself immediately, but the second stage remains until the end of November," Stewart said. At that point, those parts of the threat also self-destruct.

"This seems like an odd way to deploy a worm," said Stewart, "especially one that exploits a zero-day vulnerability."

Prior to the patch, the last time that Microsoft released an emergency security update was April 2007. In the 12 days since the most recent patch, hackers posted exploit code on the internet and a second piece of malware, a worm dubbed 'Wercorl' has been put into circulation.