Security Market Segment LS
Saturday, 01 August 2020 08:41

WastedLocker is customised crypto-ransomware, says Kaspersky researcher Featured

By
WastedLocker is customised crypto-ransomware, says Kaspersky researcher Image by Gerd Altmann from Pixabay

There has been a marked increase in use of the crypto-ransomware WastedLocker in the first six months of 2020, the Russian security firm Kaspersky claims, with the most recent use being against wearable technology specialist Garmin.

The company said each criminal gang that used WastedLocker appeared to be rebuilding the source to suit its own ends and thus a targeted build was used against Garmin.

In a detailed technical analysis of the relatively new malware, Kaspersky researcher Fedor Sinitsyn said WastedLocker had a command line interface that allowed it to accept different arguments that controlled the way it operated.

One was a "p" switch that indicated priority and was used to direct the malware to encrypt a specified directory first and then add its name to an exclusion list to prevent it being processed a second time.

After that, all remaining directories on attached drives would be encrypted.

The malware also had an "f" switch that could be used to specify encryption of a single directory.

A third argument, specified by the use of "u" told the package to encrypt files on a specified network using the authentication afforded by the credentials provided.

wastedlocker ransom note

A screenshot of the ransom note generated by WastedLocker. Courtesy Kaspersky

The use of the "r" switch would launch the following sequence of actions:

  • Delete ;
  • Copy to %WINDIR%\system32\<rand>.exe using a random substring from the list of subkeys of the registry key SYSTEM\CurrentControlSet\Control\;
  • Create a service with a name chosen similarly to the method described above. If a service with this name already exists, append the prefix “Ms” (e.g. if the service “Power” already exists, the malware will create a new one with the name “MsPower”). The command line for the new service will be set to “%WINDIR%\system32\<rand>.exe -s”;
  • Start this service and wait until it finishes working;
  • Delete the service.
  • FInally, the "s" switch would start a created service which would result in all files that were locatable being encrypted.

Sinitsyn said one more interesting feature of WastedLocker was the manner in which it bypassed the user account control feature in Windows; this allows someone who has ordinary user privileges to run code that requires admin privileges by clicking agree on a pop-up that the system generates when such an operation was attempted.

The malware noted the privileges it had when it was started and silently tried to elevate its privileges using a known bypass technique:

  • Create a new directory in %appdata%; the directory name is chosen at random from the substrings found in the list of subkeys of the registry key SYSTEM\CurrentControlSet\Control\;
  • Copy a random EXE or DLL file from the system directory to this new directory;
  • Write the trojan’s own body into the alternate NTFS stream “:bin” of this system file;
  • Create a new temporary directory and set its mount point to “C:\Windows ” (with a trailing whitespace) using the API function NtFsControlFile with the flag IO_REPARSE_TAG_MOUNT_POINT;
  • Create a new subdirectory named “system32” inside the temporary directory. As a result of the previous step, this new subdirectory can be equally successfully addressed as “%temp%\<directory_name>\system32” or “C:\Windows \system32” (note the whitespace);
  • Copy the legitimate winsat.exe and winmm.dll into this subdirectory;
  • Patch winmm.dll: replace the entry point code with a short fragment of malicious code whose only purpose is to launch the content of the alternate NTFS stream created on step 2; and
  • Launch winsat.exe, which will trigger the loading of the patched winmm.dll as a result of DLL hijacking.

Sinitsyn also found that the encryption scheme used by the malware was a combination of the AES and RSA algorithms. "The search mask to choose which files will be encrypted, as well as the list of the ignored paths are set in the configuration of the malware," he noted.

He said tor each processed file, WastedLocker generated a unique 256-bit key and a 128-bit IV which would be used to encrypt the file content using the AES-256 algorithm in CBC mode.

"The implementation of file operations is worthy of note, as it employs file mapping for data access. It must have been an attempt by the criminals to maximise the trojan’s performance and/or avoid detection by security solutions," he theorised. "Each encrypted file will get a new additional extension: .garminwasted."

Sinitsyn discovered that the trojan implemented a way of integrity control as part of its file encryption routine, calculating an MD5 hash of the original content of each processed file, and using this hash to ensure the correctness of the procedure.

Additionally, WastedLocker used a publicly available reference implementation of an RSA algorithm named “rsaref”.


Subscribe to Newsletter here

NEW OFFER - ITWIRE LAUNCHES PROMOTIONAL NEWS & CONTENT

Recently iTWire remodelled and relaunched how we approach "Sponsored Content" and this is now referred to as "Promotional News and Content”.

This repositioning of our promotional stories has come about due to customer focus groups and their feedback from PR firms, bloggers and advertising firms.

Your Promotional story will be prominently displayed on the Home Page.

We will also provide you with a second post that will be displayed on every page on the right hand side for at least 6 weeks and also it will appear for 4 weeks in the newsletter every day that goes to 75,000 readers twice daily.

POST YOUR NEWS ON ITWIRE NOW!

PROMOTE YOUR WEBINAR ON ITWIRE

It's all about Webinars.

These days our customers Advertising & Marketing campaigns are mainly focussed on Webinars.

If you wish to promote a Webinar we recommend at least a 2 week campaign prior to your event.

The iTWire campaign will include extensive adverts on our News Site itwire.com and prominent Newsletter promotion https://www.itwire.com/itwire-update.html and Promotional News & Editorial.

For covid-19 assistance we have extended terms, a Webinar Business Booster Pack and other supportive programs.

We look forward to discussing your campaign goals with you. Please click the button below.

MORE INFO HERE!

BACK TO HOME PAGE
Sam Varghese

website statistics

Sam Varghese has been writing for iTWire since 2006, a year after the site came into existence. For nearly a decade thereafter, he wrote mostly about free and open source software, based on his own use of this genre of software. Since May 2016, he has been writing across many areas of technology. He has been a journalist for nearly 40 years in India (Indian Express and Deccan Herald), the UAE (Khaleej Times) and Australia (Daily Commercial News (now defunct) and The Age). His personal blog is titled Irregular Expression.

BACK TO HOME PAGE

ZOOM WEBINARS & ONLINE EVENTS

GUEST ARTICLES

VENDOR NEWS

Guest Opinion

Guest Interviews

Guest Research & Case Studies

Channel News

Comments