OTTAWA - Canada's spy service obtained a judge's permission to disrupt cyberthreats from foreign adversaries who infected digital devices with malware.