📘
CAS Cybersecurity
  • Start
  • Reconnaissance
    • Opensource Intelligence
  • Docker basics and Images
    • Damn Vulnerable Webapp
    • bWAPP
    • Juice Webshop
    • Webgoat
    • Metasploitable 2
    • Metasploitable 3
    • MISP Docker (old)
    • MISP Docker (new)
  • Scanning and Enumeration
    • Scanning with zenmap
    • Scanning with nmap
    • Scanning with msf auxiliary
  • Vulnerability Scanning and Analysis
    • OpenVAS
    • nmap vulnerability scan
    • MSF Auxiliary Modules
  • Exploitation
    • Metasploitable 2
    • Redis Server
    • Print Nightmare
    • Baron Samedit
    • Polkit
    • Heartbleed
  • Man in the Middle
    • ARP Cache poisoning
    • RDP MitM Exercise
  • Windows Hacking
    • Throwback Network
      • Entering the breach
      • Exploring the caverns
      • Webshells and you!
      • First Contact
    • WinAttack LAB
      • Module 01
      • Module 02
      • Module 03
      • Module 04
      • Module 05
      • Module 06
      • Module 07
      • Module 08
      • Module 09
      • Module 10
  • Web Application Security
    • Burp Proxy Introduction
    • DVWA
      • DVWA Exercises 1
      • DVWA Exercises 2
      • DVWA Exercises 3
      • DVWA Exercises 4
      • DVWA Exercises 5
      • DVWA Exercises 6
      • DVWA Exercises 7
      • DVWA Exercises 8
  • CTF and Crypto Exercises
    • Cyberchef Challenge
    • HTB Invite Challenge
    • BSides London 2019 Challenge
    • Ninja Sec Challenge
  • Threat Intelligence
    • MISP Exercise 1
    • MISP Exercise 2
    • MISP Exercise 3
    • MISP Exercise 4
    • MISP Exercise 5
    • MISP Exercise 6
    • MISP Exercise 7
    • MISP Exercise 8
    • Virus Total Graph Exercise
    • RFI Incoming!
  • Forensic Exercises
    • Disk Forensics
      • The Sleuth Kit Intro
      • Filecarving with Foremost
      • Filecarving with scalpel
      • Bulk extractor
      • Disk acquisition with dd
      • Disk acquisition with dcfldd
      • Disk acquisition with ewftools
      • Disk acquisition with FTK Imager
      • Mount disk image (raw)
      • Unknown USB Stick
      • USB Stick Filecarving
      • Autopsy Exercise
    • Windows Forensics
      • Bitunlocker
      • Alternate Datastreams
    • Memory Forensics
      • Volatility2 Basics (Linux)
      • Volatility2 Exercise 1
      • Volatility3 Exercise 1
      • Volatility3 Exercise 2
      • Volatility3 Exercise 3
    • Image Forensics
      • Unswirl Image
      • Manual Filecarving 1
      • Manual Filecarving 2
    • Browser Forensics
    • Mail Header Analysis
    • Timestomping Exercise
    • Network Forensics
      • Tshark Exercise
  • Malware Analysis
    • Ransomware
      • General Introduction
      • Ryuk
      • RansomEXX
      • REvil
      • BlackMatter
      • Hades
      • Egregor
      • DoppelPaymer
    • YARA
      • YARA Install
      • yarGen
      • YARA with Cyberchef
      • TCP dump analysis
      • Memory dump analysis
    • Dosfuscated Scripts
  • Android Malware
    • LAB Setup 1
    • LAB Setup 2
    • Android Manifest
    • Android Permissions
    • APP Tracing with Frida
    • AES Key decryption
    • RedAlert
    • BlackRoseLucy
    • Crackme RE Challenge
  • Forensic Readiness
    • Windows Event Logs
    • Windows Sysmon
    • Sysmon: Capture Clipboard
    • Sysmon: Process Injection
    • Ransomware Detection
      • Signature based
  • Live Response
    • Velociraptor P1
    • Velociraptor P2
    • Velociraptor P3
    • Windows Response LAB
      • Lateral Movement Detection
      • Detect persistence
      • Volatility Analysis
