Faced with a legal battle that could decide the future of its business, the company offered a surprising admission: macOS has a malware problem.