CISA Issues Recovery Script for ESXiArgs Ransomware


The Cybersecurity and Infrastructure Security Agency (CISA), USA, has put out a script to retrieve VMware ESXi servers that were encrypted in the recent widespread ESXiArgs ransomware attacks.

ESXiArgs-Recover can help regain access to virtual machines (VM) and several files. Since the effectiveness of the recovery script cannot be confirmed on all systems, the tool can help reconstruct virtual machine metadata from virtual disks that were not impacted by the ransomware ESXiArgs.

A widespread ESXiArgs ransomware attack that started last Friday has been aimed at exposed VMware ESXi servers, with 2,800 servers being encrypted since. Agenzia per la Cybersicurezza Nazionale (ACN), Italy’s national cybersecurity agency, issued a global warning about a massive ransomware attack on Sunday.

CISA’s Recovery Script ESXiArgs-Recover

Cybersecurity & Infrastructure Security Agency (CISA) made the ESXiArgs-Recover recovery script available on February 7. Inputs from third-party researchers and tutorials by Enes Sonmez were added to it. The ransomware recovery script can be applied as follows:

  1. Downloading and saving the recovery script as /tmp/recover.sh
  2. Allow the permission to execute the script: chmod +x/tmp/recover.sh
  3. Run 1s /vmfs/volumes/datastore1 to browse and decrypt folders
  4. Run 1s to view files to make a note of the VM.
  5. Adding the name of the virtual machine in the name here – /tmp.recover.sh [name], run this CISA recovery script.

After running the ransomware recovery script, one will know whether the virtual machine can be recovered or not. If the ESXiArgs-Recover script runs successfully, one will need to re-register the virtual machine.

To remove the ransom note, move it to the ransom.html file and regain access to the ESXi web interface, the following steps is advised:

  1. Run: cd /usr/lib/vmware/hostd/docroot/ui/ & mv index.html ransom.html & mv index1.html index.html
  2. Run: cd /usr/lib/vmware/hostd/docroot & mv index.html ransom.html & rm index.html & mv index1.html index.html
  3. Reboot the ESXi server to navigate to the web surface minutes after.
  4. Navigate to the virtual machines page in the ESXi web interface
  5. If the restored virtual machine already exists, unregister it by right-clicking on the VM and selecting Unregister.
  6. Next, click on Create/ Register VM.
  7. Choose: Register an existing virtual machine
  8. To access the restored VM folder, click: Select one or more virtual machines, a datastore or a directory
  9. Select the vmx file from the folder.
  10. Click Next > Finish. This will allow complete access to the virtual machine.

This CISA recovery script ESXiArgs-Recover was made available without any warranty and understanding of the application of the script is expected on the part of the engineer.

The ransomware attack using an old vulnerability

A patch for the vulnerability CVE-2021-21974 was issued on 23 February 2021. However, cybercriminals tapped it by targeting unpatched systems:

Countries impacted by the ESXi Args ransomware (Photo: Cyble)

First observed in Italy, the ESXi Args ransomware attack impacted France, followed by the United States of America. An encryptor posted on the Bleeping Computer support forum has also been found.

This ransomware attack includes two files named encrypt.sh, a shell script and encrypt, an ELF executable to encrypt the files.

The shell script looks for all the .log files in the root directory to delete them. This also erases the traces of the ransomware to evade detection. This was found by the Cyble Research & Intelligence Labs (CRIL) researchers from the sample hash: (SHA256), 11b1b2375d9d840912cfd1f0d0d04d93ed0cddb0ae4ddb550a5b62cd044d6b66.

The team discovered that the malicious file was a 64-bit gcc compiled ELF binary as the image below:

https://i0.wp.com/blog.cyble.com/wp-content/uploads/2023/02/Figure-7-Static-details-of-Ransomware-payload.jpg?w=914&ssl=1

(Photo: Cyble)

Previously known vulnerabilities are exploited to cause severe damage to infrastructure and routine operations. New vulnerabilities remain the focal point in ensuring the highest security in software to avoid exploitation however, it is just as crucial to patch all the vulnerabilities in the system that may be using an older version of the software.





Source link