Microsoft has taken legal action to combat the spread of malware that the company says can be traced to bad actors in Kuwait and Algeria.