Powered by GitBook
On this page
  • 1. Introduction
  • 2. What is BlackMatter?
  • 3. Typical Attack Vectors
  • 4. Attacker TTPs
  • 5. Ransomware execution
  • 6. Encryption method
  • 7. Security Questions
  • 8. Answers

Was this helpful?

  1. Malware Analysis
  2. Ransomware

BlackMatter

PreviousREvilNextHades

Last updated 3 years ago

Was this helpful?

1. Introduction

This module provides an overview of BlackMatter ransomware, including demonstrating the malware being executed on a Windows OS.

2. What is BlackMatter?

BlackMatter is a RaaS (Ransomware as a Service) provider that came to light in July 2021. It encrypts the victim's files and replaces file extensions with random strings of numbers and letters. BlackMatter is available as a RaaS on the dark web, allowing other attackers to use the ransomware and providing them with custom configurable binary payloads in order to customize their attacks for specific targets. The group behind the ransomware are financially motivated individuals who profit from the underground sale of the malware, which is used to extort money from organizations. BlackMatter affiliates often employ a double extortion tactic by also exfiltrating the data they have encrypted and threatening to leak it unless the ransom is paid.

When attacked, the victim is provided with a dashboard on which they can see evidence of stolen data and individual ransom notes alongside other data such as victims' names and identifiers.

The BlackMatter group claims to fill the gap between the DarkSide and REvil ransomware groups — and their actions and behaviors are even similar to those of previous attacks carried out by both groups. McAfee claims that the people behind these groups are either the same or of a very close relationship. Specific similarities to DarkSide and REvil are the runtime API and string decryption, including a custom Salsa20 matrix that was unique to DarkSide. Coincidently, REvil disappeared from the dark web and then the BlackMatter group was formed.

The group behind BlackMatter tends to target Windows-based and Linux systems. Although, Linux payloads do not always encrypt data and are in those cases used as RATs (remote access trojans) instead, to gain access to Windows-based machines. It appears that the threat group behind BlackMatter is only interested in organizations with revenues of $100M or more, especially those based in the US, UK, Canada, Australia, India, Brazil, Chile, and Thailand. However, they do not target hospitals, critical infrastructure, water treatment facilities, the defense industry, government sectors, nonprofits, and the oil and gas industry. If any of these organizations do fall victim to attacks, BlackMatter offers free decryptors. They even offer a $100 bounty if other threat groups aid in their point of access to victims' networks.

If a victim is under attack, the first thing they may notice is their desktop wallpaper being replaced with a message (as shown in the image above). Then, they will be directed to a README file that will instruct them to download a TOR browser and a TOR service where they can communicate with the attacker.

3. Typical Attack Vectors

BlackMatter relies on vulnerabilities within edge devices to gain initial access, such as those found in compromised Remote Desktop Protocol and VPN servers or appliances. This often comes down to encryption and how much the VPN leaks.

As well as compromised protocols, the BlackMatter group abuses corporate credentials which they can obtain from third-party leaks, phishing campaigns, and by purchasing them from the dark web. With this tactic, they are taking advantage of those accounts that do not use multifactor authentication.

Typically, BlackMatter affiliates are quite opportunistic in that they don't usually spend too much time investigating their target. Instead, they tend to seek out organizations that they feel may be vulnerable in accordance with how they (the attackers) wish to intrude the system.

4. Attacker TTPs

5. Ransomware execution

Connect to the windows06 machine via the RDP shortcut on the Desktop

Once you have connected to the windows06 machine desktop, you should see the BlackMatter.exe file is present. Execute this file and watch the ransomware propagate as the machine becomes infected and the files are encrypted. Observe the changes to the file extensions after the BlackMatter executable is ran, and read the ransom note that gets dropped onto the desktop.

6. Encryption method

Directories excluded during encryption:

windows, system volume information, intel, $windows.ws, application data, $recycle.bin, mozilla, program files (x86), program files, $windows.bt, public, msocache, default, all users, tor browser, programdata, boot, config.msi, google, perflogs, appdata, windows.old

Filenames excluded during encryption:

