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

to-top