Here’s one unconventional way to pay off student loans: A burgeoning cryptocurrency business.

Cryptocurrency mining, the process by which people use computing power to verify transactions on the blockchain, can be lucrative. And it’s happening more frequently on college campuses, according to a study released Thursday by cybersecurity company Vectra.

Miners who solve the complicated math problems called ‘proof of work’ to verify a transaction get a monetary cut of the transaction as a reward. Joey Dilliha, an 18-year-old freshman at Western Kentucky University, says he’s making $30 a week on his Bitmain Antminer rig simply by leaving it plugged in in his dorm room and running it with the school’s free electricity.

“I believe more people should be doing it,” Dilliha told MarketWatch. “It’s a super fun, and cool cheap way to be introduced to the market of mining.”

Dilliha’s mining set-up in his dorm. Joey Dilliha

Dilliha, who bought his rig for $250 on eBay, has turned a profit of $180 so far. Some 60% of mining traffic originates from computers with IP addresses linked to colleges and universities, Vectra found, with health care is the next highest industry for mining traffic at only 3%. That means college students — or in some cases, hackers — are mining crypto from their dorm rooms in massive amounts taking advantage of the free electricity.

Mining gobbles up 215 kilowatt-hours of energy for each transaction. According to Morgan Stanley data, the total energy consumption of the bitcoin BTCUSD, +0.12% network consumes as much electricity as 2 million U.S. homes. Mining a single bitcoin can cost anywhere from $3,000 to nearly $10,000 in some states, depending on the cost of electricity.

“Students are more likely to perform crypto mining personally as they don’t pay for power, the primary cost of crypto mining,” Chris Morales, head of security analytics at Vectra said.

Some schools have explicitly outlawed the practice. Stanford University warned in a blog post in January the practice has led to “compromised systems, misused university computing equipment, and personally owned mining devices using campus power.”

“Per university policy, Stanford resources must not be used for personal financial gain,” the notice said. “As such, community members are prohibited from using university resources (including computing equipment, network services, and electricity) for cryptocurrency mining activities outside of faculty sanctioned research and course work.”

Dilliha, the student at Western Kentucky, said his mining set-up is banned — not because it’s using the university’s power, but because it’s a fire hazard. “On dorm room check days, I have to turn it off and put a blanket over it,” he said. “However my RA loves to come in and talk about it with me.”

In some cases, the mining traffic on college campuses could be coming from outsiders: Hackers can target students and use their computer power to execute the proof of work and rake in the profit. Universities have high bandwidth capacity networks and students are more likely to use questionable websites to access things like illegal movies, music, and software, Morales said, making it easier for outside actors to infect their devices with crypto mining malware.

How to invest in blockchain without buying bitcoin

One security director at a large university told Morales that students could be watching pirated movies from a untrusted website that is crypto mining using their computer throughout the entire watching session. Such hacks are difficult to detect and can only be found when they’re carried out on a mass scale, Morales said. Cryptocurrency mining malware has been on the rise, according to security company McAfee chief technology officer Steve Grobman.

“Cybercriminals will always seek to pursue greatest returns on their investment of time, talent, and resources, while minimizing risk,” he said. “Cryptocurrency mining is an optimal form of cybercrime across these vectors when compared to data theft and ransomware. In the case of crypto mining, criminals can infect thousands of machines and get paid, all without the risks associated with transacting with victims or dealing in the black markets of the dark-web.”

College students have shown an increasing interest in cryptocurrencies since the price of bitcoin shot up in 2017. One in five students report using their student loan money to buy cryptocurrency, a 2018 poll from the Student Loan Report found.