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