Peripheral Device Discovery

Identifies use of the Windows file system utility (fsutil.exe) to gather information about attached peripheral devices and components connected to a computer system.

Elastic rule (View on GitHub)

 1[metadata]
 2creation_date = "2020/11/02"
 3integration = ["endpoint", "windows"]
 4maturity = "production"
 5min_stack_comments = "New fields added: required_fields, related_integrations, setup"
 6min_stack_version = "8.3.0"
 7updated_date = "2023/06/22"
 8
 9[rule]
10author = ["Elastic"]
11description = """
12Identifies use of the Windows file system utility (fsutil.exe) to gather information about attached peripheral devices
13and components connected to a computer system.
14"""
15from = "now-9m"
16index = ["winlogbeat-*", "logs-endpoint.events.*", "logs-windows.*", "endgame-*"]
17language = "eql"
18license = "Elastic License v2"
19name = "Peripheral Device Discovery"
20note = """## Triage and analysis
21
22### Investigating Peripheral Device Discovery
23
24After successfully compromising an environment, attackers may try to gain situational awareness to plan their next steps. This can happen by running commands to enumerate network resources, users, connections, files, and installed security software.
25
26This rule looks for the execution of the `fsutil` utility with the `fsinfo` subcommand to enumerate drives attached to the computer, which can be used to identify secondary drives used for backups, mapped network drives, and removable media. These devices can contain valuable information for attackers.
27
28#### Possible investigation steps
29
30- 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.
31- Identify the user account that performed the action and whether it should perform this kind of action.
32- Investigate other alerts associated with the user/host during the past 48 hours.
33- Investigate any abnormal account behavior, such as command executions, file creations or modifications, and network connections.
34- Determine whether this activity was followed by suspicious file access/copy operations or uploads to file storage services.
35
36### False positive analysis
37
38- Discovery activities are not inherently malicious if they occur in isolation. As long as the analyst did not identify suspicious activity related to the user or host, such alerts can be dismissed.
39
40### Response and remediation
41
42- Initiate the incident response process based on the outcome of the triage.
43- Isolate the involved hosts to prevent further post-compromise behavior.
44- 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.
45- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.
46- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.
47- 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).
48
49## Setup
50
51If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.
52"""
53risk_score = 21
54rule_id = "0c7ca5c2-728d-4ad9-b1c5-bbba83ecb1f4"
55severity = "low"
56tags = ["Domain: Endpoint", "OS: Windows", "Use Case: Threat Detection", "Tactic: Discovery", "Resources: Investigation Guide", "Data Source: Elastic Endgame", "Data Source: Elastic Defend"]
57timestamp_override = "event.ingested"
58type = "eql"
59
60query = '''
61process where host.os.type == "windows" and event.type == "start" and
62  (process.name : "fsutil.exe" or process.pe.original_file_name == "fsutil.exe") and
63  process.args : "fsinfo" and process.args : "drives"
64'''
65
66
67[[rule.threat]]
68framework = "MITRE ATT&CK"
69[[rule.threat.technique]]
70id = "T1120"
71name = "Peripheral Device Discovery"
72reference = "https://attack.mitre.org/techniques/T1120/"
73
74
75[rule.threat.tactic]
76id = "TA0007"
77name = "Discovery"
78reference = "https://attack.mitre.org/tactics/TA0007/"

Triage and analysis

Investigating Peripheral Device Discovery

After successfully compromising an environment, attackers may try to gain situational awareness to plan their next steps. This can happen by running commands to enumerate network resources, users, connections, files, and installed security software.

This rule looks for the execution of the fsutil utility with the fsinfo subcommand to enumerate drives attached to the computer, which can be used to identify secondary drives used for backups, mapped network drives, and removable media. These devices can contain valuable information for attackers.

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.
  • Investigate other alerts associated with the user/host during the past 48 hours.
  • Investigate any abnormal account behavior, such as command executions, file creations or modifications, and network connections.
  • Determine whether this activity was followed by suspicious file access/copy operations or uploads to file storage services.

False positive analysis

  • Discovery activities are not inherently malicious if they occur in isolation. As long as the analyst did not identify suspicious activity related to the user or host, such alerts can be dismissed.

Response and remediation

  • Initiate the incident response process based on the outcome of the triage.
  • Isolate the involved hosts to prevent further post-compromise behavior.
  • 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.
  • 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).

Setup

If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define event.ingested and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate event.ingested to @timestamp for this rule to work.

Related rules

to-top