Malvertising

Malvertising (a portmanteau of "malicious software (malware) advertising") is the use of online advertising to spread malware. It typically involves injecting malicious or malware-laden advertisements into legitimate online advertising networks and webpages. Because advertising content can be inserted into high-profile and reputable websites, malvertising provides malefactors an opportunity to push their attacks to web users who might not otherwise see the ads, due to firewalls, more safety precautions, or the like. Malvertising is "attractive to attackers because they 'can be easily spread across a large number of legitimate websites without directly compromising those websites'."

Malvertising can be extremely hard to combat because it can quietly work its way into a webpage or advertisement on a webpage and spread unknowingly: "The interesting thing about infections delivered through malvertising is that it does not require any user action (like clicking) to compromise the system and it does not exploit any vulnerabilities on the website or the server it is hosted from... infections delivered through malvertising silently travel through Web page advertisements." It is able to expose millions of users to malware, even the most cautious, and is growing rapidly: "In 2012, it was estimated nearly 10 billion ad impressions were compromised by malvertising." Attackers have a very wide reach and are able to deliver these attacks easily through advertisement networks. Companies and websites have had difficulty diminishing the number of malvertising attacks, which "suggests that this attack vector isn’t likely to disappear soon."

AIDS Trojan or PC Cyborg Ransomware was the first ever malware created to extort money and was documented in 1989. It was released via a floppy disk and could replace the AUTOEXEC.BAT file in the system. According to sources, the ransomware was released during the World Health Organization’s AIDS conference in 1989. It was distributed to 20,000 doctors and AIDS researchers who attended the conference.

Overview
When websites or web publishers unknowingly incorporate corrupted or malicious advertisements into their page, computers can become infected pre-click and post-click. It is a misconception that infection only happens when visitors begin clicking on a malvertisement. "Examples of pre-click malware include being embedded in main scripts of the page or drive-by-downloads. Malware can also auto-run, as in the case of auto redirects, where the user is automatically taken to a different site (without user interaction, such as clicking on them), which could be malicious. Malware can also be found in the delivery of an ad – where a clean ad that has no malware pre- or post-click (in its build and design) can still be infected whilst being called. Malicious code can hide undetected and the user has no idea what's coming their way. A post-click malvertisement example: "the user clicks on the ad to visit the advertised site, and instead is directly infected or redirected to a malicious site. These sites trick users into copying viruses or spyware usually disguised as Flash files, which are very popular on the web." Redirection is often built into online advertising, and this spread of malware is often successful because users expect a redirection to happen when clicking on an advertisement. A redirection that is taking place only needs to be co-opted in order to infect a user's computer.

Malvertising affects every part of the digital advertising chain differently. From platforms to publishers, and all the way down to the end-user who may have been the victim of a malvertising attack, everyone is affected. Malvertising often involves the exploitation of trustworthy companies. Those attempting to spread malware place "clean" advertisements on trustworthy sites first in order to gain a good reputation, then they later "insert a virus or spyware in the code behind the ad, and after a mass virus infection is produced, they remove the virus", thus infecting all visitors of the site during that time period. The identities of those responsible are often hard to trace, making it hard to prevent the attacks or stop them altogether, because the "ad network infrastructure is very complex with many linked connections between ads and click-through destinations."

Some malvertisements can infect a vulnerable computer even if the user never clicks on the (normal-appearing) advertisement.

History
The first recorded sightings of malvertising were in late 2007 and early 2008. The threat was based on a vulnerability in Adobe Flash (something that has continued into the late 2010s ) and affected a number of platforms including MySpace, Excite and Rhapsody. In 2009, the online edition of The New York Times Magazine was found to be serving an ad that was part of a larger click fraud scam that created a botnet network of malware-infected computers, nicknamed the Bahama botnet, that then went on to be used to carry out click fraud on pay per click ads all over the web. The banner feed of The New York Times was hacked for the weekend of September 11 to 14, causing some readers to see advertisements telling them their systems were infected and trying to trick them into installing rogue security software on their computers. According to spokeswoman Diane McNulty, "The culprit approached the newspaper as a national advertiser and had provided apparently legitimate ads for a week", and the ads were switched to the virus alert malvertisement afterwards. The New York Times then suspended third-party advertisements to address the problem, and even posted advice for readers regarding this issue on its technology blog.

