Sophos discovers new Python ransomware called Memento
Next-gen cybersecurity firm Sophos has discovered a new Python ransomware called Memento.
New research from the company, New Ransomware Actor Uses Password Protected Archives to Bypass Encryption Protection, describes the attack, which locks files in a password-protected archive if the Memento ransomware cant encrypt the targeted data.
Sophos researchers believe the Memento operators breached the targets network in mid-April 2021. The attackers exploited a flaw in VMware's vSphere, an internet facing cloud computing virtualisation tool, to gain a foothold on a server. The forensic evidence Sophos researchers found indicates the attackers started the main intrusion in early May 2021.
The attackers used the early months for lateral movement and reconnaissance, using the Remote Desktop Protocol (RDP), NMAP network scanner, Advanced Port Scanner, and Plink Secure Shell (SSH) tunnelling tool to set up an interactive connection with the breached server. The attackers also used mimikatz to harvest account credentials to use in later stages of the attack.
According to Sophos researchers, on 20 October 2021, the attackers used the legitimate tool WinRAR to compress a collection of files and exfiltrate them via RDP.
Release of the Ransomware
The attacker first deployed the ransomware on 23 October 2021. Sophos researchers found that the attackers initially tried to directly encrypt files, but security measures blocked this attempt. The attackers then changed tactics, re-tooled and re-deployed the ransomware. They copied unencrypted files into password-protected archives using a renamed free version of WinRaR, before encrypting the password and deleting the original files.
The attackers demanded a ransom of $1 million in bitcoin in order to restore the files. Fortunately, the target was able to recover data without the involvement of the attackers.
Open Entry Points Let in Additional Attackers
While the Memento attackers were in the targets network, two different attackers broke in via the same vulnerable access point, using similar exploits. These attackers each dropped cryptocurrency miners onto the same compromised server. One of them installed an XMR cryptominer on 18 May, while the other installed an XMRig cryptominer on Sept. 8 and again on Oct. 3.
"Human-led ransomware attacks in the real world are rarely clear cut and linear," says Sean Gallagher, senior threat researcher at Sophos.
"Attackers seize opportunities when they find them or make mistakes, and then change tactics on-the-fly. If they can make it into a targets network, they won't want to leave empty handed," he says.
"We've seen this repeatedly when internet-facing vulnerabilities become public and go unpatched, multiple attackers will quickly exploit them. The longer vulnerabilities go unmitigated, the more attackers they attract."
Gallagher says cybercriminals are continuously scanning the internet for vulnerable online entry points, and they don't wait in line when they find one.
"Being breached by multiple attackers compounds disruption and recovery time for victims," he says.
"The Memento attack is a good example of this, and it serves as a critical reminder to use defense-in-depth security. Being able to detect ransomware and attempted encryption is vital, but its also important to have security technologies that can alert IT managers to other, unexpected, activity such as lateral movement."
Sophos believes this incident, where multiple attackers exploited a single unpatched server exposed to the internet, highlights the importance of quickly applying patches and checking with third-party integrators, contract developers or service providers about their software security.
Sophos recommends the following general best practices to help defend against ransomware and related cyberattacks:
At a Strategic Level
Deploy layered protection. As more ransomware attacks begin to involve extortion, backups remain necessary, but insufficient. It is more important than ever to keep adversaries out in the first place, or to detect them quickly, before they cause harm. Use layered protection to block and detect attackers at as many points as possible across an estate.
At a Day-to-Day Tactical Level
Monitor and respond to alerts. Ensure the appropriate tools, processes, and resources (people) are available to monitor, investigate and respond to threats seen in the environment. Ransomware attackers often time their strike during off-peak hours, at weekends or during the holidays, on the assumption that few or no staff are watching.
Lock down accessible services.
Perform network scans from the outside and identify and lock down the ports commonly used by VNC, RDP, or other remote access tools. If a machine needs to be reachable using a remote management tool, put that tool behind a VPN or zero-trust network access solution that uses MFA as part of its login.
Practice segmentation and zero-trust.
Separate critical servers from each other and from workstations by putting them into separate VLANs as you work towards a zero-trust network model.