A group of the world's most visited websites was compromised in an effort to steal cryptocurrency and infect iPhones.