b15f0de9a4
* [Rules Tuning] 7 diverse Windows rules Excluding FP patterns while avoiding breaking compat with winlogbeat and 4688 events lack of codesign metadata. * Update initial_access_suspicious_ms_exchange_process.toml * Update privilege_escalation_persistence_phantom_dll.toml * Update execution_psexec_lateral_movement_command.toml * Update persistence_remote_password_reset.toml * Update non-ecs-schema.json * Update persistence_remote_password_reset.toml * Update non-ecs-schema.json * Update discovery_privileged_localgroup_membership.toml
114 lines
4.8 KiB
TOML
114 lines
4.8 KiB
TOML
[metadata]
|
|
creation_date = "2020/02/18"
|
|
maturity = "production"
|
|
updated_date = "2022/08/02"
|
|
|
|
[rule]
|
|
author = ["Elastic"]
|
|
description = """
|
|
Identifies use of the SysInternals tool PsExec.exe making a network connection. This could be an indication of lateral
|
|
movement.
|
|
"""
|
|
false_positives = [
|
|
"""
|
|
PsExec is a dual-use tool that can be used for benign or malicious activity. It's important to baseline your
|
|
environment to determine the amount of noise to expect from this tool.
|
|
""",
|
|
]
|
|
from = "now-9m"
|
|
index = ["winlogbeat-*", "logs-endpoint.events.*", "logs-windows.*"]
|
|
language = "eql"
|
|
license = "Elastic License v2"
|
|
name = "PsExec Network Connection"
|
|
note = """## Triage and analysis
|
|
|
|
### Investigating PsExec Network Connection
|
|
|
|
PsExec is a remote administration tool that enables the execution of commands with both regular and SYSTEM privileges
|
|
on Windows systems. Microsoft develops it as part of the Sysinternals Suite. Although commonly used by administrators,
|
|
PsExec is frequently used by attackers to enable lateral movement and execute commands as SYSTEM to disable defenses and
|
|
bypass security protections.
|
|
|
|
This rule identifies PsExec execution by looking for the creation of `PsExec.exe`, the default name for the
|
|
utility, followed by a network connection done by the process.
|
|
|
|
#### Possible investigation steps
|
|
|
|
- Check if the usage of this tool complies with the organization's administration policy.
|
|
- 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.
|
|
- Identify the user account that performed the action and whether it should perform this kind of action.
|
|
- Identify the target computer and its role in the IT environment.
|
|
- Investigate what commands were run, and assess whether this behavior is prevalent in the environment by looking for
|
|
similar occurrences across hosts.
|
|
|
|
### False positive analysis
|
|
|
|
- This mechanism can be used legitimately. As long as the analyst did not identify suspicious activity related to the
|
|
user or involved hosts, and the tool is allowed by the organization's policy, such alerts can be dismissed.
|
|
|
|
### Response and remediation
|
|
|
|
- Initiate the incident response process based on the outcome of the triage.
|
|
- Prioritize accordingly with the role of the servers and users involved.
|
|
- 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 scan using the antimalware tool in place. This scan can 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.
|
|
- Review the privileges assigned to the user to ensure that the least privilege principle is being followed.
|
|
- 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).
|
|
"""
|
|
risk_score = 21
|
|
rule_id = "55d551c6-333b-4665-ab7e-5d14a59715ce"
|
|
severity = "low"
|
|
tags = ["Elastic", "Host", "Windows", "Threat Detection", "Execution"]
|
|
type = "eql"
|
|
|
|
query = '''
|
|
sequence by process.entity_id
|
|
[process where process.name : "PsExec.exe" and event.type == "start" and
|
|
|
|
/* This flag suppresses the display of the license dialog and may
|
|
indicate that psexec executed for the first time in the machine */
|
|
process.args : "-accepteula" and
|
|
|
|
not process.executable : ("?:\\ProgramData\\Docusnap\\Discovery\\discovery\\plugins\\17\\Bin\\psexec.exe",
|
|
"?:\\Docusnap 11\\Bin\\psexec.exe",
|
|
"?:\\Program Files\\Docusnap X\\Bin\\psexec.exe",
|
|
"?:\\Program Files\\Docusnap X\\Tools\\dsDNS.exe") and
|
|
not process.parent.executable : "?:\\Program Files (x86)\\Cynet\\Cynet Scanner\\CynetScanner.exe"]
|
|
[network where process.name : "PsExec.exe"]
|
|
'''
|
|
|
|
|
|
[[rule.threat]]
|
|
framework = "MITRE ATT&CK"
|
|
[[rule.threat.technique]]
|
|
id = "T1569"
|
|
name = "System Services"
|
|
reference = "https://attack.mitre.org/techniques/T1569/"
|
|
[[rule.threat.technique.subtechnique]]
|
|
id = "T1569.002"
|
|
name = "Service Execution"
|
|
reference = "https://attack.mitre.org/techniques/T1569/002/"
|
|
|
|
|
|
|
|
[rule.threat.tactic]
|
|
id = "TA0002"
|
|
name = "Execution"
|
|
reference = "https://attack.mitre.org/tactics/TA0002/"
|
|
[[rule.threat]]
|
|
framework = "MITRE ATT&CK"
|
|
|
|
[rule.threat.tactic]
|
|
id = "TA0008"
|
|
name = "Lateral Movement"
|
|
reference = "https://attack.mitre.org/tactics/TA0008/"
|
|
|