7c90f1d4c4
* Initial commit
* Update Investigation guides - security-docs review
* Update command_and_control_dns_tunneling_nslookup.toml
* Update defense_evasion_amsienable_key_mod.toml
* Apply security-docs review
* Remove dot
* Update rules/windows/command_and_control_rdp_tunnel_plink.toml
Co-authored-by: nastasha-solomon <79124755+nastasha-solomon@users.noreply.github.com>
* Apply changes from review
* Apply the suggestion
Co-authored-by: nastasha-solomon <79124755+nastasha-solomon@users.noreply.github.com>
(cherry picked from commit 817b97f428)
96 lines
4.2 KiB
TOML
96 lines
4.2 KiB
TOML
[metadata]
|
|
creation_date = "2020/11/25"
|
|
maturity = "production"
|
|
updated_date = "2022/05/09"
|
|
|
|
[rule]
|
|
author = ["Elastic"]
|
|
description = """
|
|
Identifies registry write modifications to enable Remote Desktop Protocol (RDP) access. This could be indicative of
|
|
adversary lateral movement preparation.
|
|
"""
|
|
from = "now-9m"
|
|
index = ["logs-endpoint.events.*", "winlogbeat-*", "logs-windows.*"]
|
|
language = "eql"
|
|
license = "Elastic License v2"
|
|
name = "RDP Enabled via Registry"
|
|
note = """## Triage and analysis
|
|
|
|
### Investigating RDP Enabled via Registry
|
|
|
|
Microsoft Remote Desktop Protocol (RDP) is a proprietary Microsoft protocol that enables remote connections to other
|
|
computers, typically over TCP port 3389.
|
|
|
|
Attackers can use RDP to conduct their actions interactively. Ransomware operators frequently use RDP to access
|
|
victim servers, often using privileged accounts.
|
|
|
|
This rule detects modification of the fDenyTSConnections registry key to the value `0`, which specifies that remote
|
|
desktop connections are enabled. Attackers can abuse remote registry, use psexec, etc., to enable RDP and move laterally.
|
|
|
|
#### Possible investigation steps
|
|
|
|
- Identify the user account that performed the action and whether it should perform this kind of action.
|
|
- Contact the user to check if they are aware of the operation.
|
|
- 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.
|
|
- Check whether it makes sense to enable RDP to this host, given its role in the environment.
|
|
- Check if the host is directly exposed to the internet.
|
|
- Check whether privileged accounts accessed the host shortly after the modification.
|
|
- Review network events within a short timespan of this alert for incoming RDP connection attempts.
|
|
|
|
### False positive analysis
|
|
|
|
- This mechanism can be used legitimately. Check whether the user should be performing this kind of activity, whether
|
|
they are aware of it, whether RDP should be open, and whether the action exposes the environment to unnecessary risks.
|
|
|
|
### Response and remediation
|
|
|
|
- Initiate the incident response process based on the outcome of the triage.
|
|
- If RDP is needed, make sure to secure it using firewall rules:
|
|
- Allowlist RDP traffic to specific trusted hosts.
|
|
- Restrict RDP logins to authorized non-administrator accounts, where possible.
|
|
- Isolate the involved hosts to prevent further post-compromise behavior.
|
|
- Review the privileges assigned to the involved users to ensure that the least privilege principle is being followed.
|
|
- 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).
|
|
|
|
## Config
|
|
|
|
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.
|
|
"""
|
|
risk_score = 47
|
|
rule_id = "58aa72ca-d968-4f34-b9f7-bea51d75eb50"
|
|
severity = "medium"
|
|
tags = ["Elastic", "Host", "Windows", "Threat Detection", "Lateral Movement"]
|
|
timestamp_override = "event.ingested"
|
|
type = "eql"
|
|
|
|
query = '''
|
|
registry where event.type in ("creation", "change") and
|
|
registry.path : "HKLM\\SYSTEM\\*ControlSet*\\Control\\Terminal Server\\fDenyTSConnections" and
|
|
registry.data.strings : ("0", "0x00000000") and not (process.name : "svchost.exe" and user.domain == "NT AUTHORITY") and
|
|
not process.executable : "C:\\Windows\\System32\\SystemPropertiesRemote.exe"
|
|
'''
|
|
|
|
|
|
[[rule.threat]]
|
|
framework = "MITRE ATT&CK"
|
|
[[rule.threat.technique]]
|
|
id = "T1021"
|
|
name = "Remote Services"
|
|
reference = "https://attack.mitre.org/techniques/T1021/"
|
|
[[rule.threat.technique.subtechnique]]
|
|
id = "T1021.001"
|
|
name = "Remote Desktop Protocol"
|
|
reference = "https://attack.mitre.org/techniques/T1021/001/"
|
|
|
|
|
|
|
|
[rule.threat.tactic]
|
|
id = "TA0008"
|
|
name = "Lateral Movement"
|
|
reference = "https://attack.mitre.org/tactics/TA0008/"
|
|
|