
After years of burying malicious software in email and portable storage media, attackers now favor quick downloads via legitimate websites, researcher say.
WASHINGTON, D.C. -- OWASP AppSec DC 2010 --  Why try to fool users into opening email attachments when you can simply  drop a Trojan on them from their favorite websites? 
 That's the question many malware authors and distributors are asking --  and the obvious answer is spurring most of them to try out the emerging  "drive-by download" method, according to a speaker here this week. 
 "What we're seeing is a fundamental change in the method of malware  distribution," said Neil Daswani, CTO of Dasient, which offers a service  that detects and eradicates Web-borne malware. "In the old days, we saw  executable code in a static file, which was originally delivered via  floppy disks and then via email attachments. Now we're seeing active  content delivered via drive-by downloads at legitimate sites." 
 A drive-by download typically begins by injecting a Web page with  malicious code, often through JavaScript, Daswani explained. The code  generally invokes a client-side vulnerability to deliver shell code,  such as the JavaScript-based Heap Spray attack, to take control of the  user's machine. From there, the attacker can send a "downloader," which  is often custom, zero-day code that isn't recognized by traditional  antivirus systems.  
 Once the downloader is in place, the attacker can deliver his malware of  choice, Daswani said. Drive-by downloads are particularly effective for  delivering code that can steal end user credentials (such as Zeus),  launch a fake antivirus scam (such as Koobface), steal server-side  administrative credentials (such as Gumblar), steal corporate secrets  (such as Project Aurora), or collect fraudulent click revenue (such as  clickbot.A), he noted. 
 While drive-by downloads are often more effective at infecting end user  devices than email attachments, they also give the attacker broader  reach, Daswani observed. Drive-by downloads can be used to infect  thousands of websites at once, often by hiding in common third-party  devices that are distributed to many sites, such as advertisements,  widgets, images, or third-party applications. 
 "A lot of user organizations do a great job of scanning the code they  put on their own sites, but they may not scan the code they're posting  from third parties," Daswani warned. "The marketing people will add an  ad or a widget to a site, and the IT people may not vet it before it's  posted." 
 Many well-known sites are infected by malware, and the most popular  sites are generally targeted most frequently, Daswani noted. In the past  two years, major government sites, such as the Treasury Department and  Environmental Protection Agency, have been infected, causing them to  serve up drive-by downloads to their users. The National Institute of  Health has been infected five times in the past two years, and the state  of Alabama's website has been infected 37 times in that same time  period, he reported. 
 "It's time to recognize that this is the method of choice for many distributors of malware," Daswani said.