A new report alleges that infringed content, malware and fake traffic is costing the U.S. advertising and media industry about $8.2 billion each year.

The study, which was completed independently by EY at the request of the Interactive Advertising Bureau, took a look at existing studies, data analytics and 30 top companies to determine the cost of these illegal digital activities. EY focused on U.S., not global costs.

Nick Terlizzi, media and entertainment advisory partner at EY, said on a press call Tuesday that the three categories are more interlinked than the public might realize. A person might go to an infected website to download a movie illegally and unknowingly get malware on their computer. Those illicit programs then use their computer as part of a "zombie army" or "bot farms" to direct the computer to visit websites that the user isn't really viewing.

Banks Vulnerable to Ad Fraud ‘Zombie Army’: Report

"This is a problem that is shared," said Sherrill Mane, senior vice president of analytics and measurement at the IAB. "This is not something that only the IAB can handle. We need the help of the marketers and agencies. We have to start thinking big and holistically."

The $8.2 billion figure breaks down into a $4.6 billion cost due to invalid traffic, with the vast majority hitting advertisers since they are paying for digital ads that are not seen by real people. About three-fourths of fake ad traffic happens on desktop devices.

So-called “malvertising” added $1.1 billion to the total. Most of the cost came from lost revenue due to ad blockers. The report suggested that at least 17 percent of people used the programs because they were afraid of unknowingly downloading viruses or other programs to their devices.

Illegal Downloading Falls. Thank Netflix?

Illegal downloads took a $2.5 billion slice, mostly in lost advertising and subscription revenue. Password sharing — when one consumer buys an account and gives access to friends and family — is costing the industry about $48 million.

If all illegal content could be removed from online, the report estimated that media companies would earn about $2 billion more from subscription-based models and about $456 million more from ad-supported platforms each year.

One media company told CNBC that its internal research team determined there are about 450 major piracy sites, which get about 266 million unique visitors a month.

Public’s Love for Ad Blockers Infuriating Publishers

Avi Lerner, the producer of "Expendables 3," told Variety that the movie was downloaded illegally by about 10 million people globally, equaling a loss in revenue of about $250 million.

While it may be hard to feel bad for multimillion-dollar media conglomerates, CreativeFuture CEO Ruth Vitale points out that illegal downloads heavily impact smaller media companies that focus on independent productions. The entertainment industry advocacy group which works against piracy pointed out that "The Hurt Locker" was seen 8 million times in theater according to Box Office Mojo, but downloaded 10 million times on BitTorrent as of May 2010, as TorrentFreak reported.

Likewise, "Dallas Buyers Club" sold about 7 million tickets, but was downloaded illegally about 22 million times. If just 10 percent of the pirated "Dallas Buyers Club" views had been paid ticket sales, the film would have earned an additional $17 million.

The Ad-Blocking Threat Is Real: LinkedIn Exec

Vitale said what's important to remember is that it's not just media companies that make money from entertainment, but everyone who works in a creative industry. About 5.5 million people are employed in the U.S. in creative field, according to Creative Future. She fears that if people continue to download illegal materials, there won't be any financial incentives left for future generations to go into the arts and entertainment.