The Bad Guys from Outside: Malware

Date: Apr 29, 2010 By Tom Gillis. Sample Chapter is provided courtesy of Cisco Press.
In this chapter, you'll learn how malware works and why it presents such a threat to the enterprise. In addition, you learn about the newest sophisticated tactics that malware creators use to trick computer users into downloading their wares.

This chapter includes the following topics:

  • Modern Malware Overview
  • Finding the Weak Points
  • Social Engineering for Success
  • Spamming and Phishing Get Targeted
  • Profit Motive

Along with acceptable use policies (AUP) and data loss prevention (DLP), malware, or malicious software, is one of the three critical areas that enterprise security policies must address. Malware is pervasive, painful, and expensive to detect and block.

Malware has been part of computing for decades. In the 1990s, it got onto your computer or network when you stuck an infected floppy disk into your drive, or when a clever hacker gained access to your network. Then, with email becoming more prevalent, hackers designed malware to spread as infected email attachments. Today, the Internet is a fantastic distribution mechanism for malware.

In this chapter, you can find out how malware works and why it presents such a threat to the enterprise. In addition, you learn about the newest sophisticated tactics that malware creators use to trick computer users into downloading their wares.

Modern Malware Overview

Malware, which is malicious software that infiltrates computers, networks, and mobile devices, is part of life in the information age. Malware is sent via email, spreads via portable media storage and drives—such as CDs, USB drives, and MP3 players—and can secretly download onto your computer from websites you trust.

Today, the primary distribution mechanism for malware is the World Wide Web. Malware is served not only from entirely malicious, fraudulent websites but also legitimate websites that have been compromised.

One way in which malware has changed over time is that it's a lot smarter and harder to detect than before. This makes it very difficult to get it out of your systems after they are infected. But malware still depends on vulnerabilities in technology—and weaknesses in human nature—to infiltrate computers and networks.

And hackers aren't trying to get malware onto your computers just for fun, or to see how far they can spread the code they wrote. Modern malware is a for-profit, big-business undertaking. Online criminals invest significant amounts of money and time in more efficient malware and better malware distribution mechanisms because they know the financial rewards can be enormous.

Types of Malware

The original email–propagated viruses, such as the circa-2000 Melissa or I Love You viruses, did not do much besides slow down the performance of your computer and your network. They soaked up bandwidth and processing power by sending copies of themselves to millions of people. This type of malware was created primarily to enable its authors to show off their "development" skills. For David Smith of New Jersey, the author of the Melissa virus, the erstwhile use of his computer skills backfired; following a tip from an AOL employee to law enforcement, Smith ended up spending 20 months in prison.

Following the success of these earlier mass-mailer viruses, a new class of malware was born. This malware, or spyware, was used to deliver pop-up ads. A full spectrum of pop-up ad malware exists, ranging from the legitimate but annoying to the illegitimate and harmful.

A good example of legitimate but annoying spyware is the pop-up ad generators (also called adware) often embedded in peer-to-peer applications, such as Kazaa. Users downloading the desired application had to agree to install the adware, but the adware was virtually impossible to remove. Many other pop-up generators and tracking cookies are loaded onto a user's PC without their knowledge, creating annoying ads and capturing personal web browsing information to help target more unwanted advertising.

Other forms of malware are more hostile. A particularly ugly variant of malware, known as ransomware, shuts down functionality of the end user device unless the victim pays a ransom. In 2008, several kinds of malware and ransomware for mobile phones showed up in Asia, where workers are more likely to have a mobile phone than a personal computer. As VNUnet reported, when the mobile phone was infected, the phone's owner would receive a message instructing them to pay to restore the phone's functionality.1

In a classic scam, a lot of computer-based ransomware masquerades as antispyware or antivirus software. It pretends to scan your computer for malware, tells you your device is infected, and asks you to fork over money to access the "full" version of the software that can remove the "found" infections. In 2008, a family of fake antivirus software, known as XP Antivirus, infected millions of computers netting the criminals millions of dollars.

Keylogging malware tracks every keystroke you make and sends the information back to online criminals so that they can use or resell your login names, passwords, credit card numbers, and other useful personal or corporate information.