In 2010, malvertising took off. Marketing analysts ClickZ noted that the Online Trust Alliance (OTA) identified billions of display ads, across 3500 sites carrying malware. In the same year the Online Trust Alliance formed a cross industry Anti-Malvertising Task Force. In 2011, Spotify had a malvertising attack which used the Blackhole exploit kit – this was one of the first instances of a drive-by download, where a user does not even have to click on an ad to become infected with malware. Symantec added malvertising as a section in their Internet Security Threat Report 2013 in 2012. Symantec used scanning software across a series of websites and detected that half of them were infected with malvertising. In 2012, the Los Angeles Times was hit by a massive malvertising attack which used the Blackhole exploit kit to infect users. It was seen as part of a general campaign of malvertising to hit large news portals – this strategy carried on into subsequent years with attacks on huffingtonpost.com and The New York Times. The growing intensity of malvertising continued in 2013, when a major malvertising campaign was waged against Yahoo.com, one of the largest ad platforms with monthly visits of 6.9 billion. The malware exploit was based on the commonly used web attack, Cross-site scripting (XSS), number three in the top ten web attacks types identified by the Open Web Application Security Project (OWASP). The attack infected users' machines with the ransomware Cryptowall, a type of malware that extorts money from users by encrypting their data and placing a ransom of up to $1000 in bitcoins, to be paid in seven days, to decrypt the data. In 2014, there were major malvertising campaigns on the DoubleClick and Zedo ad networks. Various news portals, including The Times of Israel and the Hindustan Times, were affected. As in previous attacks the cybercrime involved Cryptowall as the malware infection. This spate of malvertising was believed to have brought over $1 million of ransom money in by infecting over 600,000 computers.

According to McAfee's February 2015 Threat Report, malvertising was beginning to grow quickly on mobile platforms in late 2014 and early 2015. Additionally, in 2015, there were malvertising campaigns on eBay, Answers.com, talktalk.co.uk, and wowhead.com, among others. The campaigns involved breaches of ad networks, including DoubleClick and engage:BDR. There was also a report of possibly the first "political malvertising" campaign by pro-Russian activists, which was based on a botnet, which then forced users' machines to visit bogus sites that generated ad revenue for the activists. The users also ended up at several pro-Russian propaganda videos.

In 2021, ransomware gang REvil was spotted using paid positioning in Google search results to deliver malicious files to victims. Malvertising cash or cryptocurrency giveaway campaigns with actors masquerading as popular figures including YouTuber MrBeast, Elon Musk, and others have been seen across many advertising platforms and social media sites. In 2022, reports surfaced of Native advertising on google search masquerading to be various software download pages (oftentimes open source), leading users to instead download ransomware, info stealer, or redirect them to tech support scams

More examples of malicious advertisements
Several popular websites and news sources have been victims to malvertising and have had malicious advertisements placed on their webpages or widgets unknowingly, including Horoscope.com, The New York Times, the London Stock Exchange, Spotify, and The Onion.

Types and modes
By visiting websites that are affected by malvertising, users are at risk of infection. There are many different methods used for injecting malicious advertisements or programs into webpages:
 * Pop-up ads for deceptive downloads, such as fake anti-virus programs that install malicious software on the computer
 * In-text or in-content advertising can have text adjusted to include malicious hyperlinks associated with content
 * Drive-by downloads is the activity of downloading a malicious file without a users consent as they visit a website
 * Web widgets in which redirection can be co-opted into redirecting to a malicious site
 * Hidden iframes that spread malware into websites
 * Content delivery networks exploited to share malware
 * Malicious banners on websites
 * Third-party advertisements on webpages
 * Third-party applications, such as forums, help desks, and customer relationship management and content management systems
 * Mobile advertising through SMS promotions

Preventive measures
There are several precautions that people can take to reduce their chances of getting tricked by these advertisements. Commonly used programs such as Adobe Flash Player and Adobe Reader can and have had their flaws exploited, and become vulnerable to attacks, so it is important to avoid them, or at least keep them up to date. Users can also download anti-virus software that protects against threats and removes malicious software from their systems. Users can also push companies and websites to scan advertisements before making them active on their webpages. Users can also use ad blocking software to avoid downloading the malware contained in advertisements or a specific browser extension alerting malvertising campaigns.