Security Experts:

Flame Malware Hijacks Windows Update Mechanism

New details have emerged showing that the Flame malware abused Microsoft's Windows Update mechanism to infect computers.

According to new information revealed by researchers, three modules of the Flame malware – named Snack, Gadget and Munch – are used to launch what is essentially a man-in-the-middle attack against other computers on a network.

Flame Malware Compromised Windows Update

"When a machine tries to connect to Microsoft’s Windows Update, it redirects the connection through an infected machine and it sends a fake, malicious Windows Update to the client," blogged Alexander Gostev, head of the Global Research and Analysis team at Kaspersky Lab. 

"When a victim updates itself via Windows Update, the query is intercepted and the fake update is pushed," he explained. "The fake update proceeds to download the main body and infect the computer."

According to Symantec's Security Response team, the Snack module sniffs NetBIOS requests on the local network. NetBIOS name resolution allows computers to find each other on a local network via peer-to-peer, opening up an avenue for spoofing.

"When clients attempt to resolve a computer name on the network, and in particular make WPAD (Web Proxy Auto-Discovery Protocol) requests, Flamer will claim it is the WPAD server and provide a rogue WPAD configuration file (wpad.dat)," Symantec noted. "NetBIOS WPAD hijacking is a well-known technique and many publicly available hack tools have implemented the technique."

"Once a computer that has not yet been compromised receives the rogue wpad.dat file, it will set its proxy server to the Flamer-compromised computer," the firm noted. "All its web traffic will now be redirected to the Flamer compromised computer first."

The Munch component is a Web server within Flamer and receives the redirected traffic and checks for a variety of queries, including matching URLs for Windows Update.

"Hijacking Windows Update is not trivial because updates must be signed by Microsoft," Symantec's team added. "However, Flamer bypasses this restriction by using a certificate that chains to the Microsoft Root Authority and improperly allows code signing. So when a Windows Update request is received, the GADGET module through MUNCH provides a binary signed by a certificate that appears to belong to Microsoft."

The findings have prompted Microsoft to say that it plans to harden Windows Update against attacks in the future, though the company did not immediately reveal details as to how.

"The Flame malware used a cryptographic collision attack in combination with the terminal server licensing service certificates to sign code as if it came from Microsoft," blogged Mike Reavey, senior director of Microsoft Security Response Center. "However, code-signing without performing a collision is also possible. This is an avenue for compromise that may be used by additional attackers on customers not originally the focus of the Flame malware. In all cases, Windows Update can only be spoofed with an unauthorized certificate combined with a man-in-the-middle attack."

"To increase protection for customers, the next action of our mitigation strategy is to further harden Windows Update as a defense-in-depth precaution," he added. "We will begin this update following broad adoption of Security Advisory 2718704 in order not to interfere with that update’s worldwide deployment."

Related News: Microsoft Certificate Was Used to Sign "Flame" Malware

Tech Insight: What Flame Means to the Enterprise