desktop.ini, autorun.inf, ntldr, bootsect.bak, thumbs.db, boot.ini, ntuser.dat, iconcache.db, bootfont.bin, ntuser.ini, ntuser.dat.log

File extensions excluded during encryption:

themepack, nls, diagpkg, msi, lnk, exe, cab, scr, bat, drv, rtp, msp, prf, msc, ico, key, ocx, diagcab, diagcfg, pdb, wpx, hlp, icns, rom, dll, msstyles, mod, ps1, ics, hta, bin, cmd, ani, 386, lock, cur, idx, sys, com, deskthemepack, shs, ldf, theme, mpa, nomedia, spl, cpl, adv, icl, msu

The above exclusions are stored as hashes of corresponding strings in the BlackMatter configuration. DarkSide has an almost identical exclusion list which gives us another reason to believe the two are linked!

7. Security Questions

  1. What type of OS does BlackMatter target?

  2. What does RaaS stand for?

  3. The BlackMatter group claims to fill the gab between what ransomware groups?

  4. What does BlackMatter use Discovery techniques to check?

  5. When BlackMatter is moving laterally across the network, what SMB shares are used to interact with the victim's machine? (Name one)

  6. What URL is provided in the ransom note in order to contact the attacker?

  7. As previously mentioned, BlackMatter encrypts the victim's files and replaces file extensions with random strings of numbers and letters. What is the string used in the attack on the windows06 machine?

  8. What encryption method does BlackMatter tend to use?

8. Answers

  1. Linux and Windows

  2. Ransomware as a Service

  3. REvil and Darkside

  4. Processes, Services, Hosts

  5. Admin$

  6. http://supp24yy6a66hwszu2piygicgwzdtbwftb76htfj7vnip3getgqnzxid.onion/7NT6LXKC1XQHW5039BLOV

  7. lZPEh4fEk

  8. Salsa20, 1024-bit RSA

On October 18, 2021, an was issued by the CISA, FBI, and NSA to warn that multiple US infrastructure entities had been targeted by BlackMatter, including food and agriculture sector organizations.

BlackMatter affiliates are known to employ various tactics, techniques, and procedures (TTPs) during exploitation. Below is an example of a fairly sophisticated BlackMatter attack kill chain that has been observed by the (CISA) when investigating the ransomware.

BlackMatter leverages , such as RDP, not only to gain access but also as a means to establish persistence on the target network. The group is often able to use these services by accessing valid credentials obtained via a third party.

The BlackMatter group has also been known to utilize techniques to harvest credentials from LSASS memory, often using Windows Process Monitor. When obtained, harvested credentials may then be used to move laterally across the network.

They also use a number of Discovery techniques to check what hosts, processes, or services are running. This is to further aid their lateral movement attempts. For example, they use native queries to discover hosts and the EnumServicesStatusExW API function to

In order to move laterally, the group uses , specifically, a Remote Procedure Call function, to enumerate all of the shares that were found through their Discovery techniques. They can then use SMB to interact with these shares, including ADMIN$, C$, SYSVOL, and NETLOGON, allowing them to move laterally throughout the network.

Then, BlackMatter affiliates will attempt to for extortion.

The victim's files are via SMB protocol with a ransomware note in each directory that demands payment. On some occasions, BlackMatter will also perform a on all backup systems.

BlackMatter uses a combination of and 1024-bit RSA keys for encryption. Salsa20 is a fast stream cipher that is used by BlackMatter to encrypt the files. RSA is in turn used for encrypting the keys used for Salsa20. BlackMatter does not encrypt all files. They specify certain file names and extensions that they want to be excluded from the encryption process. This allows them to make sure that the system is not broken and that Windows is still bootable. They also employ a partial encryption scheme, which means that the whole file is not encrypted, just part of it. This speeds up the attack time as only part of the file needs to be read and then overwritten.

alert
Cybersecurity and Infrastructure Security Agency
external-facing remote services
credential dumping
LDAP
enumerate services.
remote services
exfiltrate data
encrypted
disk wipe
Salsa20
Some variants of the malware have been known to change the victim's desktop wallpaper as shown here.