Huntress Used a Harmless File to Block the Kaseya VSA Ransomware Payload

· Original article ↗

Summary

Huntress analyzed the Kaseya VSA attack and pushed a harmless agent.exe text file to partner endpoints, aiming to block certutil from writing the REvil payload under the same filename.

Key points

  • Huntress reported that REvil used a Kaseya VSA-delivered command to disable several Windows security protections, decode agent.crt with certutil, and run agent.exe.
  • The attack’s payload process relied on certutil not being able to decode the file when a file with the output name already existed.
  • Huntress pushed a harmless agent.exe text file to checking-in Huntress agents, intending to block creation of the ransomware payload.
  • The workaround had limitations: attackers could change the filename or directory, and the VSA working directory was configurable.
  • Huntress notified Kaseya and other vendors of the file hashes to help avoid false positives; some partners initially mistook the file for malicious.

Article Details

Defense Focus
Prevent REvil/Sodinokibi ransomware execution in Kaseya VSA environments by placing a benign file named agent.exe in the configured agent temporary directory before the decoded payload is written.
Detection Methods
  • Review the VSA-delivered command sequence for disabling Windows protection settings, copying certutil.exe to cert.exe, appending data to alter the executable hash, decoding agent.crt to agent.exe, deleting the intermediate files, and launching agent.exe.
  • Investigate the configured VSA agent temporary directory, identified in the article as #vAgentConfiguration.AgentTempDir#, rather than assuming it is always C:\kworking.
  • Distinguish the benign Huntress agent.exe text file from the ransomware payload using its file contents and the supplied hashes.
Data Sources
  • Endpoint command-line and process execution records
  • File-system observations in the configured VSA agent temporary directory
  • File hashes for the Huntress vaccine file
Platforms
  • Huntress platform
Defensive Actions
  • Deploy a benign agent.exe file to the configured VSA agent temporary directory so certutil will not decode the malicious payload to that filename.
  • Verify the directory configuration before relying on the vaccine; the default C:\kworking path may have been changed.
  • Treat the vaccine as a temporary, name-dependent measure: the attackers could change the filename or directory.
  • Use the published MD5, SHA1, and SHA256 values to identify the Huntress text-file vaccine and avoid mistaking it for the ransomware payload.

Indicators of compromise

TypeIndicatorContext
MD510ec4c5b19b88a5e1b7bf1e3a9b43c12MD5 hash Huntress provided for its benign agent.exe text-file vaccine to help prevent false positives.
SHA1a4636c16b43affa1957a9f1edbd725a0d9c42e3aSHA1 hash Huntress provided for its benign agent.exe text-file vaccine to help prevent false positives.
SHA2565dca077e18f20fc7c8c08b9fd0be6154b4c16a7dcf45bdf69767fa1ce32f4f5dSHA256 hash Huntress provided for its benign agent.exe text-file vaccine to help prevent false positives.

MITRE ATT&CK

Threat Actors

Malware

Vendors

Products

Industries

Related Articles