817b97f428
* 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>
113 lines
5.0 KiB
TOML
113 lines
5.0 KiB
TOML
[metadata]
|
|
creation_date = "2021/03/15"
|
|
maturity = "production"
|
|
updated_date = "2022/05/09"
|
|
|
|
[rule]
|
|
author = ["Elastic"]
|
|
description = """
|
|
Identifies suspicious startup shell folder modifications to change the default Startup directory in order to bypass
|
|
detections monitoring file creation in the Windows Startup folder.
|
|
"""
|
|
from = "now-9m"
|
|
index = ["logs-endpoint.events.*"]
|
|
language = "eql"
|
|
license = "Elastic License v2"
|
|
name = "Suspicious Startup Shell Folder Modification"
|
|
note = """## Triage and analysis
|
|
|
|
### Investigating Suspicious Startup Shell Folder Modification
|
|
|
|
Techniques used within malware and by adversaries often leverage the Windows registry to store malicious programs for
|
|
persistence. Startup shell folders are often targeted as they are not as prevalent as normal Startup folder paths so this
|
|
behavior may evade existing AV/EDR solutions. These programs may also run with higher privileges which can be ideal for
|
|
an attacker.
|
|
|
|
#### 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.
|
|
- Review the source process and related file tied to the Windows Registry entry.
|
|
- Validate the activity is not related to planned patches, updates, network administrator activity or legitimate software
|
|
installations.
|
|
- Assess whether this behavior is prevalent in the environment by looking for similar occurrences across hosts.
|
|
- Retrieve the file and determine if it is malicious:
|
|
- Use a private sandboxed malware analysis system to perform analysis.
|
|
- Observe and collect information about the following activities:
|
|
- Attempts to contact external domains and addresses.
|
|
- File and registry access, modification, and creation activities.
|
|
- Service creation and launch activities.
|
|
- Scheduled tasks creation.
|
|
- Use the PowerShell Get-FileHash cmdlet to get the files' SHA-256 hash values.
|
|
- Search for the existence and reputation of the hashes in resources like VirusTotal, Hybrid-Analysis, CISCO Talos, Any.run, etc.
|
|
|
|
### False positive analysis
|
|
|
|
- There is a high possibility of benign legitimate programs being added to shell folders. This activity could be based
|
|
on new software installations, patches, or other network administrator activity. Before entering further investigation,
|
|
it should be verified that this activity is not benign.
|
|
|
|
### Related rules
|
|
|
|
- Startup or Run Key Registry Modification - 97fc44d3-8dae-4019-ae83-298c3015600f
|
|
- Persistent Scripts in the Startup Directory - f7c4dc5a-a58d-491d-9f14-9b66507121c0
|
|
|
|
### 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.
|
|
- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.
|
|
- If the malicious file was delivered via phishing:
|
|
- Block the email sender from sending future emails.
|
|
- Block the malicious web pages.
|
|
- Remove emails from the sender from mailboxes.
|
|
- Consider improvements to the security awareness program.
|
|
- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and
|
|
malware components.
|
|
- 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 = 73
|
|
rule_id = "c8b150f0-0164-475b-a75e-74b47800a9ff"
|
|
severity = "high"
|
|
tags = ["Elastic", "Host", "Windows", "Threat Detection", "Persistence"]
|
|
timestamp_override = "event.ingested"
|
|
type = "eql"
|
|
|
|
query = '''
|
|
registry where
|
|
registry.path : (
|
|
"HKLM\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\User Shell Folders\\Common Startup",
|
|
"HKLM\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Shell Folders\\Common Startup",
|
|
"HKEY_USERS\\*\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\User Shell Folders\\Startup",
|
|
"HKEY_USERS\\*\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Shell Folders\\Startup"
|
|
) and
|
|
registry.data.strings != null and
|
|
/* Normal Startup Folder Paths */
|
|
not registry.data.strings : (
|
|
"C:\\ProgramData\\Microsoft\\Windows\\Start Menu\\Programs\\Startup",
|
|
"%ProgramData%\\Microsoft\\Windows\\Start Menu\\Programs\\Startup",
|
|
"%USERPROFILE%\\AppData\\Roaming\\Microsoft\\Windows\\Start Menu\\Programs\\Startup",
|
|
"C:\\Users\\*\\AppData\\Roaming\\Microsoft\\Windows\\Start Menu\\Programs\\Startup"
|
|
)
|
|
'''
|
|
|
|
|
|
[[rule.threat]]
|
|
framework = "MITRE ATT&CK"
|
|
[[rule.threat.technique]]
|
|
id = "T1547"
|
|
name = "Boot or Logon Autostart Execution"
|
|
reference = "https://attack.mitre.org/techniques/T1547/"
|
|
[[rule.threat.technique.subtechnique]]
|
|
id = "T1547.001"
|
|
name = "Registry Run Keys / Startup Folder"
|
|
reference = "https://attack.mitre.org/techniques/T1547/001/"
|
|
|
|
|
|
|
|
[rule.threat.tactic]
|
|
id = "TA0003"
|
|
name = "Persistence"
|
|
reference = "https://attack.mitre.org/tactics/TA0003/"
|