System Information Discovery via Windows Command Shell
Identifies the execution of discovery commands to enumerate system information, files, and folders using the Windows Command Shell.
Rule type: eql
Rule indices:
- endgame-*
- logs-endpoint.events.process-*
- logs-system.security*
- logs-windows.*
- winlogbeat-*
Rule Severity: low
Risk Score: 21
Runs every:
Searches indices from: now-9m
Maximum alerts per execution: ?
References:
Tags:
- Domain: Endpoint
- OS: Windows
- Use Case: Threat Detection
- Tactic: Discovery
- Tactic: Execution
- Resources: Investigation Guide
- Data Source: Elastic Defend
- Rule Type: BBR
- Data Source: Elastic Endgame
- Data Source: Windows Security Event Logs
Version: ?
Rule authors:
- Elastic
Rule license: Elastic License v2
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 identifies commands to enumerate system information, files, and folders using the Windows Command Shell.
- 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.
- Investigate any abnormal account behavior, such as command executions, file creations or modifications, and network connections.
- 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.
- 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).
process where host.os.type == "windows" and event.type == "start" and
process.name : "cmd.exe" and process.args : "/c" and process.args : ("set", "dir") and
not process.parent.executable : (
"?:\\Program Files\\*",
"?:\\Program Files (x86)\\*",
"?:\\PROGRA~1\\*",
"?:\\TeamCity\\jre\\bin\\java.exe"
) and
not process.args : (
"*\\db\\rabbit@*", "*/db/rabbit@*",
"*rabbitmq/db/*", "*RabbitMQ\\db*"
) and
not process.parent.args : "*C:\\Program Files (x86)\\Tanium\\Tanium Client\\TPython\\TPython.bat*"
Framework: MITRE ATT&CK
Tactic:
- Name: Discovery
- Id: TA0007
- Reference URL: https://attack.mitre.org/tactics/TA0007/
Technique:
- Name: System Information Discovery
- Id: T1082
- Reference URL: https://attack.mitre.org/techniques/T1082/
Technique:
- Name: File and Directory Discovery
- Id: T1083
- Reference URL: https://attack.mitre.org/techniques/T1083/
Framework: MITRE ATT&CK
Tactic:
- Name: Execution
- Id: TA0002
- Reference URL: https://attack.mitre.org/tactics/TA0002/
Technique:
- Name: Command and Scripting Interpreter
- Id: T1059
- Reference URL: https://attack.mitre.org/techniques/T1059/
Sub Technique:
- Name: Windows Command Shell
- Id: T1059.003
- Reference URL: https://attack.mitre.org/techniques/T1059/003/