The US Justice Department has announced the completion of a court-authorised operation, code-named Medusa, to disrupt a global peer-to-peer network of computers compromised by sophisticated malware, called “Snake”.

The US Government attributes the malware to a unit within Centre 16 of the Federal Security Service of the Russian Federation (FSB).

For nearly 20 years, this unit, referred to in court documents as “Turla”, is believed to have used versions of the Snake malware to steal sensitive documents from hundreds of computer systems in at least 50 countries within the North Atlantic Treaty Organization (NATO) member governments, journalists, and other targets of interest to the Russian Federation.

After stealing these documents, Turla has apparently exfiltrated them through a covert network of unwitting Snake-compromised computers in the US and around the world.

Operation Medusa disabled Turla’s Snake malware on compromised computers through the use of an FBI-created tool named Perseus, which issued commands that caused the Snake malware to overwrite its own vital components.

Within the US, the operation was executed by the FBI pursuant to a search warrant issued by US Magistrate Judge Cheryl Pollak for the Eastern District of New York, which authorised remote access to the compromised computers. The courts has since unsealed redacted versions of the affidavit submitted in support of the application for the search warrant, and of the search warrant issued by the court.

For victims outside the US, the FBI is engaging with local authorities to provide both notice of Snake infections within those authorities’ countries and remediation guidance.

“The Justice Department, together with our international partners, has dismantled a global network of malware-infected computers that the Russian government has used for nearly two decades to conduct cyber-espionage, including against our NATO allies,” says attorney general Merrick Garland. “We will continue to strengthen our collective defenses against the Russian regime’s destabilising efforts to undermine the security of the United States and our allies.”

Deputy attorney general Lisa Monaco comments: “Through a high-tech operation that turned Russian malware against itself, US law enforcement has neutralized one of Russia’s most sophisticated cyber-espionage tools, used for two decades to advance Russia’s authoritarian objectives.

“By combining this action with the release of the information victims need to protect themselves, the Justice Department continues to put victims at the center of our cybercrime work and take the fight to malicious cyber actors.”

Matthew Olsen, assistant attorney general of the Justice Department’s National Security Division, adds: “For 20 years, the FSB has relied on the Snake malware to conduct cyberespionage against the US and our allies – that ends today.

“The Justice Department will use every weapon in our arsenal to combat Russia’s malicious cyber activity, including neutralising malware through high-tech operations, making innovative use of legal authorities, and working with international allies and private sector partners to amplify our collective impact.”

Details of Snake, Medusa and Perseus

As detailed in court documents, the US government has been investigating Snake and Snake-related malware tools for nearly 20 years, and has monitored FSB officers assigned to Turla conducting daily operations using Snake from a known FSB facility in Ryazan, Russia.

Although Snake has been the subject to several cybersecurity industry reports throughout its existence, Turla has applied numerous upgrades and revisions, and selectively deployed it, to ensure that Snake remains Turla’s most sophisticated long-term cyberespionage malware implant.

Unless disrupted, the Snake implant persists on a compromised computer’s system indefinitely, typically undetected by the machine’s owner or authorized users. The FBI has observed Snake persist on particular computers despite a victim’s efforts to remediate the compromise.

Snake provides its Turla operators the ability to remotely deploy selected malware tools to extend Snake’s functionality to identify and steal sensitive information and documents stored on a particular machine. Most importantly, the worldwide collection of Snake-compromised computers acts as a covert peer-to-peer network, which utilises customised communication protocols designed to hamper detection, monitoring, and collection efforts by intelligence services.

Turla uses the Snake network to route data exfiltrated from target systems through numerous relay nodes scattered around the world back to Turla operators in Russia. For example, the FBI, its partners in the US Intelligence Community, together with allied foreign governments, have monitored the FSB’s use of the Snake network to exfiltrate data from sensitive computer systems, including those operated by NATO member governments, by routing the transmission of these stolen data through unwitting Snake-compromised computers.

As described in court documents, through analysis of the Snake malware and the Snake network, the FBI developed the capability to decrypt and decode Snake communications. With information gleaned from monitoring the Snake network and analysing Snake malware, the FBI developed a tool named Perseus which establishes communication sessions with the Snake malware implant on a particular computer, and issues commands that causes the Snake implant to disable itself without affecting the host computer or legitimate applications on the computer.

To empower network defenders worldwide, the FBI, the National Security Agency, the Cybersecurity and Infrastructure Security Agency, the US Cyber Command Cyber National Mission Force, and six other intelligence and cybersecurity agencies from each of the Five Eyes member nations issued a joint cybersecurity advisory (the Joint Advisory) with detailed technical information about the Snake malware that will allow cybersecurity professionals to detect and remediate Snake malware infections on their networks.

The FBI and US Department of State are also providing additional information to local authorities in countries where computers that have been targeted by the Snake malware have been located.

Although Operation Medusa disabled the Snake malware on compromised computers, victims should take additional steps to protect themselves from further harm. The operation to disable Snake did not patch any vulnerabilities or search for or remove any additional malware or hacking tools that hacking groups may have placed on victim.

The Department of Justice strongly encourages network defenders to review the Joint Advisory for further guidance on detection and patching.

Moreover, as noted in court documents, Turla frequently deploys a “keylogger” with Snake that Turla can use to steal account authentication credentials, such as usernames and passwords, from legitimate users. Victims should be aware that Turla could use these stolen credentials to fraudulently re-access compromised computers and other accounts.