MADRID (Reuters) - Spain said on Friday a large number of companies, including telecommunications giant Telefonica , had been infected with malicious software known as "ransomware" which locks up computers and demands ransoms.