Ionut Arghire wrote an interesting post about Researchers Build Configuration Extractor for Locky Ransomware that I would like to share.
“Researchers from Cisco Talos have created a new tool that allows users to extract the configuration of the Locky ransomware.
Dubbed LockyDump, the open source utility comes with support for all known Locky variants (those using the .locky, .zepto and .odin extensions). With the help of the tool, researchers can run Locky samples in virtualized environments and dump the configuration parameters for it, including the AffilID associated with the sample.
According to the security researchers, the data that can be extracted with this tool includes the Affiliate ID in the Locky binary; the seed value that relies on a Domain Generation Algorithm (DGA) for command and control (C&C) communication; and the flags used to save on the infected machine, achieve persistence, or terminate the process on systems using the Russian language pack.
Moreover, LockyDump can be used to extract the URI path used to send requests to the C&C server; the hardcoded IPs of C&C used to retrieve DGA information; the RSA key used for encryption, along with its size and prime number; the ransom note displayed after encryption; and the ransom payment gateway address (which are located on the Tor network).
“Obtaining the affiliate information for individual samples allows the historical tracking of Locky affiliates to identify trends and other characteristics on an individual affiliate basis such as their primary distribution method of choice e.g. through the use of Exploit Kits (EKs) or spam/phishing email,” Talos security researchers explain.
Because Locky has been distributed as both Win32 executables and DLLs, LockyDump has been designed to use two separate analysis methods. Built as a PE32 Windows binary application that requires the execution of the malware for a successful extraction process, the tool is limited to Windows systems and only to those that can be compromised by Locky, Talos explains.
The tool can be set to extract the Verbose Output and Locky Unpacking from the Locky sample, and these options can be configured using Windows environment variables prior to the execution of LockyDump. The first option will print the ransom note image and ransom note HTML to stdout, while the second saves the unpacked Locky file as DUMPED_IMAGE.DLLin the current working directory.
Cisco Talos researchers highly recommend the use of a virtualized environment when running both Locky and LockyDump for the extraction of the configuration information from memory. The extractor, which is available via GitHub, is executed via command line, and the optional features can be set using command line as well.
“The release of this tool coincides with a large downturn in spam-based Locky distribution that we have observed over the last week. With this in mind be aware that the ever evolving Locky could come back sooner or later with a different method of configuration inclusion which would potentially prevent this tool from working. In that instance we will aim to release an updated version that can continue to operate correctly and as intended,” Talos concludes.”