PYSA Ransomware: In-Depth Analysis, Detection, and Mitigation
Summary of PYSA Ransomware
PYSA (aka Pysa Partners, Mespinoza) emerged in early 2020. PYSA stands for “Protect Your Systems Amigo”. Since debuting, PYSA has targeted numerous entities across the globe.
PYSA is a double-extortion ransomware threat, in that they maintain a blog where they leak sensitive data from non-compliant victims. Data from victim hosts is exfiltrated prior to the encryption of devices. PYSA is known for their meticulousness when it comes to selecting their targets and conducting thorough research and reconnaissance during the attack process.
What Does PYSA Ransomware Target?
PYSA ransomware primarily targets healthcare, government and financial institutions. Heavy targeting of educational institutions has also been observed.
How Does PYSA Ransomware Spread?
PYSA can be delivered via Cobalt Strike or similar frameworks, as well as through phishing.
PYSA operators have also targeted exposed RDP servers to achieve initial access. Commodity tools such as Advanced Port Scanner and Advanced IP Scanner are used for internal reconnaissance and traversal.
PYSA Ransomware Technical Details
Initial access is typically gained via RDP exploits and brute force attacks, but delivery via phishing email has been observed.
The actors behind many PYSA campaigns have utilized WinSCP for the exfiltration of valuable data. In addition, Advanced Port Scanner and Advanced IP Scanner have been used by the group to carry out reconnaissance tasks. Tools like Mimikatz, Koadic, PowerShell and Chisel are frequently also observed in PYSA campaigns. If Windows Defender is present, PYSA will attempt to disable it via the Local Group Policy Editor.
Upon infection victims are instructed to contact the attackers via email for instructions on payment and decryption. PYSA operators also utilized an array of custom tools during their intrusions. This includes a custom interface for locating valuable data for exfiltration.
PYSA ransomware generates a unique KEY and IV value for each file. It does this by using AutoSeededRandomPool to generate a random key, which is then used to encrypt the file using the AES CBC Mode algorithm. It encrypts files in blocks of 100 bytes, reading each block, encrypting it, flushing it into the file, and then starting back at the corresponding position for the next block. After the file is encrypted, the ransomware uses an RSA public key to encrypt both the KEY and IV values, which is then stored at the beginning of the file in an encoded format.
Attackers behind PYSA have been observed exfiltrating data to the MEGA.NZ service.
How to Detect PYSA Ransomware
- The SentinelOne Singularity XDR Platform can identify and stop any malicious activities and items related to PYSA Ransomware.
In case you do not have SentinelOne deployed, detecting ransomware requires a combination of technical and operational measures designed to identify and flag suspicious activity on the network. This allows the organization to take appropriate action, and to prevent or mitigate the impact of the ransomware attack.
To mitigate the risk of this Ransomware without SentinelOne deployed, it is important to take a multi-layered approach, which includes the following steps:
- Use anti-malware software or other security tools capable of detecting and blocking known ransomware variants. These tools may use signatures, heuristics, or machine learning algorithms, to identify and block suspicious files or activities.
- Monitor network traffic and look for indicators of compromise, such as unusual network traffic patterns or communication with known command-and-control servers.
- Conduct regular security audits and assessments to identify network and system vulnerabilities and ensure that all security controls are in place and functioning properly.
- Educate and train employees on cybersecurity best practices, including identifying and reporting suspicious emails or other threats.
- Implement a robust backup and recovery plan to ensure that the organization has a copy of its data and can restore it in case of an attack.
How to Mitigate PYSA Ransomware
- The SentinelOne Singularity XDR Platform can return systems to their original state (which is free from re-infection) using either the Repair or Rollback feature.
In case you do not have SentinelOne deployed, there are several steps that organizations can take to mitigate the risk of ransomware attacks:
- Educate employees: Employees should be educated on the risks of ransomware, and on how to identify and avoid phishing emails, malicious attachments, and other threats. They should be encouraged to report suspicious emails or attachments, and to avoid opening them, or clicking on links or buttons in them.
- Implement strong passwords: Organizations should implement strong, unique passwords for all user accounts, and should regularly update and rotate these passwords. Passwords should be at least 8 characters long, and should include a combination of uppercase and lowercase letters, numbers, and special characters.
- Enable multi-factor authentication: Organizations should enable multi-factor authentication (MFA) for all user accounts, to provide an additional layer of security. This can be done through the use of mobile apps, such as Google Authenticator or Microsoft Authenticator, or through the use of physical tokens or smart cards.
- Update and patch systems: Organizations should regularly update and patch their systems, to fix any known vulnerabilities, and to prevent attackers from exploiting them. This includes updating the operating system, applications, and firmware on all devices, as well as disabling any unnecessary or unused services or protocols.
Implement backup and disaster recovery: Organizations should implement regular backup and disaster recovery (BDR) processes, to ensure that they can recover from ransomware attacks, or other disasters. This includes creating regular backups of all data and systems, and storing these backups in a secure, offsite location. The backups should be tested regularly, to ensure that they are working, and that they can be restored quickly and easily.