Potential Evasion via Filter Manager

The Filter Manager Control Program (fltMC.exe) binary may be abused by adversaries to unload a filter driver and evade defenses.

Elastic rule (View on GitHub)

  1[metadata]
  2creation_date = "2020/02/18"
  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/03/28"
  8
  9[transform]
 10[[transform.osquery]]
 11label = "Osquery - Retrieve DNS Cache"
 12query = "SELECT * FROM dns_cache"
 13
 14[[transform.osquery]]
 15label = "Osquery - Retrieve All Services"
 16query = "SELECT description, display_name, name, path, pid, service_type, start_type, status, user_account FROM services"
 17
 18[[transform.osquery]]
 19label = "Osquery - Retrieve Services Running on User Accounts"
 20query = """
 21SELECT description, display_name, name, path, pid, service_type, start_type, status, user_account FROM services WHERE
 22NOT (user_account LIKE '%LocalSystem' OR user_account LIKE '%LocalService' OR user_account LIKE '%NetworkService' OR
 23user_account == null)
 24"""
 25
 26[[transform.osquery]]
 27label = "Osquery - Retrieve Service Unsigned Executables with Virustotal Link"
 28query = """
 29SELECT concat('https://www.virustotal.com/gui/file/', sha1) AS VtLink, name, description, start_type, status, pid,
 30services.path FROM services JOIN authenticode ON services.path = authenticode.path OR services.module_path =
 31authenticode.path JOIN hash ON services.path = hash.path WHERE authenticode.result != 'trusted'
 32"""
 33
 34[rule]
 35author = ["Elastic"]
 36description = """
 37The Filter Manager Control Program (fltMC.exe) binary may be abused by adversaries to unload a filter driver and evade
 38defenses.
 39"""
 40from = "now-9m"
 41index = ["winlogbeat-*", "logs-endpoint.events.process-*", "logs-windows.*", "endgame-*", "logs-system.security*"]
 42language = "eql"
 43license = "Elastic License v2"
 44name = "Potential Evasion via Filter Manager"
 45note = """## Triage and analysis
 46
 47### Investigating Potential Evasion via Filter Manager
 48
 49A file system filter driver, or minifilter, is a specialized type of filter driver designed to intercept and modify I/O requests sent to a file system or another filter driver. Minifilters are used by a wide range of security software, including EDR, antivirus, backup agents, encryption products, etc.
 50
 51Attackers may try to unload minifilters to avoid protections such as malware detection, file system monitoring, and behavior-based detections.
 52
 53This rule identifies the attempt to unload a minifilter using the `fltmc.exe` command-line utility, a tool used to manage and query the filter drivers loaded on Windows systems.
 54
 55> **Note**:
 56> This investigation guide uses the [Osquery Markdown Plugin](https://www.elastic.co/guide/en/security/master/invest-guide-run-osquery.html) introduced in Elastic Stack version 8.5.0. Older Elastic Stack versions will display unrendered Markdown in this guide.
 57
 58#### Possible investigation steps
 59
 60- Identify the user account that performed the action and whether it should perform this kind of action.
 61- Examine the command line event to identify the target driver.
 62  - Identify the minifilter's role in the environment and if it is security-related. Microsoft provides a [list](https://learn.microsoft.com/en-us/windows-hardware/drivers/ifs/allocated-altitudes) of allocated altitudes that may provide more context, such as the manufacturer.
 63- Contact the account owner and confirm whether they are aware of this activity.
 64- 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.
 65- Investigate other alerts associated with the user/host during the past 48 hours.
 66- Examine the host for derived artifacts that indicate suspicious activities:
 67  - Observe and collect information about the following activities in the alert subject host:
 68    - Attempts to contact external domains and addresses.
 69      - Use the Elastic Defend network events to determine domains and addresses contacted by the subject process by filtering by the process' `process.entity_id`.
 70      - Examine the DNS cache for suspicious or anomalous entries.
 71        - $osquery_0
 72    - Use the Elastic Defend registry events to examine registry keys accessed, modified, or created by the related processes in the process tree.
 73    - Examine the host services for suspicious or anomalous entries.
 74      - $osquery_1
 75      - $osquery_2
 76      - $osquery_3
 77
 78### False positive analysis
 79
 80- This mechanism can be used legitimately. Analysts can dismiss the alert if the administrator is aware of the activity and there are justifications for the action.
 81
 82### Response and remediation
 83
 84- Initiate the incident response process based on the outcome of the triage.
 85- Isolate the involved host to prevent further post-compromise behavior.
 86- If the triage identified malware, search the environment for additional compromised hosts.
 87  - Implement temporary network rules, procedures, and segmentation to contain the malware.
 88  - Stop suspicious processes.
 89  - Immediately block the identified indicators of compromise (IoCs).
 90  - Inspect the affected systems for additional malware backdoors like reverse shells, reverse proxies, or droppers that attackers could use to reinfect the system.
 91- Remove and block malicious artifacts identified during triage.
 92- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.
 93- 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.
 94- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.
 95- 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).
 96"""
 97risk_score = 47
 98rule_id = "06dceabf-adca-48af-ac79-ffdf4c3b1e9a"
 99severity = "medium"
