Third-party Backup Files Deleted via Unexpected Process

Identifies the deletion of backup files, saved using third-party software, by a process outside of the backup suite. Adversaries may delete Backup files to ensure that recovery from a ransomware attack is less likely.

Elastic rule (View on GitHub)

  1[metadata]
  2creation_date = "2021/10/01"
  3integration = ["endpoint", "windows"]
  4maturity = "production"
  5min_stack_comments = "New fields added: required_fields, related_integrations, setup"
  6min_stack_version = "8.3.0"
  7updated_date = "2024/01/03"
  8
  9[rule]
 10author = ["Elastic"]
 11description = """
 12Identifies the deletion of backup files, saved using third-party software, by a process outside of the backup suite.
 13Adversaries may delete Backup files to ensure that recovery from a ransomware attack is less likely.
 14"""
 15false_positives = [
 16    "Certain utilities that delete files for disk cleanup or Administrators manually removing backup files.",
 17]
 18from = "now-9m"
 19index = ["winlogbeat-*", "logs-endpoint.events.*", "logs-windows.*", "endgame-*"]
 20language = "eql"
 21license = "Elastic License v2"
 22name = "Third-party Backup Files Deleted via Unexpected Process"
 23note = """## Triage and analysis
 24
 25### Investigating Third-party Backup Files Deleted via Unexpected Process
 26
 27Backups are a significant obstacle for any ransomware operation. They allow the victim to resume business by performing data recovery, making them a valuable target.
 28
 29Attackers can delete backups from the host and gain access to backup servers to remove centralized backups for the environment, ensuring that victims have no alternatives to paying the ransom.
 30
 31This rule identifies file deletions performed by a process that does not belong to the backup suite and aims to delete Veritas or Veeam backups.
 32
 33#### Possible investigation steps
 34
 35- Investigate the process execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.
 36- Identify the user account that performed the action and whether it should perform this kind of action.
 37- Contact the account owner and confirm whether they are aware of this activity.
 38- Investigate other alerts associated with the user/host during the past 48 hours.
 39- Check if any files on the host machine have been encrypted.
 40
 41### False positive analysis
 42
 43- This rule can be triggered by the manual removal of backup files and by removal using other third-party tools that are not from the backup suite. Exceptions can be added for specific accounts and executables, preferably tied together.
 44
 45### Related rules
 46
 47- Deleting Backup Catalogs with Wbadmin - 581add16-df76-42bb-af8e-c979bfb39a59
 48- Volume Shadow Copy Deleted or Resized via VssAdmin - b5ea4bfe-a1b2-421f-9d47-22a75a6f2921
 49- Volume Shadow Copy Deletion via PowerShell - d99a037b-c8e2-47a5-97b9-170d076827c4
 50- Volume Shadow Copy Deletion via WMIC - dc9c1f74-dac3-48e3-b47f-eb79db358f57
 51
 52### Response and remediation
 53
 54- Initiate the incident response process based on the outcome of the triage.
 55- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.
 56- Consider isolating the involved host to prevent destructive behavior, which is commonly associated with this activity.
 57- Perform data recovery locally or restore the backups from replicated copies (Cloud, other servers, etc.).
 58- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.
 59- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.
 60- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).
 61
 62"""
 63references = ["https://www.advintel.io/post/backup-removal-solutions-from-conti-ransomware-with-love"]
 64risk_score = 47
 65rule_id = "11ea6bec-ebde-4d71-a8e9-784948f8e3e9"
 66setup="""
 67
 68If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2,
 69events will not define `event.ingested` and default fallback for EQL rules was not added until version 8.2.
 70Hence for this rule to work effectively, users will need to add a custom ingest pipeline to populate
 71`event.ingested` to @timestamp.
 72For more details on adding a custom ingest pipeline refer - https://www.elastic.co/guide/en/fleet/current/data-streams-pipeline-tutorial.html
 73"""
 74severity = "medium"
 75tags = ["Domain: Endpoint", "OS: Windows", "Use Case: Threat Detection", "Tactic: Impact", "Resources: Investigation Guide", "Data Source: Elastic Endgame", "Data Source: Elastic Defend"]
 76timestamp_override = "event.ingested"
 77type = "eql"
 78
 79query = '''
 80file where host.os.type == "windows" and event.type == "deletion" and
 81  (
 82    /* Veeam Related Backup Files */
 83    (
 84      file.extension : ("VBK", "VIB", "VBM") and
 85      not (
 86        process.executable : ("?:\\Windows\\*", "?:\\Program Files\\*", "?:\\Program Files (x86)\\*") and
 87        (process.code_signature.trusted == true and process.code_signature.subject_name : ("Veeam Software Group GmbH", "Veeam Software AG"))
 88      )
 89    ) or
 90    /* Veritas Backup Exec Related Backup File */
 91    (
 92      file.extension : "BKF" and
 93        not process.executable : (
 94          "?:\\Program Files\\Veritas\\Backup Exec\\*",
 95          "?:\\Program Files (x86)\\Veritas\\Backup Exec\\*"
 96        )
 97    )
 98  ) and
 99  not (
100    process.name : ("MSExchangeMailboxAssistants.exe", "Microsoft.PowerBI.EnterpriseGateway.exe") and
101      (process.code_signature.subject_name : "Microsoft Corporation" and process.code_signature.trusted == true)
102  ) and
103  not file.path : (
104    "?:\\ProgramData\\Trend Micro\\*",
105    "?:\\Program Files (x86)\\Trend Micro\\*",
106    "?:\\$RECYCLE.BIN\\*"
107  )
108'''
109
110
111[[rule.threat]]
112framework = "MITRE ATT&CK"
113[[rule.threat.technique]]
114id = "T1490"
115name = "Inhibit System Recovery"
116reference = "https://attack.mitre.org/techniques/T1490/"
117
118[[rule.threat.technique]]
119id = "T1485"
120name = "Data Destruction"
121reference = "https://attack.mitre.org/techniques/T1485/"
122
123[rule.threat.tactic]
124id = "TA0040"
125name = "Impact"
126reference = "https://attack.mitre.org/tactics/TA0040/"

