A Norwegian aluminium producer is recovering after hackers took thousands of computers offline and demanded a ransom.