Rootkits gain access to the core of your operating system and let criminals control your computer or network as administrators. (Some of the fake antimalware products partake in these activities instead of, or as well as, demanding money to "clean" your computer.) After criminals infiltrate your computer, they want to use it to profit. To do so, they make it part of a botnet, which is a network of thousands of infected computers that carry out the orders of online criminals by sending out massive amounts of spam, hosting websites, or participating in attacks on websites that are designed to deny visitors access to the sites (also known as a denial of service attack). This type of malware can also turn these websites into malware redirect hubs.

Another technique used by criminals is to create malicious software that looks for a flaw in the browser code or, more often, a flaw in a browser plug-in such as the Flash player. The malware creates a buffer overflow. This is one of the most common and dangerous vulnerabilities; malware piles extra data into a program's buffer or temporary data storage area. Rather than rejecting the extra data, the vulnerable software enables the extra data to be written to the next operation. A carefully crafted exploit can ensure the extra data is an attack vector, which is written to an overflow area that executes the attack. The most common exploits today target web browsers or browser plug-ins such as the Flash player or Adobe Reader. In this case, the victims merely visit a website and can be exploited and have malware installed on their computer without their interaction or knowledge; this is known as a drive-by download.

A 2008 Google study of drive-by downloads indicated that more than 3 million URLs on the Internet were found to initiate drive-by downloads. And 1.3 percent of incoming search queries to Google brought up at least one malicious URL in the search results.2

Botnets

Botnets are the backbone of criminal activity on the Internet today, and they keep growing in number and sophistication. Internet experts have likened botnets to a pandemic, and say that at one time, up to 25 percent of all Internet-connected computers were part of a botnet.3 With the steady rollout of broadband infrastructure and unprotected PCs in the emerging economies of the world, the supply of botnets appears unlimited.

Usually, the computer owner won't even know the computer is part of a botnet except for occasional slowdowns in performance. The malware that turns the computer into a botnet node, or "zombie," often invisibly downloads in the background while the computer user innocently surfs the Web. It can also be very clever at hiding from antivirus software, with code that changes every so often (making it harder to identify) or goes dormant for a while (making it harder to find).

Even Trusted Sites Can't Be Trusted

A recent development in malware distribution is the infection of legitimate websites—in enormous numbers—so they start serving up malware. The advantage for malware creators: These sites have been around for a long time, have a good reputation, and are trusted by large numbers of site visitors and security solutions—so they might be easier to exploit.

Modern malware has managed to penetrate the websites of media organizations and publications such as BusinessWeek,4 major companies, government organizations, banks, and online social networks. This enables criminals to take advantage of the millions of visitors to these trusted sites without having the inconvenience and expense of building appealing malware-distributing websites of their own.

In these cases, online criminals attack millions of legitimate websites looking for weaknesses. If they find a vulnerable site, they insert small bits of code, called iFrames, on these trusted webpages so that they start sending visitors to websites that host malware. The iFrame codes make it possible to embed one HTML document inside another one. For instance, the banner ad found on a webpage is often hosted by a different web server than the main content. Online criminals can simply incorporate a malicious URL somewhere in the iFrame, or they can hide it with JavaScript.

How do online criminals get their malicious iFrame onto a legitimate website? Most often, they use SQL injections.

This technique exploits a vulnerability in the database layer of certain web applications and servers. When website developers don't properly sanitize the data transmitted in user input fields (such as forms and user logins) on webpages that use SQL, criminals can take advantage of this weakness to take control of the website and turn it into a malware redirection hub.

Finding the Weak Points

To gain a foothold on your computer and in your corporate network, malware exploits weak points, or vulnerabilities, in widely used technologies. The myriad rapidly developing applications that make up the Web provide a wealth of vulnerabilities for online criminals to exploit.

The Web is made up of billions of pages created by different people with different levels of technical skills, offering rich content in many different formats. Accessing some of this content requires helper applications, such as media players. Many different types of back-end software serve up these webpages and content. And many of those formats, applications, and tools have weaknesses hackers can exploit.

Hackers also can exploit the Web's core infrastructure and basic standards. Many of the standards and much of the infrastructure the Web runs on were designed long before anyone thought of today's amazingly wide-ranging uses of the Web. For example, e-commerce, online banking, online social networking, and enterprise-level cloud-based computing are all common on the Web today. Ideally, you want to feel secure while engaging in those activities. But in the early days, decisions about the Internet and Web's standards and infrastructure heavily emphasized improving connectivity and access to content rather than walling off content in easily securable chunks. So, underlying infrastructure vulnerabilities, along with vulnerabilities in higher-level applications, remain a concern.

