Hackers working for Western intelligence agencies broke into Russian internet search company Yandex late last year and deployed a rare type of malware in an attempt to spy on user accounts, four people with knowledge of the matter said.

The malware, called Regin, is known to be used by the "Five Eyes" intelligence-sharing alliance of the United States, Britain, Australia, New Zealand and Canada, the sources said. Intelligence agencies in those countries declined to comment.

Western cyberattacks against Russia are seldom acknowledged or spoken about in public. It could not be determined which of the five countries was behind the attack on Yandex, said sources in Russia and elsewhere, three of whom had direct knowledge of the hack. The breach took place between last October and November.