Potential File Download via a Headless Browser
Identifies the use of a browser to download a file from a remote URL and from a suspicious parent process. Adversaries may use browsers to avoid ingress tool transfer restrictions.
Elastic rule (View on GitHub)
1[metadata]
2creation_date = "2024/05/10"
3integration = ["endpoint", "windows", "system", "m365_defender", "sentinel_one_cloud_funnel"]
4maturity = "production"
5updated_date = "2024/10/15"
6min_stack_version = "8.14.0"
7min_stack_comments = "Breaking change at 8.14.0 for the Windows Integration."
8
9[rule]
10author = ["Elastic"]
11description = """
12Identifies the use of a browser to download a file from a remote URL and from a suspicious parent process. Adversaries
13may use browsers to avoid ingress tool transfer restrictions.
14"""
15from = "now-9m"
16index = [
17 "winlogbeat-*",
18 "logs-endpoint.events.process-*",
19 "logs-windows.forwarded*",
20 "logs-windows.sysmon_operational-*",
21 "endgame-*",
22 "logs-system.security*",
23 "logs-m365_defender.event-*",
24 "logs-sentinel_one_cloud_funnel.*",
25]
26language = "eql"
27license = "Elastic License v2"
28name = "Potential File Download via a Headless Browser"
29note = """## Triage and analysis
30
31### Investigating Potential File Download via a Headless Browser
32
33- Investigate the process execution chain (parent process tree).
34- Investigate the process network and file events.
35- Identify the user account that performed the action and whether it should perform this kind of action.
36- Contact the account owner and confirm whether they are aware of this activity.
37
38### Response and remediation
39
40- Initiate the incident response process based on the outcome of the triage.
41- Isolate the involved host to prevent further post-compromise behavior.
42- If the triage identified malware, search the environment for additional compromised hosts.
43 - Implement temporary network rules, procedures, and segmentation to contain the malware.
44 - Stop suspicious processes.
45 - Immediately block the identified indicators of compromise (IoCs).
46 - Inspect the affected systems for additional malware backdoors like reverse shells, reverse proxies, or droppers that attackers could use to reinfect the system.
47- Remove and block malicious artifacts identified during triage.
48- 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.
49- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.
50- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.
51- 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).
52"""
53references = ["https://lolbas-project.github.io/lolbas/Binaries/Msedge/"]
54risk_score = 73
55rule_id = "5f2f463e-6997-478c-8405-fb41cc283281"
56severity = "high"
57tags = [
58 "Domain: Endpoint",
59 "OS: Windows",
60 "Use Case: Threat Detection",
61 "Tactic: Command and Control",
62 "Resources: Investigation Guide",
63 "Data Source: Windows",
64 "Data Source: Elastic Endgame",
65 "Data Source: Elastic Defend",
66 "Data Source: System",
67 "Data Source: Microsoft Defender for Endpoint",
68 "Data Source: SentinelOne",
69 "Data Source: Sysmon",
70]
71timestamp_override = "event.ingested"
72type = "eql"
73
74query = '''
75process where host.os.type == "windows" and event.type == "start" and
76 process.name : ("chrome.exe", "msedge.exe", "brave.exe", "browser.exe", "dragon.exe", "vivaldi.exe") and
77 (process.args : "--headless*" or process.args : "data:text/html;base64,*") and
78 process.parent.name :
79 ("cmd.exe", "powershell.exe", "wscript.exe", "cscript.exe", "mshta.exe", "conhost.exe", "msiexec.exe",
80 "explorer.exe", "rundll32.exe", "winword.exe", "excel.exe", "onenote.exe", "hh.exe", "powerpnt.exe", "forfiles.exe",
81 "pcalua.exe", "wmiprvse.exe")
82'''
83
84
85[[rule.threat]]
86framework = "MITRE ATT&CK"
87[[rule.threat.technique]]
88id = "T1105"
89name = "Ingress Tool Transfer"
90reference = "https://attack.mitre.org/techniques/T1105/"
91
92
93[rule.threat.tactic]
94id = "TA0011"
95name = "Command and Control"
96reference = "https://attack.mitre.org/tactics/TA0011/"
Triage and analysis
Investigating Potential File Download via a Headless Browser
- Investigate the process execution chain (parent process tree).
- Investigate the process network and file events.
- Identify the user account that performed the action and whether it should perform this kind of action.
- Contact the account owner and confirm whether they are aware of this activity.
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.
- 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.
- 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).
References
Related rules
- Potential DNS Tunneling via NsLookup
- Remote File Download via Desktopimgdownldr Utility
- Remote File Download via MpCmdRun
- AdFind Command Activity
- Adding Hidden File Attribute via Attrib