Kaspersky has identifiedmalware that takes a novel approach to intercepting both Chrome and Firefox browsers' encrypted traffic. They have identified targets of the malware to be in Russia and Belarus.
First identified in April of this year, the new modules are named "Reductor" after a .pdb path Kaspersky found in some samples. Besides the typical RAT functions such as uploading, downloading and executing files, Reductor's authors impressed the Kaspersky researchers by putting a lot of effort into the manipulation of digital certificates and marking outbound TLS traffic with unique host-related identifiers.
Kaspersky tentatively linked it to the Turla APT, based on the victimology. Victimology alone is an unreliable attributor in most cases, however. Turla is the name of a Russian cyber espionage APT group (which has also been known as Waterbug, Venomous Bear and KRYPTON) that has been active since at least 2007 targeting government organizations and private businesses. The list of victims is long and is said to include the Swiss defense firm RUAG, US Department of State, and the US Central Command.
There are strong code similarities between this family and the COMPfun Trojan. In fact, Kaspersky says that, "Based on these similarities, we're quite sure the new malware was developed by the COMPfun authors."
The researchers say that Reductor spreads by either (1) infecting popular software distributions (Internet Downloader Manager, WinRAR, etc. and, for at least one case identified by the reasearchers, through a popular "warez" website over HTTP); or (2) its decryptor/dropper is spread through the use of COMpfun's ability to download files on hosts that have already been infected.
Marking the browser's TLS handshake without touching the traffic itself got the researchers' attention. It seems the malware developers analyzed the Firefox source code and Chrome binary code to patch the corresponding pseudo random number generation (PRNG) functions in the process's memory.
The researchers explain the method used by the malware in this way: "Browsers use PRNG to generate the 'client random' sequence for the network packet at the very beginning of the TLS handshake. Reductor adds encrypted unique hardware- and software-based identifiers for the victims to this 'client random' field. In order to patch the system's PRNG functions, the developers used a small embedded Intel instruction length disassembler."
Reductor adds its own "victim id" inside TLS packets. The first four-byte hash (cert_hash) is built using all of Reductor's digital certificates.
Kaspersky found that Reductor samples hold DER-encoded root X509v3 certificates in the .data section to add on the target hosts. The malware is also able to get additional certificates from the operators through a named pipe.
Rather interestingly, Reductor does not run a MitM attack itself. Yet the certificates that it installs would be a vital part of any such attack if such an attack were carried out.
Another idiosyncrasy of Reductor is that the malware's installation seems to be done "on the fly." The source installers that were seen by the researchers were not compromised themselves, but compromised browsers were delivered by them.
The entire methodology of the attack shows sophistication in execution, a sure indicator of a nation-state threat actor.
— Larry Loeb has written for many of the last century's major "dead tree" computer magazines, having been, among other things, a consulting editor for BYTE magazine and senior editor for the launch of WebWeek.