Vulnerable internet-connected devices from security cameras to smartphones can be hijacked by hackers and turned into tools to mine cryptocurrencies, a cybersecurity company has demonstrated.

Avast, which is based in the Czech Republic, ran a demonstration on Wednesday at Mobile World Congress in Barcelona, Spain, which had a number of devices running on a network powering a cryptocurrency mining software.

Mining is the process of verifying transactions on a cryptocurrency network by solving complex mathematical problems with high-powered computers. Bitcoin is very difficult to mine without having a super computer, but another cryptocurrency called monero can be done with a network of internet-connected devices.

Avast couldn't get 15,000 devices onto its hacked network, but based on the tests it did run, it said that it would need that number of internet-connected gadgets to mine $1,000 of cryptocurrency in four days.