d52c0d2257
* [Rule Tuning] Remove "process_started" from Windows Rules * Additional, pending ones * Update defense_evasion_code_injection_conhost.toml Co-authored-by: Colson Wilhoit <48036388+DefSecSentinel@users.noreply.github.com>
132 lines
5.7 KiB
TOML
132 lines
5.7 KiB
TOML
[metadata]
|
|
creation_date = "2020/09/02"
|
|
maturity = "production"
|
|
min_stack_comments = "New fields added: required_fields, related_integrations, setup"
|
|
min_stack_version = "8.3.0"
|
|
updated_date = "2022/09/15"
|
|
|
|
[rule]
|
|
author = ["Elastic"]
|
|
description = """
|
|
Identifies a suspicious file that was written by a PDF reader application and subsequently executed. These processes are
|
|
often launched via exploitation of PDF applications.
|
|
"""
|
|
from = "now-120m"
|
|
index = ["logs-endpoint.events.*", "winlogbeat-*", "logs-windows.*"]
|
|
interval = "60m"
|
|
language = "eql"
|
|
license = "Elastic License v2"
|
|
name = "Execution of File Written or Modified by PDF Reader"
|
|
note = """## Triage and analysis
|
|
|
|
### Investigating Execution of File Written or Modified by PDF Reader
|
|
|
|
PDF is a common file type used in corporate environments and most machines have software to
|
|
handle these files. This creates a vector where attackers can exploit the engines and technology behind this class of
|
|
software for initial access or privilege escalation.
|
|
|
|
This rule searches for executable files written by PDF reader software and executed in sequence. This is most likely the
|
|
result of exploitation for privilege escalation or initial access. This rule can also detect suspicious processes masquerading as
|
|
PDF readers.
|
|
|
|
#### 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.
|
|
- Investigate other alerts associated with the user/host during the past 48 hours.
|
|
- Retrieve the PDF documents received and opened by the user that could cause this behavior. Common locations include,
|
|
but are not limited to, the Downloads and Document folders and the folder configured at the email client.
|
|
- Determine if the collected files are 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
|
|
|
|
- This activity is unlikely to happen legitimately. Benign true positives (B-TPs) can be added as exceptions if necessary.
|
|
|
|
### 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.
|
|
- 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.
|
|
- If the triage identified malware, search the environment for additional compromised hosts.
|
|
- Implement temporary network rules, procedures, and segmentation to contain the malware.
|
|
- Stop suspicious processes.
|
|
- Immediately block the identified indicators of compromise (IoCs).
|
|
- Inspect the affected systems for additional malware backdoors like reverse shells, reverse proxies, or droppers that
|
|
attackers could use to reinfect the system.
|
|
- Remove and block malicious artifacts identified during triage.
|
|
- 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.
|
|
- 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.
|
|
- 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 = "1defdd62-cd8d-426e-a246-81a37751bb2b"
|
|
severity = "high"
|
|
tags = ["Elastic", "Host", "Windows", "Threat Detection", "Execution"]
|
|
type = "eql"
|
|
|
|
query = '''
|
|
sequence with maxspan=2h
|
|
[file where event.type != "deletion" and file.extension : "exe" and
|
|
(process.name : "AcroRd32.exe" or
|
|
process.name : "rdrcef.exe" or
|
|
process.name : "FoxitPhantomPDF.exe" or
|
|
process.name : "FoxitReader.exe") and
|
|
not (file.name : "FoxitPhantomPDF.exe" or
|
|
file.name : "FoxitPhantomPDFUpdater.exe" or
|
|
file.name : "FoxitReader.exe" or
|
|
file.name : "FoxitReaderUpdater.exe" or
|
|
file.name : "AcroRd32.exe" or
|
|
file.name : "rdrcef.exe")
|
|
] by host.id, file.path
|
|
[process where event.type == "start"] by host.id, process.executable
|
|
'''
|
|
|
|
|
|
[[rule.threat]]
|
|
framework = "MITRE ATT&CK"
|
|
|
|
[rule.threat.tactic]
|
|
id = "TA0002"
|
|
name = "Execution"
|
|
reference = "https://attack.mitre.org/tactics/TA0002/"
|
|
[[rule.threat]]
|
|
framework = "MITRE ATT&CK"
|
|
[[rule.threat.technique]]
|
|
id = "T1566"
|
|
name = "Phishing"
|
|
reference = "https://attack.mitre.org/techniques/T1566/"
|
|
[[rule.threat.technique.subtechnique]]
|
|
id = "T1566.001"
|
|
name = "Spearphishing Attachment"
|
|
reference = "https://attack.mitre.org/techniques/T1566/001/"
|
|
|
|
[[rule.threat.technique.subtechnique]]
|
|
id = "T1566.002"
|
|
name = "Spearphishing Link"
|
|
reference = "https://attack.mitre.org/techniques/T1566/002/"
|
|
|
|
|
|
|
|
[rule.threat.tactic]
|
|
id = "TA0001"
|
|
name = "Initial Access"
|
|
reference = "https://attack.mitre.org/tactics/TA0001/"
|
|
|