Skip to Main Content

Article

PYSA: 2020 to Now

Share

8/26/2021

PYSA
By Arete Cyber Threat Intelligence Team 

PYSA is the newest variant of the Mespinoza Ransomware as a Service (RaaS) family, which was first observed infecting victims in the wild in December 2019. PYSA is likely a reference to the open-source web application auditing tool PYSA (Protect Your System Amigo) released by security engineers at Facebook.

Like Ryuk, PYSA is dubbed a “big game hunter” for their tendency to target large corporations. Based on their advanced encryption methods, double extortion tactics, and desire to distinguish themselves, this up-and-coming ransomware group is “one to watch.”

Since Q3 2020, Arete has responded to 26 total PYSA cases. With an average ransom payment of $346,603, PYSA ranks third highest in average ransom payouts tracked by Arete through July 2021. Additionally, Arete has observed a steady increase in cases sine Q3 2020 (see Figure 1).

Figure 1: PYSA cases over a one-year period.

Figure 2: Arete PYSA cases average ransom payment.

Targeting Big Game 

PYSA targets large companies or organizations susceptible to extortion, where business downtime would pose a significant impact to operations. By extorting companies with the threat of publishing sensitive data, PYSA increases the chances of ransom payments. The top three sectors targeted by PYSA include K-12 school systems (36%), professional services (20%), and healthcare providers (12%). See Figure 3 for all targeted sectors.

Figure 3: Arete PYSA cases, all targeted sectors.

Sophisticated Criminals 

PYSA exhibits discipline by first surveying compromised systems to determine a victim’s potential “extortion value.” Open-source reporting indicates that PYSA searches not only for common keywords (e.g., PII, balance, routing), but also for keywords (e.g., illegal, fraud, criminal) that could be evidence of illegal activities by the victim.

Arete also identified some other key PYSA activity — specifically, that PYSA occasionally publishes data on leak sites after payment, provides decryptors that partially corrupt data, and stops communication for multiple days during negotiations.

 

Figure 4: Average time of business interruption.

Infection vector and persistence: Human-operated ransomware

Arete identified the following PYSA tactics, techniques, and procedures (TTPs) as being consistent with manually operated ransomware during the initial access phase:

    • Uses brute force remote desktop protocol (RDP) attacks against central management consoles, domain controllers, and Active Directory accounts.
    • Exfiltrates password databases prior to exploitation.
    • Leverages Mimikatz in victim environments, likely to gain access to credentials.

Additionally, Arete observed the following persistence toolset as part of PYSA campaigns:

    • Gasket. A backdoor written in the Go programming language, Gasket is designed as a backup to RDP to maintain access to the network. Gasket has many capabilities (e.g., “MagicSocks”) that allow PYSA to tunnel traffic to an externally controlled server.

      Figure 5: Gasket functionality.

       

    • MagicSocks. Leverages code from the Chisel project to tunnel traffic from the local system to an external, actor-controlled server. Next, uses Chisel code to tunnel traffic out of the local system to a landing page (“creatordampfe[.]xyz”) before routing the traffic to an unknown actor-controlled server.

Advanced encryption techniques

According to open-source data, PYSA uses Crypto++ to encrypt victim files with both RSA-4096 and AES-256-CFB. The group appends the encrypted files with the “.pysa” extension and leverages an allowlist and denylist to determine which files to encrypt.

    • The denylist contains all files to be encrypted.
    • The allowlist includes vital directories, such as Windows and Boot, which, if encrypted, would make recovery via the decryptor impossible. After, PYSA drops the ransom note (Figure 6) in every directory listed in the denylist.

      Figure 6: PYSA ransom note.

       

PYSA threat likely to remain steady 

PYSA utilized the rapid shift of corporations to remote work during COVID-19 for opportunistic targeting against RDP and remote admin infrastructure. Arete asserts that the threat posed by PYSA campaigns will likely remain steady, with PYSA targeting larger corporations across sectors to demand higher ransom payments. PYSA’s discipline, target selection, and advanced encryption techniques make them a credible threat on the ransomware scene.

How Arete can help you “Protect Your Systems Amigo”

Arete has a complete suite of managed security services, including managed detection and response (MDR), SentinelOne Endpoint Detection and Response (EDR) software deployment, and Arsinal threat hunting services for defending against ransomware attacks.

The following rulesets would detect PYSA activity on a client endpoint:

    • PowerShell used to disable Windows Defender Protection.
    • Lsass dump.
    • Firewall Exception for Remote Desktop.
    • MS Windows Defender stopped.
    • Security Tool Services stopped.
    • Volume Shadow Copy deletion.
    • Process Masquerading in Registry – Svchost.
    • Advanced Port Scanner Tool download.
    • Advanced Port Scanner Process Masquerading.
    • Advanced Port Scanner Process.
    • Advanced Port Scanner File detected.
    • Mimikatz Process Execution.
    • Advanced IP Scanner Network Mapping Tool download.
    • Advanced IP Scanner Network Mapping Tool Process.
    • Advanced IP Scanner Network Mapping File detected.
    • Advanced IP Scanner Process Masquerading.

Indicators

Ransom Note Emails

Resources

https://www.bleepingcomputer.com/news/security/list-of-ransomware-that-leaks-victims-stolen-files-if-not-paid/

https://cisomag.eccouncil.org/34-ransomware-operators-flood-dark-web-with-stolen-data-of-2155-victim-organizations/

https://www.zdnet.com/article/this-ransomware-gang-hunts-for-evidence-of-crime-to-pressure-victims-into-paying-a-ransom/

https://unit42.paloaltonetworks.com/gasket-and-magicsocks-tools-install-mespinoza-ransomware/

https://malpedia.caad.fkie.fraunhofer.de/details/win.gasket

https://blog.emsisoft.com/en/38840/ransomware-profile-mespinoza-pysa/

https://www.databreaches.net/k-12-school-districts-fall-prey-to-pysa-ransomware/

https://www.acronis.com/en-us/articles/pysa-ransomware/

https://www.cert.ssi.gouv.fr/uploads/CERTFR-2020-CTI-003.pdf

https://www.documentcloud.org/documents/20514564-pysa-ransomware-bc

https://blog.malwarebytes.com/awareness/2021/03/fbi-warns-of-increase-in-pysa-ransomware-attacks-targeting-education/