A massive bitcoin mining virus wouldn't help. Let's say there are 2 billion PCs in the world, as this random site estimates[1]. Let's say each of them has a high-end graphics card.. say, a GTX 1060 that can do 20 MH/s. Let's say your virus can break into every single computer in the world, and run all those graphics cards at 100% without being noticed.
Now your mining power is: 20 MH/s * 2 billion = 40000 TH/s, or 0.1% of Bitcoin's hash power.
Hence my specification for industrial scale. More likely: a corrupt data centre system admin or government official. In any case, if you’re taking on the Bitcoin network, doing it with fairly-obtained resources would be silly.
A corrupt data center official has much easier options to attack bitcoin at the network level. For example, a rogue sysadmin at a major Tier 1 ISP could use BGP hijacking to mount a partitioning attack against the network.
See the paper “Hijacking Bitcoin: Routing Attacks on Cryptocurrencies” [0] for more details on this.
It seems very implausible. Anyone with that level of sophistication may as well look for exploits in bitcoin exchanges and steal the bitcoins directly.
Now your mining power is: 20 MH/s * 2 billion = 40000 TH/s, or 0.1% of Bitcoin's hash power.
[1] https://www.quora.com/How-many-PC-exist-in-the-world