Hackers use these vulnerabilities to create exploits that let them penetrate your computer or network. Often, when you visit an infected webpage or open an infected email, the attack code starts snooping around for any known weaknesses in your system.

The malware found on a malicious website—such as one involved in an iFrame attack—begins a series of probes, looking for unpatched weaknesses in your browser, the myriad browser plug-ins you might have installed, your operating system, or any applications you might have running.

The level of sophistication is remarkable in that the malware sites can actually identify the particulars of your computer and operating system and infect or attack the system appropriately. For instance, if you run Safari as your browser, the malware sites won't bother trying any known Internet Explorer vulnerabilities. Instead, they focus on Safari or Safari plug-in weaknesses.

When a useful vulnerability is found, the goal of the malware attack is to create a buffer overflow condition in your computer. This then gives the malware the capability to initiate the download of harmful code—the keyloggers, botnet software, spyware ad generators, or other malware previously discussed.

Malware doesn't only exploit vulnerabilities in technologies. Malware creators and distributors also take advantage of "weaknesses" in human nature, such as curiosity, trust, desire for connection, and carelessness, to dupe users into handing over the keys to their system security.

Social Engineering for Success

To distribute malware, send spam, and acquire sensitive information by posing as a trusted source (also called phishing), online criminals increasingly take advantage of human nature to get victims to open an email, visit a website, or give up information. They use sophisticated social engineering techniques, and they hijack reputations of trusted websites and email senders to get their message or malware into your system.

For example, they appear to offer useful Web 2.0 tools, cool games, or interesting news content. When you click the link in the email and visit the site, the site often appears normal. However, in the background it's probing your machine, searching for a vulnerability that lets it install malware on your computer.

Other attacks try to appear like a legitimate bank or commerce site in hopes of capturing your username and password—phishing for your information. Other forms of malware sites try to get you to "buy" something from the site, giving the criminals your credit card information.

In Figure 8-1, we contrast an image of the legitimate ticketing website for the Beijing 2008 Summer Olympics with a scam ticketing website. Oddly enough, the scam site was much better looking and more user-intuitive than the real ticketing site, with better graphics and navigation—which meant visitors to the fake site were lulled into a sense of comfort. Unfortunately, people who entered orders on the fake site received no tickets but had their credit card numbers stolen.

Figure 8-1

Figure 8-1 Fake Sites Can Look Better Than the Real Thing

Some malware is still distributed as email attachments, but the more successful of these campaigns also depend heavily on social engineering to make the emails appear trustworthy so that you'll open them. (And the more sophisticated malware payloads available today can avoid being filtered out by antimalware solutions for a longer period, also increasing the email-borne malware's chance of getting through.) Recent successful email-borne malware campaigns include

  • Emails with attachments pretending to be "shipping department profit and loss statement" spreadsheets, which are highly personalized and sent to specific company executives.
  • Emails with attachments that pretend to be delivery confirmation requests from major shipping services, such as UPS or FedEx.
  • Emails that are highly personalized and pretend to be from tax authorities or consumer information bureaus, asking company executives to fill out the attached form in response to a tax concern or business complaint.

The social engineering involved in the preceding attacks often is irresistible to end users. How many of us wouldn't open an email from FedEx saying the package we sent on a certain date couldn't be delivered, especially if we had sent off a few packages that same week?

Advanced social engineering techniques usually involve additional information to personalize the attack and make it seem closer to legitimate traffic. To support this next wave of personalized attacks, criminals mine social networking sites for personal information that they can later use to personalize phishing messages sent to you, or to your colleagues, friends, or family.

Spamming and Phishing Get Targeted

Spamming and phishing are becoming much more sophisticated. Spam emails use highly topical subject lines, often related to current news events. The content in the message looks and sounds much more legitimate and professional than it used to. Spam often closely mimics legitimate senders' messages—not just in style but by "spoofing" the sender information, making it look like it comes from a reputable sender.