100tags = ["Domain: Endpoint", "OS: Windows", "Use Case: Threat Detection", "Tactic: Defense Evasion", "Data Source: Elastic Endgame", "Resources: Investigation Guide", "Data Source: Elastic Defend"]
101timestamp_override = "event.ingested"
102type = "eql"
103
104query = '''
105process where host.os.type == "windows" and event.type == "start" and
106  process.name : "fltMC.exe" and process.args : "unload" and
107  not
108  (
109    (
110      process.executable : "?:\\Program Files (x86)\\ManageEngine\\UEMS_Agent\\bin\\DCFAService64.exe" and
111      process.args : ("DFMFilter", "DRMFilter")
112    ) or
113    (
114      process.executable : "?:\\Windows\\SysWOW64\\msiexec.exe" and
115      process.args : ("BrFilter_*", "BrCow_*") and
116      user.id : "S-1-5-18"
117    )
118  )
119'''
120
121
122[[rule.threat]]
123framework = "MITRE ATT&CK"
124[[rule.threat.technique]]
125id = "T1562"
126name = "Impair Defenses"
127reference = "https://attack.mitre.org/techniques/T1562/"
128[[rule.threat.technique.subtechnique]]
129id = "T1562.001"
130name = "Disable or Modify Tools"
131reference = "https://attack.mitre.org/techniques/T1562/001/"
132
133
134
135[rule.threat.tactic]
136id = "TA0005"
137name = "Defense Evasion"
138reference = "https://attack.mitre.org/tactics/TA0005/"

Triage and analysis

Investigating Potential Evasion via Filter Manager

A file system filter driver, or minifilter, is a specialized type of filter driver designed to intercept and modify I/O requests sent to a file system or another filter driver. Minifilters are used by a wide range of security software, including EDR, antivirus, backup agents, encryption products, etc.

Attackers may try to unload minifilters to avoid protections such as malware detection, file system monitoring, and behavior-based detections.

This rule identifies the attempt to unload a minifilter using the fltmc.exe command-line utility, a tool used to manage and query the filter drivers loaded on Windows systems.

Note: This investigation guide uses the Osquery Markdown Plugin introduced in Elastic Stack version 8.5.0. Older Elastic Stack versions will display unrendered Markdown in this guide.

Possible investigation steps

  • Identify the user account that performed the action and whether it should perform this kind of action.
  • Examine the command line event to identify the target driver.
    • Identify the minifilter's role in the environment and if it is security-related. Microsoft provides a list of allocated altitudes that may provide more context, such as the manufacturer.
  • Contact the account owner and confirm whether they are aware of this activity.
  • 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.
  • Investigate other alerts associated with the user/host during the past 48 hours.
  • Examine the host for derived artifacts that indicate suspicious activities:
    • Observe and collect information about the following activities in the alert subject host:
      • Attempts to contact external domains and addresses.
        • Use the Elastic Defend network events to determine domains and addresses contacted by the subject process by filtering by the process' process.entity_id.
        • Examine the DNS cache for suspicious or anomalous entries.
          • $osquery_0
      • Use the Elastic Defend registry events to examine registry keys accessed, modified, or created by the related processes in the process tree.
      • Examine the host services for suspicious or anomalous entries.
        • $osquery_1
        • $osquery_2
        • $osquery_3

False positive analysis

  • This mechanism can be used legitimately. Analysts can dismiss the alert if the administrator is aware of the activity and there are justifications for the action.

Response and remediation

  • Initiate the incident response process based on the outcome of the triage.
  • Isolate the involved host to prevent further post-compromise behavior.
  • If the triage identified malware, search the environment for additional compromised hosts.
    • Implement temporary network rules, procedures, and segmentation to contain the malware.
    • Stop suspicious processes.
    • Immediately block the identified indicators of compromise (IoCs).
    • Inspect the affected systems for additional malware backdoors like reverse shells, reverse proxies, or droppers that attackers could use to reinfect the system.
  • Remove and block malicious artifacts identified during triage.
  • Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.
  • 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.
  • 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).

Related rules

to-top