Triage and analysis

Investigating Third-party Backup Files Deleted via Unexpected Process

Backups are a significant obstacle for any ransomware operation. They allow the victim to resume business by performing data recovery, making them a valuable target.

Attackers can delete backups from the host and gain access to backup servers to remove centralized backups for the environment, ensuring that victims have no alternatives to paying the ransom.

This rule identifies file deletions performed by a process that does not belong to the backup suite and aims to delete Veritas or Veeam backups.

Possible investigation steps

  • Investigate the process execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.
  • Identify the user account that performed the action and whether it should perform this kind of action.
  • Contact the account owner and confirm whether they are aware of this activity.
  • Investigate other alerts associated with the user/host during the past 48 hours.
  • Check if any files on the host machine have been encrypted.

False positive analysis

  • This rule can be triggered by the manual removal of backup files and by removal using other third-party tools that are not from the backup suite. Exceptions can be added for specific accounts and executables, preferably tied together.
  • Deleting Backup Catalogs with Wbadmin - 581add16-df76-42bb-af8e-c979bfb39a59
  • Volume Shadow Copy Deleted or Resized via VssAdmin - b5ea4bfe-a1b2-421f-9d47-22a75a6f2921
  • Volume Shadow Copy Deletion via PowerShell - d99a037b-c8e2-47a5-97b9-170d076827c4
  • Volume Shadow Copy Deletion via WMIC - dc9c1f74-dac3-48e3-b47f-eb79db358f57

Response and remediation

  • Initiate the incident response process based on the outcome of the triage.
  • Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.
  • Consider isolating the involved host to prevent destructive behavior, which is commonly associated with this activity.
  • Perform data recovery locally or restore the backups from replicated copies (Cloud, other servers, etc.).
  • Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.
  • Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.
  • Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).

References

Related rules

to-top