Tech news website Ars Technica reported on Saturday that YouTube was hijacked to mine a Bitcoin-like "cryptocurrency" with viewers' computers.
The attacker exploited YouTube's ad service to load mining software on viewers' browsers without any notice. The coins went to the attacker instead of viewers.
As high as 80 percent of the computing power will be drained for mining, according to the code found in a screenshot posted on Twitter by victim Diego Betto.
The software wouldn't stop mining even after the ads finished playing, meaning it will continue draining power through the whole watching process.
The secret attack was exposed because it was caught by anti-virus software.
Mining cryptocurrency is a super-heavy computing process. Even if the mining software limited power usage at 80 percent, the victims would still experience noticeable performance hit.
The mining software, Coinhive, is a safe piece of code that mines the"Monero" cryptocurrency. The code can be put into any webpage.
But Coinhive requires miners to notify it's user, which didn't happen in the YouTube attack.
YouTube blocked the illegal ads "in less than two hours," according to the company's email to Ars Technica. But the news media said the timeline could be wrong, as they have found examples of the code that lasted for a week.
The e-coin craze
Cryptocurrencies are a form of digital data that represents a market value. This kind of "money" does not need a regulatory body, like bank notes, thus is considered by many to be a money replacement.
The system uses an encryption method called blockchain to ensure safety, a significant technological development in recent years.
The value of cryptocurrencies can rise and drop at crazy speed. The most known example is Bitcoin, whose value skyrocketed more than 20,000 times its original value from 2010 to 2017.
The price surge has drawn significant attention from investors, who bought massive amounts of computer graphics cards to "mine" the e-coins through calculation, causing a global short of supply.
The limit on the supply of graphic cards impacted the PC gaming world, as these cards were originally designed to run video games.
Nvidia, a major card maker, has required buyers not to use these cards to do mining. Some computer parts shops in the U.S. are now offering discounts if the buyer promises to use the card solely for gaming.
China, the second-largest market in the world, has put up a ban on RMB-cryptocurrency exchanges, but it didn't stop the worldwide "new money" craze.
The turning point?
But the situation may be changing, as some major online sellers stopped accepting Bitcoin payments. Major PC game seller Steam stopped in December 2017, and it was followed by Microsoft in January 2018.
U.S. e-payment company Stripe also announced it will be ending Bitcoin support by April, due to slow transaction speeds, a high failure rate and rising fees.
"Bitcoin has evolved to become better suited to being an asset than being a means of exchange," said Tom Karlo, a product manager of the company, in the termination announcement.