Potential Cookies Theft via Browser Debugging

Identifies the execution of a Chromium based browser with the debugging process argument, which may indicate an attempt to steal authentication cookies. An adversary may steal web application or service session cookies and use them to gain access web applications or Internet services as an authenticated user without needing credentials.

Elastic rule (View on GitHub)

 1[metadata]
 2creation_date = "2020/12/21"
 3integration = ["endpoint", "windows"]
 4maturity = "production"
 5min_stack_comments = "New fields added: required_fields, related_integrations, setup"
 6min_stack_version = "8.3.0"
 7updated_date = "2023/06/22"
 8
 9[rule]
10author = ["Elastic"]
11description = """
12Identifies the execution of a Chromium based browser with the debugging process argument, which may indicate an attempt
13to steal authentication cookies. An adversary may steal web application or service session cookies and use them to gain
14access web applications or Internet services as an authenticated user without needing credentials.
15"""
16false_positives = ["Developers performing browsers plugin or extension debugging."]
17from = "now-9m"
18index = ["auditbeat-*", "winlogbeat-*", "logs-endpoint.events.*", "logs-windows.*"]
19language = "eql"
20license = "Elastic License v2"
21max_signals = 33
22name = "Potential Cookies Theft via Browser Debugging"
23note = """## Setup
24
25If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.
26"""
27references = [
28    "https://github.com/defaultnamehere/cookie_crimes",
29    "https://embracethered.com/blog/posts/2020/cookie-crimes-on-mirosoft-edge/",
30    "https://github.com/rapid7/metasploit-framework/blob/master/documentation/modules/post/multi/gather/chrome_cookies.md",
31    "https://posts.specterops.io/hands-in-the-cookie-jar-dumping-cookies-with-chromiums-remote-debugger-port-34c4f468844e",
32]
33risk_score = 47
34rule_id = "027ff9ea-85e7-42e3-99d2-bbb7069e02eb"
35severity = "medium"
36tags = ["Domain: Endpoint", "OS: Linux", "OS: Windows", "OS: macOS", "Use Case: Threat Detection", "Tactic: Credential Access", "Data Source: Elastic Defend"]
37timestamp_override = "event.ingested"
38type = "eql"
39
40query = '''
41process where event.type in ("start", "process_started", "info") and
42  process.name in (
43             "Microsoft Edge",
44             "chrome.exe",
45             "Google Chrome",
46             "google-chrome-stable",
47             "google-chrome-beta",
48             "google-chrome",
49             "msedge.exe") and
50   process.args : ("--remote-debugging-port=*",
51                   "--remote-debugging-targets=*",
52                   "--remote-debugging-pipe=*") and
53   process.args : "--user-data-dir=*" and not process.args:"--remote-debugging-port=0"
54'''
55
56
57[[rule.threat]]
58framework = "MITRE ATT&CK"
59[[rule.threat.technique]]
60id = "T1539"
61name = "Steal Web Session Cookie"
62reference = "https://attack.mitre.org/techniques/T1539/"
63
64
65[rule.threat.tactic]
66id = "TA0006"
67name = "Credential Access"
68reference = "https://attack.mitre.org/tactics/TA0006/"

Setup

If enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define event.ingested and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate event.ingested to @timestamp for this rule to work.

References

Related rules

to-top