The increasing personalization and sophistication of spam messages benefits the spammer in two ways:

  • If it looks more like legitimate traffic, modern spam is more likely to slip past antispam software.
  • Because of the targeted content, more people will actually open the message. More messages getting through filters and more messages opened means increased profits for the spammer.

The majority of spam is still classified as mass mailing spam, for example, billions of copies of messages for illegal pharmaceutical sites or the venerable get-rich-quick scams. The original mass mailers would send large volumes of the same message from a few source locations on the Internet. But these types of campaigns are relatively easy for spam filters to block through keyword analysis and blacklists of the mailing sources. Modern mass mailing spam still involves billions (yes, billions) of messages per attack, but they typically come from millions of different sources—coordinated by botnets—to obscure their origin. A modern mass mailer can also include tens of thousands of variations in the content, to defy keyword or signature filters.

In addition to the increasingly sophisticated camouflage techniques of the high-volume spammers, more and more spam campaigns are aimed at specific groups, such as sports fans, or at people in certain geographic regions. These campaigns are even harder to detect due to the low volume associated with a targeted attack. Figure 8-2 shows the increasing trend of targeted attacks over time.

Figure 8-2

Figure 8-2 Targeted Attacks as a Percentage of Overall Spam

For phishing spam that's aimed at obtaining personal or financial information, targeted phishing—also known as spear-phishing—has become the norm. Figure 8-3 shows how spear-phishing has become more frequent, and more lucrative, than traditional spam campaigns.

Figure 8-3

Figure 8-3 Spear-Phishing Attacks Versus Traditional Spam

Some recent spear-phishing campaigns involved personalized messages sent to customers of specific banks or frequent flyer programs to prompt them to log in or input their account information on a phishing website. Other campaigns are based on personalized emails sent to company executives, claiming they were subpoenaed or needed to give information to tax authorities. Figure 8-4 shows a sample targeted phishing email.

Figure 8-4

Figure 8-4 Example of a Targeted Phishing Email

Criminals aren't solely depending on email and websites to practice their craft. Text messaging to mobile phones, combined with fake call-center setups, are another way they gather information. For instance, they send an SMS (Short Message Service, or text message) that claims to be from a regional bank to mobile phone numbers in a certain area code. The SMS asks recipients to call a number to confirm their account information, but of course, the number isn't actually that of the bank. It's staffed by criminals.

Profit Motive

Much of today's malware has one goal in common: financial profit. Hackers used to create viruses largely for fun and glory. These days, hackers and online criminals are part of a sophisticated shadow economy that wants to make money.

Like any maturing industry, the online crime market has begun to segment into specializations. Some online criminals focus on the social engineering, marketing, and fulfillment of merchandise. Others work on building and maintaining massive bot networks that they make available for rent. And some organizations specialize in building and deploying tools for malware creation and delivery.

Talented developers have been creating ever-better variants of malware. They create malware for a specific, popular purpose and sell it "as is" or together with tech support. They also develop custom malware for specific projects. Of the types of malware now for sale or rent, the following are just a few examples:

  • Mass blog-posting tools
  • Volume spamming tools
  • Account-generating tools for webmail accounts or community posting sites, such as Craigslist
  • Keylogging programs
  • Botnet management tools

Because malware is generating significant profits for online criminals, they'll keep investing in it. That means more new kinds of malware that take advantage of weaknesses in both existing and newly popular technologies and tools, and malware that works even harder to be efficient and stay hidden.

But how exactly are online criminals profiting from malware? And who's reaping these financial returns? In the next chapter, we explore the business aspects of malware.

References

Cisco 2008 Annual Security Report. www.cisco.com/en/US/prod/collateral/vpndevc/securityreview12-2.pdf.

IronPort Targeted Phishing Overview PPT 061308—Nilesh Bhandari, IronPort.

IronPort Targeted Phishing Security Trends Overview. www.ironport.com/pdf/ironport_targeted_phishing.pdf.

IronPort 2008 Internet Malware Trends Report—Storm and the Future of Social Engineering. http://www.ironport.com/malwaretrends/.

Cisco IntelliShield Cyber Risk Reports. http://tools.cisco.com/security/center/cyberRiskReport.x.

ZDnet Zero Day blog. http://blogs.zdnet.com/security/.

CNet Security News. http://news.cnet.com/security/.

The Spamhaus Project news blog. http://www.spamhaus.org/newsindex.lasso.